General

Old Afterpay Service

This documentation describes Buckaroo's current Afterpay service. Starting from Q2 2019, the new Afterpay service will be launched. Merchants with a new AfterPay contract with Buckaroo (and only Buckaroo), not a contract with both Buckaroo and AfterPay, are required to implement the new service. If you are uncertain which situation applies to you or your customer, please contact your (customer's) account manager at Buckaroo for enquiry.

Afterpay

AfterPay provides the option for customers to pay afterwards using a digital invoice or by direct debit. The concept includes a review of the customer before overtaking the financial part of the transaction by AfterPay. This way the merchant does not hold any financial risk when offering the product to the customer.

Servicecodes and actions

The Afterpay service uses the service codes afterpayacceptgiro (to pay by SEPA Direct debit) and afterpaydigiaccept (to pay by digital invoice).

Both Afterpay services support the following actions: Pay, Refund, Authorize, Capture, CancelAuthorize (all channel "WEB" supported).

Pay

Performing this action results in a credit check of the customer with Afterpay. If it's succesful, an order will be created at Afterpay and they will sent an invoice to the customer for payment completion (which will be handled by Afterpay). Buckaroo only registers the transaction to confirm the order. Note 1: The invoicenumber for AfterPay can have a maximum length of 20 characters. Note 2: In the default situation, Buckaroo generates a unique ordernumber and sends this to AfterPay alongside the invoicenumber. However, the basic parameter “order” can be used to send an ordernumber to Buckaroo which Buckaroo will send to AfterPay. This ordernumber will be shown on the invoice that AfterPay sends to the customer. It may be the same as the invoicenumber, has to be 2-25 characters long, may only contain a-z, A-Z, 0-9, dahes (-) and underscores (_) and always has to be unique.

View in playground

Request


JSON gateway request

BillingTitle

Title of the billing customer.

BillingGender

Gender of the billing customer. Male (1) Female (2) Not required in case of B2B.

BillingInitials
Required

Initials of the billing customer.

BillingLastNamePrefix

Last name prefix of the billing customer.

BillingLastName
Required

Last name of the billing customer.

BillingBirthDate
Required

Birthdate of the billing customer. In case of B2B a dummy value is allowed.

BillingStreet
Required

Street of the billing customer.

BillingHouseNumber
Required

House number of the billing customer.

BillingHouseNumberSuffix

House number suffix of the billing customer.

BillingPostalCode
Required

Postal code of the billing customer.

BillingCity
Required

City of the billing customer.

BillingCountry
Required

Country code of the billing customer, e.g. NL.

BillingEmail
Required

E-mail of the billing customer.

BillingPhoneNumber
Required

Phone number of the billing customer. Prefix such as +31, 31 and 0031 allowed. Without prefix has to be 10 characters, so no spaces ( ) or dashes (-).

BillingLanguage
Required

Language code of the billing customer, e.g. nl.

AddressesDiffer

Set to true if the shipping address is different from the billing address.

ShippingTitle

Title of the shipping customer.

ShippingGender

Gender of the shipping customer.

ShippingInitials

Initials of the shipping customer.

ShippingLastNamePrefix

Last name prefix of the shipping customer.

ShippingLastName

Last name of the shipping customer.

ShippingBirthDate

Birthdate of the shipping customer.

ShippingStreet

Street of the shipping customer.

ShippingHouseNumber

House number of the shipping customer.

ShippingHouseNumberSuffix

House number suffix of the shipping customer.

ShippingPostalCode

Postal code of the shipping customer.

ShippingCity

City of the shipping customer.

ShippingCountryCode

Country code of the shipping customer.

ShippingEmail

E-mail of the shipping customer.

ShippingPhoneNumber

Phone number of the shipping customer.

ShippingLanguage

Language code of the shipping customer.

ShippingCosts

Shipping costs.

CustomerAccountNumber
Required

Bank account number of the customer. Only required with the service afterpayacceptgiro.

CustomerIPAddress
Required

IP address of the customer.

ArticleDescription
Required

