1. Create Payment
It's a method used to initiate payments with connected APM providers (QR-based). Through this method, payments are facilitated by displaying a QR code to users for scanning and completing transactions
Initiate Payment / QR-Based
POST
{{Base Adres}}/api/paywall/apm/pay/qr/generate
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
int
Yes (Conditional)
The Key information of the APM provider.
Bkz: APM
ApmConnectionId
int
Yes (Conditional)
It is the Id (identifier) information obtained from the APM listing service connections. In scenarios where you dynamically generate your payment screen, you can initiate payments through the relevant connection using this parameter.
MerchantUniqueCode
string
Yes
The unique identifier generated for the payment.
Amount
decimal
Yes
The payment amount
Description
string
Yes
Description of the payment. Depending on the provider, this description may be displayed on the payment screen.
Provider
object
No
This is used when there are specific information requirements from the provider. It is not currently active for QR-based payments and can be passed as null.
UserRedirectUrl
string
No
This is the address provided for redirection in wallet applications where scanning the QR code and successful payment may lead the user.
MerchantSuccessBackUrl
string
Yes
This is the address where the successful result of the payment will be reported via POST.
MerchantFailBackUrl
string
Yes
This is the address where the unsuccessful result of the payment will be reported via POST.
An example JSON file to be sent to the service is as follows:
{
"ApmKey": "papara",
"ApmConnectionId": null, // Eğer bağlantı kimlik Id'sini biliyorsanız
"CurrencyId": 1,
"MerchantUniqueCode": "55555454544333545435",
"UserRedirectUrl": "https://merchantsite.com/?paymentId=13114141",
"MerchantSuccessBackUrl": "https://merchantsite.com/callback/success",
"MerchantFailBackUrl": "https://merchantsite.com/callback/fail",
"Amount": 1,
"Description": "PW 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. If the transaction is successful, it returns a value of '0'.
Result
bool
It returns a boolean value, where 'true' indicates a successful transaction.
Message
string
If the transaction fails, this message specifies the error, providing language support based on the 'locale' parameter.
Body
object
If the transaction fails, this object provides details about the error.
Body:FormatType
int
It indicates the format of the QR code.
Bkz: Formatlar
{
"ErrorCode": 0,
"Result": true,
"Message": "",
"Body": {
"ApmKey": "ProviderKey",
"ApmConnectionId": 62,
"ApmTransactionId": 11676,
"UniqueCode": "273162b1-ffae-45c6-9e22-724ca27f826a",
"MerchantUniqueCode": "55555454544333545435",
"Amount": 1.0,
"QrDetail": {
"FormatType": 1,
"Content": "%BASE64CONTENT%"
}
}
}
Last updated