Processing AFT

AFT uses the standard checkout and order endpoints:

  • /payment/checkout

  • /payment/order


Oneshot / 1ST AFT transaction

When you want to process oneshot AFT transaction or 1st AFT transaction which you will tokenize as recurring, you need to full set of details about the customer. These details are sent in destination_account specific fields.

 "destination_account_first_name": "Jogn",
 "destination_account_last_name": "Doe",
 "destination_account_street_name": "12 avenue de la paix",
 "destination_account_city": "Paris",
 "destination_account_country": "FR",
 "destination_account_state": "Paris",
 "destination_account_zip_code": "75001",
 "destination_account_number": "100000"
 "destination_account_is_customer": false // read more below
 "destination_account_number" // destination account number, could be used instead of destination account token
 "destination_account_token" // the card token related to the destination account
 "destination_account_id" // eg. wallet id
Field destination_account_is_customer is a boolean. Set to true in case you already use customer related fields, eg. customer_first_name, customer_last_name, etc. In such case, you won't need to duplicate the information in account destination related fields, as we will use already provided values. Otherwise set to false and provide destination account information.

To identify a transaction as AFT, the request must also include:

{
  "is_aft": true
}

Destination account details can be provided:

  • during checkout creation
  • during order creation
  • or split across both requests depending on the integration flow

Recurring AFT

For recurring transactions, previously tokenized destination account data can be reused, meaning destination account holder details no longer need to be sent. Make sure to send the following:

"token" // reccuring token of a funding account card
"destinaion_account_token" // recurring token of a destination account card
"destination_account_id" 

AFT Flow Overview

  • Create an AFT checkout using the standard checkout endpoint
  • Tokenize the funding/source card and the destination account card using standard token endpoint
For oneshot AFT, use token_type: oneshot. For recurring AFT, use token_type: recurring

  • Create the AFT order using the standard order endpoint.

Provide received tokens in the order request:

token - token received during funding/source card tokenization

destination_account_token - token received during destination account card tokenization

Include destination_account_type: card

Ready to test payloads

Oneshot/Initial AFT

CHECKOUT

POST /payment/checkout

{
    "customer_ip": "1.146.189.72",
    "type": "api",
    "currency": "EUR",
    "authentication_indicator": "ask_3ds",
    "operation_type": "direct_capture",
    "order_merchant_id": "BDM-AFT-initial",
    "amount": 10,
    "payment_channel": "e-commerce",
    "customer_country": "NL",
    "merchant_contract": "69fb373bacda23a62375d5b0",
    "website_url": "https://testwebsite.io",
    "customer_email": "[email protected]",
    "locale": "en_GB",
    "is_aft": true,
    "destination_account_first_name": "John",
    "destination_account_last_name": "Doe",
    "destination_account_street_name": "12 avenue de la paix",
    "destination_account_city": "Paris",
    "destination_account_country": "FR",
    "destination_account_state": "Paris",
    "destination_account_zip_code": "75001",
    "destination_account_is_customer": false,
    "pending_url": "https://google.com/pending",
    "exception_url": "https://google.com",
    "cancel_url": "https://google.com/cancel",
    "accept_url": "https://google.com/accept",
    "decline_url": "https://google.com/decline",

}
If you use more than one Partner to process AFT, you can include merchant_contract in your request. If you use only one Partner to process AFT, your AFT transaction will autmatically go to this Partner.

TOKENIZATION

POST /token

{
	"card_number": "4165987113845987",
	"card_validity_month": "10",
	"card_validity_year": "2029",
	"cvc": "252",
	"customer_scheme_name": "visa",
	"token_type": "oneshot"
}
{
	"card_number": "4165987113845987",
	"card_validity_month": "10",
	"card_validity_year": "2029",
	"cvc": "252",
	"customer_scheme_name": "visa",
	"token_type": "recurring"
}

For tokenizing destination account card, please use the same requests.

Reach out to Support to receive card numbers for testing AFT.

ORDER

POST /payment/order

{
    "operation_type": "direct_capture",
    "token": "fe0db0ebedda04ba6cde6358f8338b8dc87e3052ba48ca94ef222e4c45e43761",
    "payment_channel": "e-commerce",
    "amount": 10,
    "currency": "EUR",
    "merchant_contract": "69fb373bacda23a62375d5b0",
    "authentication_indicator": "ask_3ds",
    "order_merchant_id": "984792790",
    "is_aft": true,
    "destination_account_type": "card",
    "destination_account_token": "3554757d2b2039e34d4f43950ba1ac475904492b9d03d2b964f237ad51a0ec16",
    "destination_account_id": "0635656565",
    "checkout_id": "69fdb200cf4304374840f130"
}

Recurring AFT

If you tokenized the funding and destination account cards with recurring token type, you can process to make the AFT, providing only the following AFT related details:

"is_aft": true,
"destination_account_type": "card",
"destination_account_token": "3554757d2b2039e34d4f43950ba1ac475904492b9d03d2b964f237ad51a0ec16",
 "destination_account_id": "0635656565"

Full order request example for recurring AFT

{
    "operation_type": "direct_capture",
    "token": "fe0db0ebedda04ba6cde6358f8338b8dc87e3052ba48ca94ef222e4c45e43761",
    "payment_channel": "e-commerce",
    "amount": 9.99,
    "currency": "EUR",
    "is_aft": true,
    "merchant_contract": "69fb373bacda23a62375d5b0",
    "authentication_indicator": "no_3ds",
    "order_merchant_id": "0483902870",
    "destination_account_type": "card",
    "destination_account_token": "3554757d2b2039e34d4f43950ba1ac475904492b9d03d2b964f237ad51a0ec16",
    "destination_account_id": "0635656565"
}
If your flow requires it, it could also process recurring AFT with checkout and order request. In such case, please make sure to provide checkout_id in the order request.

For a full, row API reference regarding AFT, please visit the following API reference sections: checkout, tokenization, order.