Tutorial: Originate an Account Funding Transaction (AFT)

If you are new to P2C we recommend you read the P2C overview before starting this tutorial. The tutorial assumes you have a knowledge of APIs and how they work.

An Account Funding Transaction (AFT) allows you to pull funds from a debit card for very specific purposes. You can use an AFT to fund a wallet or a prepaid card or to initiate an Person to Person (P2P) transfer using the card network rails. AFTs are not allowed for the purchase of goods and services.

In this tutorial, you'll learn how to

  • Register the relevant webhooks
  • Originate an Account Funding Transaction (AFT)

Before you begin

Make sure you have:

  • API credentials
  • Successfully registered to receive webhook event notifications
  • Registered the debit card you are pulling funds from
  • The requestId - your unique reference ID
  • The cardToken you received when you registered the card
  • The amount of money to pull from the debit card to your destination account

Register to receive a webhook events

Use this endpoint, POST /api/WebhookRegistrations, to register to receive the webhooks available for P2C. These webhooks report relevant events back to your system in real-time, keeping you up to date on each transaction.
The Transaction webhook reports when a new transaction was done.

Initiate the transfer

When you initiate a transfer, you are requesting funds (as the recipient) from a payor.

  1. Authenticate into our system and a token is returned to you.
  2. Use that token to call POST /api/PullTransaction.
curl -X POST --header 'Content-Type: application/json'
--header 'Accept: application/json' 
--header 'Authorization: Bearer 12AAB60C01ED32A0C18D44111A753BF3CE180BC716FEC06D30FC4447C2EAE6B3' -d '{ \ 
   "requestId": "00000000-0000-0130-0000-000000000000", 
   "cardToken":"KR7D47MNJIL2R39OZNRVPC0DIS82ES8JE6J7VU", 
   "amount": 400
  1. Cross River sends this request to the card networks who route the transaction to the appropriate bank.
  2. The card’s issuing bank will either authorize it or decline the transaction.
  3. If the transaction is authorized, we will respond to your API call with a response as shows below.

Sample response

{
  "version": "1.0.0.0",
  "result": {
    "transactionRequestId": "00000000-0000-0130-0000-000000000000",
    "amount": 400,
    "transactionRequestedAt": "2021-08-03T21:09:13.5882004Z",
    "transactionStatus": "Succeeded",
    "errorDescription": null,
    "creditCardId": "KR7D47MNJIL2R39OZNRVPC0DIS82ES8JE6J7VU",
    "railId": "TabaPay",
    "network": "MasterCard",
    "retrievalReferenceId": "8abcb1fa-51f1-4b2d-9998-5948877bdcc0",
    "actualTransactionDoneAt": "2021-08-03T21:09:13.937108Z",
    "requestApproved": true,
    "responseReceived": true,
    "responseCode": "00",
    "responseDescription": "Approved",
    "traceNumber": "00000000-0000-0130-0000-000000000000",
    "error": null,
    "requesterName": null,
    "requesterMcc": null
  },
  "isSuccessful": true
}
  1. Funds will be deposited into your account shortly afterwards, in compliance with the Card Network’s funds availability rules.

Did this page help you?