Airwallex logo
Airwallex logo

Validate a transfer

Update: Starting from API version 2024-09-27, the Payment resource has been renamed to Transfer. This change affects all occurrences of "payment" throughout the former Payments API and Webhook events. See more details in this changelog API.

Call Validate transfer API to check for errors before creating a transfer:

  • If validation errors are found, a list of all errors will be returned as a 400 response.
  • If all parameters provided for the transfer are valid, the endpoint will return a 200 (OK) response.

To learn more about error response structures and detailed descriptions of error codes, please see Error codes.

Example request

Shell
1curl --request POST \
2--url 'https://api-demo.airwallex.com/api/v1/transfers/validate' \
3--header 'Content-Type: application/json' \
4--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0b20iLCJyb2xlcyI6WyJ1c2VyIl0sImlhdCI6MTQ4ODQxNTI1NywiZXhwIjoxNDg4NDE1MjY3fQ.UHqau03y5kEk5lFbTp7J4a-U6LXsfxIVNEsux85hj-Q' \
5--header 'headers: [object Object]' \
6--data '{
7 "beneficiary": {
8 "additional_info": {
9 "personal_email": "[email protected]"
10 },
11 "address": {
12 "city": "Seattle",
13 "country_code": "US",
14 "postcode": "",
15 "state": "Washington",
16 "street_address": "412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue412 5th Avenue"
17 },
18 "bank_details": {
19 "account_currency": "USD",
20 "account_name": "John Walker",
21 "account_number": "50001121",
22 "account_routing_type1": "aba",
23 "account_routing_value1": "021000021",
24 "bank_country_code": "US",
25 "bank_account_category": "Checking",
26 "local_clearing_system": "ACH"
27 },
28 "entity_type": "COMPANY"
29 },
30 "transfer_amount": "50",
31 "transfer_currency": "USD",
32 "transfer_method": "LOCAL",
33 "reason": "travel",
34 "reference": "PMT1936398",
35 "request_id": "8750f946-39f4-46e5-8a9d-2b2fca63a18a",
36 "source_currency": "SGD",
37 "lock_rate_on_create": true,
38 "transfer_date": "2025-07-25"
39}'

If you are registered as a platform account, you can call this endpoint on behalf of your connected accounts by specifying the open ID in the x-on-behalf-of header.

Example error response

JSON
1{
2 "code": "validation_failed",
3 "details": {
4 "errors": [
5 {
6 "code": "001",
7 "source": "beneficiary.address.postcode"
8 },
9 {
10 "code": "018",
11 "params": {
12 "length_max": 200,
13 "length_min": 1
14 },
15 "source": "beneficiary.address.street_address"
16 }
17 ]
18 },
19 "message": "The request failed our schema validation. Refer to the errors object for erroneous fields, codes and parameters."
20}
Was this page helpful?