2. Initiate Payment (By Key)
It is a method you can use to initiate payments with connected APM providers. This method requires an external Key information, which is unique to each provider. You can refer to the list to obtain th
Initiate Payment (Key)
POST
{{Base Adres}}/api/paywall/apm/pay/bykey
The headers parameters that need to be sent to the service are as follows:
apikeypublic
string
Yes
The Public Key obtained from the merchant panel.
apiclientpublic
string
Yes
The Public Client obtained from the merchant panel.
The parameters that need to be sent to the service in the BODY are as follows:
ApmKey
string
Yes
The Key information of the APM provider.
Bkz: APM
MerchantUniqueCode
string
Yes
The unique identifier you've created for the payment
MerchantSuccessBackUrl
string
Yes
The address where the successful result of your payment will be communicated. You will receive the response in the POST body.
MerchantFailBackUrl
string
Yes
The address where the successful result of your payment will be sent. You will receive the response in the POST body.
Amount
decimal
Yes
Payment amount
Description
string
Yes
Description of the payment. This description can be displayed on the payment screen depending on the provider.
An example of a JSON file to be sent to the service is as follows:
{
"ApmKey": "Papara",
"CurrencyId": 1,
"MerchantUniqueCode": "TESTMERCHANTUNIQUECODE",
"MerchantSuccessBackUrl": "https://webhook.site/38a6fa6f-3414-40db-b2a7-a6c38894b6a3",
"MerchantFailBackUrl": "https://webhook.site/38a6fa6f-3414-40db-b2a7-a6c38894b6a3",
"Amount": 1,
"Description": "test"
"Payer": {
"Fullname": "",
"CardNumber": "",
"CardId": "",
"Phone": "",
"Email": "",
"UserIdentity": "",
"ConsumerIdentity": "",
"Birthday": null
},
"Products": [
{
"ProductId": "123",
"ProductName": "Name",
"ProductCategory": "Food",
"ProductDescription": "Description of Product",
"ProductAmount": 1
}
]
}
The parameters returned from the service are as follows:
ErrorCode
int
Error code. Returns a value of '0' if the operation is successful.
Result
bool
Returns a value of true or false. Returns true if the operation is successful.
Message
string
If the operation fails, this is the message indicating the error. It provides language support according to the locale parameter.
Body
object
If the operation fails, this is the detailed object regarding the error.
{
"ErrorCode": 0,
"Result": true,
"Message": "",
"Body": {
"RedirectUrl": "https://dev-payment-agent.itspaywall.com/paywall/callbackapm?UniqueNumber=dd224827-8433-45f7-9454-97025e57fa9e",
"Transaction": {
"ApmTransactionId": 29,
"UniqueCode": "dd224827-8433-45f7-9454-97025e57fa9e",
"MerchantUniqueCode": "TESTMERCHANTUNIQUECODE",
"Amount": 1.0
}
}
}
Last updated