Description of the bought article. Sent this variable with the GroupType "Article" and a chosen GroupID.

ArticleId
Required

ID of the bought article. Sent this variable with GroupType "Article" and a chosen GroupID.

ArticleQuantity
Required

Quantity of the bought article. Sent this variable with GroupType "Article" and a chosen GroupID.

ArticleUnitprice
Required

Unit price of the bought article. Unit price can be negative amount to support discounts. Sent this variable with GroupType "Article" and a chosen GroupID.

ArticleVatcategory
Required

VAT category of the bought article. 1 = High rate, 2 = Low rate, 3 = Zero rate, 4 = Null rate, 5 = middle rate. Sent this variable with GroupType "Article" and a chosen GroupID.

B2B

Whether the customer is a consumer or a company. Set to true if the order is billed to a company (only available in the Netherlands). Allowing B2B requires separate credentials from AfterPay.

CompanyCOCRegistration

COC (KvK) number. Required if B2B is set to true.

CompanyName

Name of the organization. Required if B2B is set to true.

CostCentre

Cost centre of the order.

Department

Name of the department.

EstablishmentNumber

Number of the establishment.

VatNumber

VAT (BTW) number.

Accept
Required

Were the license agreements accepted by the customer? Make sure you link to the following page when you are having the customer accept the agreement on your own checkout: https://www.afterpay.nl/nl/algemeen/betalen-met-afterpay/betalingsvoorwaarden

JSON

copy
{
   "Currency": "EUR",
   "AmountDebit": 10,
   "Invoice": "testinvoice 1234",
   "Services": {
      "ServiceList": [
         {
            "Name": "afterpaydigiaccept",
            "Action": "Pay",
            "Parameters": [
               {
                  "Name": "Accept",
                  "Value": "TRUE"
               },
               {
                  "Name": "BillingGender",
                  "Value": "1"
               },
               {
                  "Name": "BillingInitials",
                  "Value": "TA"
               },
               {
                  "Name": "BillingLastName",
                  "Value": "Acceptatie"
               },
               {
                  "Name": "BillingBirthDate",
                  "Value": "01-01-1990"
               },
               {
                  "Name": "BillingStreet",
                  "Value": "Hoofdstraat"
               },
               {
                  "Name": "BillingHouseNumber",
                  "Value": "90"
               },
               {
                  "Name": "BillingPostalCode",
                  "Value": "8441ER"
               },
               {
                  "Name": "BillingCity",
                  "Value": "Heerenveen"
               },
               {
                  "Name": "BillingCountry",
                  "Value": "NL"
               },
               {
                  "Name": "BillingEmail",
                  "Value": "xxxxx@xxx.nl"
               },
               {
                  "Name": "BillingPhoneNumber",
                  "Value": "0612345678"
               },
               {
                  "Name": "BillingLanguage",
                  "Value": "NL"
               },
               {
                  "Name": "ShippingTitle",
                  "Value": ""
               },
               {
                  "Name": "ShippingGender",
                  "Value": "0"
               },
               {
                  "Name": "ShippingInitials",
                  "Value": "TA"
               },
               {
                  "Name": "ShippingLastName",
                  "Value": "Aflever"
               },
               {
                  "Name": "ShippingBirthDate",
                  "Value": "01-01-1990"
               },
               {
                  "Name": "ShippingStreet",
                  "Value": "Afleverstraat"
               },
               {
                  "Name": "ShippingHouseNumber",
                  "Value": "1"
               },
               {
                  "Name": "ShippingPostalCode",
                  "Value": "8441ER"
               },
               {
                  "Name": "ShippingCity",
                  "Value": "Heerenveen"
               },
               {
                  "Name": "ShippingCountryCode",
                  "Value": "NL"
               },
               {
                  "Name": "ShippingEmail",
                  "Value": "xxxx@xxxxxx.nl"
               },
               {
                  "Name": "ShippingPhoneNumber",
                  "Value": "0610000000"
               },
               {
                  "Name": "ShippingLanguage",
                  "Value": "NL"
               },
               {
                  "Name": "AddressesDiffer",
                  "Value": "TRUE"
               },
               {
                  "Name": "B2B",
                  "Value": "FALSE"
               },
               {
                  "Name": "CustomerIPAddress",
                  "Value": "0.0.0.0"
               },
               {
                  "Name": "ArticleDescription",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "Blue Toy Car"
               },
               {
                  "Name": "ArticleId",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "12345"
               },
               {
                  "Name": "ArticleQuantity",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "1"
               },
               {
                  "Name": "ArticleUnitprice",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "10.00"
               },
               {
                  "Name": "ArticleVatcategory",
                  "GroupType": "Article",
                  "GroupID": "1",
                  "Value": "1"
               }
            ]
         }
      ]
   }
}

