Send an international payment
In this tutorial, you'll learn how to:
✅ Get an estimate of the exchange rate for a cross border payment
✅ Get a list of fields required to get a valid executable quote for the payment
✅ Request an executable quote
✅ Originate a payment
✅ Deal with returned and rejected payments
If you are new to International Payments we recommend you read the International Payments (cross border money movement) overview before starting this tutorial.
The tutorial assumes you have a knowledge of APIs and how they work. For more information on sending API calls, see the API overview page
For this tutorial you'll need to understand these terms
The tutorial uses these API endpoints:
API | Description |
---|---|
Returns the estimated cost of sending an international payment, including the exchange rate | |
Returns a list of country-specific fields you need to submit when requesting a quote | |
Requests an executable payment quote for sending either USD or foreign currency before actually sending funds | |
Executes a payment quote to send funds internationally |
Make sure you have:
- Account number of the sending CR account
- Sending account configured by CR to send International Payments
- Fees configured by CR according to your signed agreement
To receive the webhook events for this tutorial you need to register each specific webhook event type. Once you are registered, the event objects are sent to the registered URLs.
A basic event object contains a list of resource identifiers used to download details on each event. An extended event object contains more details.
For this tutorial register for these webhook events:
Event Name | Description |
---|---|
International.Payment.Sent | Funds have been sent via a wire payment to the receivers bank. |
To send a payment cross border, you must make several API calls:
- Get an estimate of the fees and exchange rate. This call gives a general idea of how much the money transfer will cost the customer. We recommend you call this endpoint but it's not required.
- Determine the required fields for getting a quote for a payment to a specific country. Depending on the country, the required information can differ. It's important to know which values you must supply for the quote call to complete without errors.
- Request a quote for the exchange. This call returns a quoteId that is required to make the actual payment. The quote is usually good for 30 seconds.
- Originate the payment. Include the quoteId to use the API to send the payment.
Money amounts in API calls and responses are written without a decimal point between the dollars and the cents.
Call GET /International/v1/estimates . For this call, you must supply your CR accountNumber, the desired currency of the received payment, and either amount in USD you plan to send (fromAmount) or the amount in the foreign currency you want sent (toAmount).
In this example, the account number is 2294111782, the currency is Euros (EUR), and the from amount is 10.00 USD (1000).
IMPORT You must have a value for either a fromAmount or a toAmount, but not both.
A successful API call returns a JSON response with the details of the estimate. This estimate is non-binding and only gives you an approximate idea of what the exchange rate will be.
In this example, we provided the fromAmount. The toAmount returned is 8.51 Euros at an exchange rate of 1.1749 USD to the Euro. In addition, you can see that a regular transaction costs 6.00 USD while a priority transaction (SWIFT) costs 9.00 USD.
Call GET /International/v1/meta/quote-requirements . For this call, you must supply values for all possible attributes. None are optional.
In this example, we provide the following values:
- currency: EUR (Euros)
- beneficiaryCountry: fr (France)
- bankCountry: fr (France)
- entityType: Individual (what legal entity is receiving the payment)
- priority: true (use SWIFT to transfer the payment)
A successful API call returns a JSON response with a list of required fields/attributes you must provide values for when you call POST /International/v1/quotes.
The attributes in the response are required for the quote that will have the parameters as defined in this request. The response values describe the required responses. For example, for lastName the value is ^.{1,255}, indicating that regular expression characters are permitted, up to 255 characters maximum. The bankCountry is fr, as provided in the request. Attributes regarding entities and FIs refer to the beneficiary only
Call POST /International/v1/quotes . For this call, you must supply values for the fields returned in the the GET /International/v1/meta/quote-requirements call.
A successful API call returns a JSON response with a quote ID in the id field and information about the exchange rate. You need the quote ID to make the payment. The quote is usually valid for 30 seconds.
In this example, the quote ID is db41e69f-29fa-41ea-973c-b0cf01721474.
Call POST /International/v1/payments . For this call, you must supply the quote ID from the id field returned in the the POST /International/v1/quotes call. In this example, the quote ID is db41e69f-29fa-41ea-973c-b0cf01721474, which we received in the response. You can add a client identifier if you like.
A successful API call returns a JSON response with the payment ID in the id field and information about the payment. In this example, the payment ID is 92086a97-fdbf-4cfb-a431-b0cf0172c999.
When the payment completes an international.Payment.Sent webhook event fires.
The payment ID (92086a97-fdbf-4cfb-a431-b0cf0172c999) provided in the response body of the payment origination request (id) appears in the details object of the international.Payment.Sent event.