Requests
Pay
Note
Use the base request as instructed on this page.
Parameters
- Service-Specific Parameters:
Parameter | Type | Required | Recommended | Description |
---|---|---|---|---|
UseMobileView | boolean | Required | Boolean: true or false. It is important to identify if the consumer is on a mobile device or not. If yes, then send value true. This will enable the Alipay app to be opened on the consumer's mobile device. If not, then send value false. The consumer will then be shown a QR code to scan. |
- Basic Parameters:
- Find basic parameters here.
Example Pay Request
{
"Currency": "EUR",
"AmountDebit": 0.01,
"Invoice": "testinvoice 1234",
"Services": {
"ServiceList": [
{
"Name": "Alipay",
"Action": "Pay",
"Parameters": [
{
"Name": "UseMobileView",
"Value": "true"
}
]
}
]
}
}
Pay Response
After sending the pay request, the consumer will need to be redirected to the provided RedirectURL
. This URL will either open the Alipay app on the consumer's device or display a QR code, based on the UseMobileView
parameter.
Example Pay Response
{
"Key": "A1813E0EC8D04B0788515B511A9A7xxx",
"Status": {
"Code": {
"Code": 791,
"Description": "Pending processing"
},
"SubCode": {
"Code": "S002",
"Description": "An additional action is required: Redirect to Alipay."
},
"DateTime": "2019-08-07T12:35:26"
},
"RequiredAction": {
"RedirectURL": "https://testcheckout.buckaroo.nl/html/redirect.ashx?r=2AB53A4132A14E508D3CB98B47E72xxx",
"RequestedInformation": null,
"PayRemainderDetails": null,
"Name": "Redirect",
"TypeDeprecated": 0
},
"Services": null,
"CustomParameters": null,
"AdditionalParameters": null,
"RequestErrors": null,
"Invoice": "testinvoice 1234",
"ServiceCode": "Alipay",
"IsTest": true,
"Currency": "EUR",
"AmountDebit": 0.01,
"TransactionType": "C052",
"MutationType": 1,
"RelatedTransactions": null,
"ConsumerMessage": null,
"Order": null,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": null,
"PayerHash": null,
"PaymentKey": "CC60B93D3F3A444E9FE3AF6C2645xxx"
}
Pay Push
After the consumer completes the payment, a push notification will provide the final transaction status.
Example Pay Push
{
"Transaction": {
"Key": "A1813E0EC8D04B0788515B511A9A7xxx",
"Invoice": "Testinvoice 1234",
"ServiceCode": "Alipay",
"Status": {
"Code": {
"Code": 190,
"Description": "Success"
},
"SubCode": {
"Code": "S990",
"Description": "The request was successful."
},
"DateTime": "2019-08-07T12:35:34"
},
"IsTest": true,
"Order": null,
"Currency": "EUR",
"AmountDebit": 0.01,
"TransactionType": "C052",
"Services": null,
"CustomParameters": null,
"AdditionalParameters": null,
"MutationType": 1,
"RelatedTransactions": null,
"IsCancelable": false,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": null,
"PayerHash": null,
"PaymentKey": "CC60B93D3F3A444E9FE3AF6C26450xxx"
}
}
Refund
Refund Request
To perform a refund on an Alipay transaction, use the following JSON request structure.
Refund Request Parameters
- Service-Specific Parameters:
Parameter | Type | Required | Recommended | Description |
---|---|---|---|---|
OriginalTransactionKey | string | Yes | Key of the original transaction that needs to be refunded. |
Example Refund Request
{
"Currency": "EUR",
"AmountCredit": 0.01,
"Invoice": "testinvoice 1234",
"OriginalTransactionKey": "A1813E0EC8D04B0788515B511A9A7xxx",
"Services": {
"ServiceList": [
{
"Name": "alipay",
"Action": "refund"
}
]
}
}
Refund Response
After sending the refund request, you will receive a response indicating the status of the refund.
Example Refund Response
{
"Key": "A091F48174544F81A369F9C5C49BDxxx",
"Status": {
"Code": {
"Code": 190,
"Description": "Success"
},
"SubCode": {
"Code": "S990",
"Description": "The request was successful."
},
"DateTime": "2019-08-21T16:31:52"
},
"RequiredAction": null,
"Services": null,
"CustomParameters": null,
"AdditionalParameters": null,
"RequestErrors": null,
"Invoice": "testinvoice 1234",
"ServiceCode": "Alipay",
"IsTest": true,
"Currency": "EUR",
"AmountCredit": 0.01,
"TransactionType": "C053",
"MutationType": 1,
"RelatedTransactions": [
{
"RelationType": "refund",
"RelatedTransactionKey": "A1813E0EC8D04B0788515B511A9A7xxx"
}
],
"ConsumerMessage": null,
"Order": null,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": null,
"PayerHash": null,
"PaymentKey": "A6044F3C04F847668A7A1C4EA63CDxxx"
}
Refund Push
Example Refund Push
{
"Transaction": {
"Key": "A091F48174544F81A369F9C5C49BDxxx",
"Invoice": "testinvoice 1234",
"ServiceCode": "Alipay",
"Status": {
"Code": {
"Code": 190,
"Description": "Success"
},
"SubCode": null,
"DateTime": "2019-08-21T16:31:52"
},
"IsTest": true,
"Order": null,
"Currency": "EUR",
"AmountCredit": 0.01,
"TransactionType": "C053",
"Services": null,
"CustomParameters": null,
"AdditionalParameters": null,
"MutationType": 1,
"RelatedTransactions": [
{
"RelationType": "refund",
"RelatedTransactionKey": "A1813E0EC8D04B0788515B511A9A7xxx"
}
],
"IsCancelable": false,
"IssuingCountry": null,
"StartRecurrent": false,
"Recurring": false,
"CustomerName": null,
"PayerHash": null,
"PaymentKey": null
}
}
Updated about 1 month ago