Response


JSON gateway response

JSON

copy
{
   "Key": "DC156377D9F14A15A715E4E84XXXXXX",
   "Status": {
      "Code": {
         "Code": 190,
         "Description": "Success"
      },
      "SubCode": {
         "Code": "S001",
         "Description": "Transaction successfully processed"
      },
      "DateTime": "2017-07-17T15:41:18"
   },
   "RequiredAction": null,
   "Services": null,
   "CustomParameters": {
      "List": [
         {
            "Name": "AfterpayOrderNumber",
            "Value": "47453822XXX"
         }
      ]
   },
   "AdditionalParameters": null,
   "RequestErrors": null,
   "Invoice": "testinvoice 1234",
   "ServiceCode": "afterpaydigiaccept",
   "IsTest": true,
   "Currency": "EUR",
   "AmountDebit": 10,
   "TransactionType": "C011",
   "MutationType": 1,
   "RelatedTransactions": null,
   "ConsumerMessage": null,
   "Order": null,
   "IssuingCountry": null,
   "StartRecurrent": false,
   "Recurring": false,
   "CustomerName": "TA Acceptatie",
   "PayerHash": null,
   "PaymentKey": "014105AEA9844C56A97F1D60DXXXXXX"
}

Push


JSON push response

JSON

copy
{
   "Transaction": {
      "Key": "DC156377D9F14A15A715E4E84D9XXXX",
      "Invoice": "testinvoice 1234",
      "ServiceCode": "afterpaydigiaccept",
      "Status": {
         "Code": {
            "Code": 190,
            "Description": "Success"
         },
         "SubCode": {
            "Code": "S001",
            "Description": "Transaction successfully processed"
         },
         "DateTime": "2017-07-17T15:41:18"
      },
      "IsTest": true,
      "Order": null,
      "Currency": "EUR",
      "AmountDebit": 10,
      "TransactionType": "C011",
      "Services": null,
      "CustomParameters": [
         {
            "Name": "AfterpayOrderNumber",
            "Value": "4745382XXXX"
         }
      ],
      "AdditionalParameters": null,
      "MutationType": 1,
      "RelatedTransactions": null,
      "IsCancelable": false,
      "IssuingCountry": null,
      "StartRecurrent": false,
      "Recurring": false,
      "CustomerName": "TA Acceptatie",
      "PayerHash": null,
      "PaymentKey": "014105AEA9844C56A97F1D60DAEXXXX"
   }
}

Refund

A Refund can be done on a succesful Pay transaction. It is mandatory to send in the articles (and their information) if it's a partial refund.

View in playground

Request


JSON gateway request

This is an example of a partial refund and therefore the article information is required. For a full refund, only the OriginalTransactionKey is required.

OriginalTransaction
Required

Transaction key of the authorization transaction to be captured. Note: This a basic field not a service specific one.

JSON

