Requests

      Requests


        Article summary

        Pay

        The default action for

        Base JSON request

        Use the base request as instructed on this page

        Pay request

        Parameters

        Service specific parameters

        ParameterTypeRequiredRecommendedDescription
        UseMobileViewbooleanRequiredBoolean: 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

        Example request

        {
           "Currency": "EUR",
           "AmountDebit": 0.01,
           "Invoice": "testinvoice 1234",
           "Services": {
              "ServiceList": [
                 {
                    "Name": "Alipay",
                    "Action": "Pay",
                    "Parameters": [
                       {
                          "Name": "UseMobileView",
                          "Value": "true"
                       }
                    ]
                 }
              ]
           }
        }
        

        Pay response

        The consumer needs to be redirected to the RedirectURL provided in the response. From there either the Alipay app will be initiated on the consumer's device or a QR code will be shown, depending on the value given for UseMobileView.

        Parameters

        Basic parameters

        Example 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 successful completion of the payment by the consumer, a push response will follow with the final transaction status.

        Parameters

        Basic parameters

        Example 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

        This action can be used to perform a refund on a Alipay transaction.

        Base JSON request

        Use the base request as instructed on this page

        Refund request

        Parameters

        Service specific parameters

        ParameterTypeRequiredRecommendedDescription
        OriginalTransactionKeystringYesKey of the original transaction that needs to be refunded.
        Basic parameters

        Example request

        {
           "Currency": "EUR",
           "AmountCredit": 0.01,
           "Invoice": "testinvoice 1234",
           "OriginalTransactionKey": "A1813E0EC8D04B0788515B511A9A7xxx",
           "Services": {
              "ServiceList": [
                 {
                    "Name": "alipay",
                    "Action": "refund"
                 }
              ]
           }
        }
        

        Refund response

        Parameters

        Service specific parameters

        ParameterTypeRequiredRecommendedDescription
        Basic parameters

        Example 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

        Parameters

        Service specific parameters

        ParameterTypeRequiredRecommendedDescription
        Basic parameters

        Example 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
           }
        }
        

        Was this article helpful?

        What's Next