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 -X POST https://api-demo.airwallex.com/api/v1/payers/validate \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "nickname": "Complete Concrete Pty Ltd",6 "payer": {7 "additional_info": {8 "business_registration_number": "EU300503"9 },10 "address": {11 "city": "Melbourne",12 "country_code": "CN",13 "postcode": "3000",14 "state": "VIC",15 "street_address": "15 William Street"16 },17 "company_name": "Complete Concrete Pty Ltd",18 "entity_type": "COMPANY"19 }20 }'
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": 20011 }12 }13 ]14 }15}16
Was this page helpful?