Posting a Transfer

Discover how to retrieve quote details, validate funds, and create a transfer.

🚧

API Users

This documentation is specific to the ReadyRemit SDKs. See Create Transfer for more details.

📘

Authentication

A valid access token is required for this process. For more information, please see the documentation on Authentication.

1. Get Quote Details

The quoteHistoryId property is provided in the payload passed to the host application.

{
  "dstCountryIso3Code": "JPN",
  "dstCurrencyIso3Code": "JPY",
  "transferMethod": "BANK_ACCOUNT",
  "srcCurrencyIso3Code": "USD",
  "quoteBy": "SEND_AMOUNT",
  "amount": 3055,
  "fee": 499,
  "recipientId": "51e93d0c-1a6f-4474-a8a7-93ed8b2aa06f",
  "recipientAccountId": "10dc1426-e726-40cc-8a20-93765f2c2048",
  "quoteHistoryId": "1f347698-7f48-4b69-931f-176ac6c41198",
  "fields": [
    {
      "id": "SOURCE_OF_FUNDS",
      "value": "3"
    }, {
      "id": "REMITTANCE_PURPOSE",
      "value": "39"
    }
  ],
}
{
  "transferMethod": "PUSH_TO_CARD",
  "quoteBy": "SEND_AMOUNT",
  "dstCountryIso3Code": "USA",
  "dstCurrencyIso3Code": "USD",
  "srcCurrencyIso3Code": "USD",
  "amount": 3055,
  "fee": 499,
  "recipientId": "4d5a7d05-cce5-49ec-ad67-7b5eb7035e5a",
  "recipientAccountId": "04eda1ab-664b-4983-a3a1-9c2ab9181895",
  "quoteHistoryId": "7345e138-dbfe-4f7a-8c66-fb5bdb52ecc9",
  "fields": [
    {
      "id": "CARD_PROXY_NUMBER",
      "value": 267832567846347900
    }
  ]
}
{
  "transferMethod": "CASH_PICKUP",
  "quoteBy": "SEND_AMOUNT",
  "dstCountryIso3Code": "MEX",
  "dstCurrencyIso3Code": "MXN",
  "srcCurrencyIso3Code": "USD",
  "amount": 3055,
  "fee": 499,
  "recipientId": "fe40f74d-eb52-4034-a2f8-8e478730ad9f",
  "quoteHistoryId": "96d7413b-4921-4fa4-9fe3-0389498d04a3",
  "fields": [
    {
      "id": "PAYER_STATE_PROVINCE",
      "value": "M0005"
    },
    {
      "id": "PAYER_CITY",
      "value": "57790"
    },
    {
      "id": "PAYER",
      "value": "MX06"
    },
    {
      "id": "PAYER_LOCATION",
      "value": "MX060373"
    }
  ]
}
{
  language: "en-US",
  transfer: {
    quoteBy: "SEND_AMOUNT",
    quoteHistoryId: "96d7413b-4921-4fa4-9fe3-0389498d04a3",
    recipientId: "fe40f74d-eb52-4034-a2f8-8e478730ad9f",
    recipientAccountId: "10dc1426-e726-40cc-8a20-93765f2c2048"
}

Get Quote Details

curl --request GET \
     --url https://sandbox-api.readyremit.com/v1/quote/{{quote_history_id}} \
     --header 'authorization: Bearer {{accesss_token}}' \
     --header 'accept: application/json'

{
  "sendAmount": {
    "value": 3055,
    "currency": {
      "name": "US Dollar",
      "iso3Code": "USD",
      "symbol": "$",
      "decimalPlaces": 2,
      "roundDirection": "STANDARD",
      "iso4217Code": "840"
    }
  },
  "totalCost": {
    "value": 3554,
    "currency": {
      "name": "US Dollar",
      "iso3Code": "USD",
      "symbol": "$",
      "decimalPlaces": 2,
      "roundDirection": "STANDARD",
      "iso4217Code": "840"
    }
  },
  "destinationCountryISO3Code": "JPN",
  "destinationCurrencyISO3Code": "JPY",
  "sourceCurrencyIso3Code": "USD",
  "transferMethod": "BANK_ACCOUNT",
  "quoteHistoryId": "1f347698-7f48-4b69-931f-176ac6c41198",
  ...
}

2. Validate Funds

Confirm the source account has sufficient funds using totalCost included in the response from Get Quote Details.

Account balance >= {{total_cost}}

3. Create a Transfer

Construct the body for Create Transfer using a combination of the payload passed to the SDK and the response from Get Quote Details.

📘

Why replace fields from the SDK payload?

This step to retrieve the quote details from the API using the quoteHistoryId is in place to protect against tampering of the SDK payload on the front-end. Using the quote information from the ReadyRemit API guarantees that the transfer amount is in sync across both systems.

{
  // Source from Payload
  "quoteBy": "SEND_AMOUNT",
  "recipientId": "51e93d0c-1a6f-4474-a8a7-93ed8b2aa06f",
  "recipientAccountId": "10dc1426-e726-40cc-8a20-93765f2c2048",
  "fields": [ // if included in the payload
    {
      "id": "SOURCE_OF_FUNDS",
      "value": "3"
    }, {
      "id": "REMITTANCE_PURPOSE",
      "value": "39"
    }
  ],

  // Source from Get Quote Details
  "dstCountryIso3Code": "JPN",  // destinationCountryISO3Code
  "dstCurrencyIso3Code": "JPY",  // destinationCurrencyISO3Code
  "transferMethod": "BANK_ACCOUNT",
  "srcCurrencyIso3Code": "USD", // sourceCurrencyIso3Code
  "amount": 3055, // sendAmount.value
  "quoteHistoryId": "1f347698-7f48-4b69-931f-176ac6c41198"
}
{
  // Source from Payload
  "quoteBy": "SEND_AMOUNT",
  "recipientId": "51e93d0c-1a6f-4474-a8a7-93ed8b2aa06f",
  "recipientAccountId": "10dc1426-e726-40cc-8a20-93765f2c2048",
  "fields": [
    {
      "id": "CARD_PROXY_NUMBER",
      "value": 267832567846347900
    }
  ]

  // Source from Get Quote Details
  "dstCountryIso3Code": "MEX",  // destinationCountryISO3Code
  "dstCurrencyIso3Code": "MXN",  // destinationCurrencyISO3Code
  "transferMethod": "PUSH_TO_CARD",
  "srcCurrencyIso3Code": "USD", // sourceCurrencyIso3Code
  "amount": 3055, // sendAmount.value
  "quoteHistoryId": "1f347698-7f48-4b69-931f-176ac6c41198",
}
{
  // Source from Payload
  "quoteBy": "SEND_AMOUNT",
  "recipientId": "51e93d0c-1a6f-4474-a8a7-93ed8b2aa06f",
  "recipientAccountId": "10dc1426-e726-40cc-8a20-93765f2c2048",
  "fields": [
    {
      "id": "PAYER_STATE_PROVINCE",
      "value": "M0005"
    },
    {
      "id": "PAYER_CITY",
      "value": "57790"
    },
    {
      "id": "PAYER",
      "value": "MX06"
    },
    {
      "id": "PAYER_LOCATION",
      "value": "MX060373"
    }
  ]

  // Source from Get Quote Details
  "dstCountryIso3Code": "MEX",  // destinationCountryISO3Code
  "dstCurrencyIso3Code": "MXN",  // destinationCurrencyISO3Code
  "transferMethod": "CASH_PICKUP",
  "srcCurrencyIso3Code": "USD", // sourceCurrencyIso3Code
  "amount": 3055, // sendAmount.value
  "quoteHistoryId": "1f347698-7f48-4b69-931f-176ac6c41198",
}
curl --request POST \
     --url https://sandbox-api.readyremit.com/v1/transfers \
     --header 'authorization: Bearer {{accesss_token}}' \
     --header 'content-type: application/json' \
     --header 'accept: application/json' \
     --data '{{new_payload}}'

Note: If the call to Create Transfer times out or has an indeterminate response, refer to Exception Handling for follow up steps.