1. Confirm Payment
This is a method you can use for payments initiated with connected APM providers (OTP-Based). Through this method, you can confirm payments with OTPs delivered to users.
Confirm Payment / OTP-Based
POST
{{Base Adres}}/api/paywall/apm/pay/confirm/otp
The parameters (HEADERS) 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 (BODY) that need to be sent to the service are as follows:
UniqueCode
string
Yes
It is the UniqueCode parameter of the APM payment. It is included in the response returned by the API at the time of creation.
Otp
string
Yes
It represents the OTP code transmitted to the user by the provider for the APM payment. It should be obtained from the user through your screens.
An example JSON file to be sent to the service is as follows:
{
"UniqueCode": "cda31a20-5089-40c6-9fb4-7bd89b2a2a04",
"Otp": "10188"
}
The parameters returned from the service are as follows:
ErrorCode
int
Error code. Returns '0' if the operation is successful.
Result
bool
It returns a value of true or false. Returns 'true' if the operation is successful.
Message
string
If the operation is unsuccessful, this is the specified error message, providing language support according to the locale parameter.
Body
object
If the operation is unsuccessful, this is the detailed object regarding the error.
{
"ErrorCode": 0,
"Result": true,
"Message": "",
"Body": {
"ApmKey": "FoodCardProvider",
"ApmConnectionId": 19,
"ApmTransactionId": 4292,
"UniqueCode": "cda31a20-5089-40c6-9fb4-7bd89b2a2a04",
"MerchantUniqueCode": "A1s2d3F774G5H6J7K8L9",
"Amount": 1.00,
"ProviderDummyResponse": {
"ErrorCode": 0,
"Body": {
"ResponseCode": 0,
"ResponseMessage": "Harcama başarılı.",
"MerchantCode": "*********",
"TerminalCode": "*********",
"CardNo": "637******467",
"SaleRefCode": "cda31a20-5089-40c6-9fb4-7bd89b2a2a04",
"TransactionId": 111111111,
"TransactionAmount": 1.0,
"BatchNo": 1,
"Balance": "19999.0",
"CardOwner": "Paywall Payment Orchestration",
"ProductName": ""
},
"HttpCode": 200
}
}
}
Last updated