Airwallex logo
Airwallex logo

Validate a payer

Call Validate payer API to validate payer information against our schema and validation rules before creating a payer or a POBO payout.

Call the endpoint with the same parameters used for creating a payer:

  • If validation errors are found, a list of all errors will be returned as a 400 response.
  • If all parameters provided for the payer are valid for the given payout scenario, 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/payers/validate' \
3--header 'Content-Type: application/json' \
4--header 'Authorization: Bearer <your_bearer_token>' \
5--data '{
6 "nickname": "Complete Concrete Pty Ltd",
7 "payer": {
8 "additional_info": {
9 "business_registration_number": "EU300503"
10 },
11 "address": {
12 "city": "Melbourne",
13 "country_code": "CN",
14 "postcode": "3000",
15 "state": "VIC",
16 "street_address": "15 William Street"
17 },
18 "company_name": "Complete Concrete Pty Ltd",
19 "entity_type": "COMPANY"
20 }
21}'

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 "source": "payer.address.street_address",
7 "code": "018",
8 "params": {
9 "length_min": 5,
10 "length_max": 200
11 }
12 }
13 ]
14 }
15}
16
Was this page helpful?