copy
{
   "Currency": "EUR",
   "AmountCredit": 1,
   "Invoice": "testinvoice 123",
   "OriginalTransactionKey": "DC156377D9F14A15A715E4E84D9XXXX",
   "Services": {
      "ServiceList": [
         {
            "Name": "afterpaydigiaccept",
            "Action": "Refund",
            "Parameters": [
               {
                  "Name": "ArticleDescription",
                  "Value": "Blue Toy Car"
               },
               {
                  "Name": "ArticleId",
                  "Value": "1"
               },
               {
                  "Name": "ArticleQuantity",
                  "Value": "1"
               },
               {
                  "Name": "ArticleUnitprice",
                  "Value": "1.00"
               },
               {
                  "Name": "ArticleVatcategory",
                  "Value": "1"
               }
            ]
         }
      ]
   }
}

Response


JSON gateway response

JSON

copy
{
   "Key": "84F471FC509E44ECAFEFEB2B4C1XXXX",
   "Status": {
      "Code": {
         "Code": 190,
         "Description": "Success"
      },
      "SubCode": {
         "Code": "S001",
         "Description": "Transaction successfully processed"
      },
      "DateTime": "2017-07-20T14:05:45"
   },
   "RequiredAction": null,
   "Services": null,
   "CustomParameters": {
      "List": [
         {
            "Name": "AfterpayOrderNumber",
            "Value": "474538222052"
         }
      ]
   },
   "AdditionalParameters": null,
   "RequestErrors": null,
   "Invoice": "testinvoice 123",
   "ServiceCode": "afterpaydigiaccept",
   "IsTest": true,
   "Currency": "EUR",
   "AmountCredit": 1,
   "TransactionType": "C013",
   "MutationType": 1,
   "RelatedTransactions": [
      {
         "RelationType": "refund",
         "RelatedTransactionKey": "DC156377D9F14A15A715E4E84D9XXXX"
      }
   ],
   "ConsumerMessage": null,
   "Order": null,
   "IssuingCountry": null,
   "StartRecurrent": false,
   "Recurring": false,
   "CustomerName": "TA Acceptatie",
   "PayerHash": null,
   "PaymentKey": "7913BCAA77FE463989109722388XXXX"
}

Push


JSON push response

JSON

copy
{
   "Transaction": {
      "Key": "84F471FC509E44ECAFEFEB2B4C1XXXX",
      "Invoice": "testinvoice 123",
      "ServiceCode": "afterpaydigiaccept",
      "Status": {
         "Code": {
            "Code": 190,
            "Description": "Success"
         },
         "SubCode": null,
         "DateTime": "2017-07-20T14:05:45"
      },
      "IsTest": true,
      "Order": null,
      "Currency": "EUR",
      "AmountCredit": 1,
      "TransactionType": "C013",
      "Services": null,
      "CustomParameters": [
         {
            "Name": "AfterpayOrderNumber",
            "Value": "474538222052"
         }
      ],
      "AdditionalParameters": null,
      "MutationType": 1,
      "RelatedTransactions": [
         {
            "RelationType": "refund",
            "RelatedTransactionKey": "DC156377D9F14A15A715E4E84D9XXXX"
         }
      ],
      "IsCancelable": false,
      "IssuingCountry": null,
      "StartRecurrent": false,
      "Recurring": false,
      "CustomerName": "TA Acceptatie",
      "PayerHash": null,
      "PaymentKey": null
   }
}

Authorize

Performing an Authorize action results in a credit check of the customer with Afterpay. If succesful, an order will be placed, but no invoice will be sent to the customer yet. Perform a Capture request to initiate the latter.

An Authorize request is the same as a Pay request. The only difference is the action name.

Capture

A Capture request can only be done on a succesful Authorize transaction. If the capture is succesful, an invoice will be sent to the customer.

The request is the same as a Refund request. The only difference is that you sent in an AmountDebit instead of an AmountCredit. Lastly, the OriginalTransactionKey should be of an Authorization transaction.

CancelAuthorize

After an authorize is done, but it isn’t necessary to do a capture for this total amount, it is possible to do a cancelauthorize for the rest of the outstanding amount. Independent which amount will be filled in, the total outstanding amount will be cancelled. The request is the same as a Refund request; you only require the OriginalTransactionKey of an Authorize transaction, sent in an AmountCredit and use the action name CancelAuthorize.