Billing Customers
A Billing Customer is an individual or business who purchases or subscribes to your products or services.
POST /api/v1/billing/billing_customers/createGET /api/v1/billing/billing_customers/{id}GET /api/v1/billing/billing_customers/{id}/bank_transfer_instructionsGET /api/v1/billing/billing_customersPOST /api/v1/billing/billing_customers/{id}/update
Create a Billing Customer
POST /api/v1/billing/billing_customers/create
Creates a Billing Customer.
Unique request ID specified by the merchant.
Address of the billing customer.
The two-letter country code in ISO 3166-1 alpha-2 format.
City of the address.
PostCode of the address.
State or province of the address.
Street of the address.
Default currency to use when billing this customer in 3-letter ISO-4217 format.
ID of the default legal entity to use when billing this customer. You can get this ID from the legal_entity_id in the response of the Retrieve account details API.
Additional description about the billing customer.
Email address of the billing customer.
A set of string key-value pairs that you can attach to this object for storing additional information.
Name of the billing customer.
Internal nickname for the billing customer.
Phone number of the billing customer.
Tax identification number of the billing customer.
Type of the billing customer. Defaults to BUSINESS if tax_identification_number exists. Otherwise defaults to INDIVIDUAL.
BUSINESSINDIVIDUALAddress of the billing customer.
The two-letter country code in ISO 3166-1 alpha-2 format.
City of the address.
PostCode of the address.
State or province of the address.
Street of the address.
Indicates whether automatic tax can be applied for this customer based on the customer's current address data and the seller’s tax registration for that jurisdiction.
ELIGIBLECustomer is in a jurisdiction where the seller is registered, and automatic tax can be applied.
LOCATION_NOT_SUPPORTEDThe customer's jurisdiction can be determined from the current address data, but automatic tax calculation isn't supported there.
ADDRESS_INCOMPLETEThe customer's jurisdiction can't be determined from the provided address data.
Time when the billing customer was created.
Default currency to use when billing this customer in 3-letter ISO-4217 format.
ID of the default legal entity to use when billing this customer.
Additional description about the billing customer.
Email address of the billing customer.
ID of the billing customer object.
A set of string key-value pairs that you can attach to this object for storing additional information.
Name of the billing customer.
Internal nickname for the billing customer.
Phone number of the billing customer.
Tax identification number of the billing customer.
Type of the billing customer
BUSINESSINDIVIDUALTime when the billing customer was last updated.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request POST \> --url 'https://api.sandbox.airwallex.com/api/v1/billing/billing_customers/create' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "address": {> "city": "Shanghai",> "country_code": "CN",> "postcode": "100000",> "state": "Shanghai",> "street": "Pudong District"> },> "default_billing_currency": "USD",> "default_legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",> "description": "VIP customer",> "email": "[email protected]",> "metadata": {> "customer_segment": "premium"> },> "name": "John Doe",> "nickname": "JohnnyD",> "phone_number": "+1234567890",> "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",> "tax_identification_number": "123-45-6789",> "type": "INDIVIDUAL">}'
1{2 "address": {3 "city": "Shanghai",4 "country_code": "CN",5 "postcode": "100000",6 "state": "Shanghai",7 "street": "Pudong District"8 },9 "automatic_tax_eligibility": "ELIGIBLE",10 "created_at": "2024-06-10T12:34:56+0000",11 "default_billing_currency": "USD",12 "default_legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",13 "description": "VIP customer",14 "email": "[email protected]",15 "id": "bcus_hkpd7fedfgb004apkvs",16 "metadata": {17 "customer_segment": "premium"18 },19 "name": "John Doe",20 "nickname": "JohnnyD",21 "phone_number": "+1234567890",22 "tax_identification_number": "123-45-6789",23 "type": "INDIVIDUAL",24 "updated_at": "2024-06-10T12:34:56+0000"25}
Retrieve a Billing Customer
GET /api/v1/billing/billing_customers/{id}
Retrieves the details of a Billing Customer.
ID of the Billing Customer object.
Address of the billing customer.
The two-letter country code in ISO 3166-1 alpha-2 format.
City of the address.
PostCode of the address.
State or province of the address.
Street of the address.
Indicates whether automatic tax can be applied for this customer based on the customer's current address data and the seller’s tax registration for that jurisdiction.
ELIGIBLECustomer is in a jurisdiction where the seller is registered, and automatic tax can be applied.
LOCATION_NOT_SUPPORTEDThe customer's jurisdiction can be determined from the current address data, but automatic tax calculation isn't supported there.
ADDRESS_INCOMPLETEThe customer's jurisdiction can't be determined from the provided address data.
Time when the billing customer was created.
Default currency to use when billing this customer in 3-letter ISO-4217 format.
ID of the default legal entity to use when billing this customer.
Additional description about the billing customer.
Email address of the billing customer.
ID of the billing customer object.
A set of string key-value pairs that you can attach to this object for storing additional information.
Name of the billing customer.
Internal nickname for the billing customer.
Phone number of the billing customer.
Tax identification number of the billing customer.
Type of the billing customer
BUSINESSINDIVIDUALTime when the billing customer was last updated.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 404 | Not Found. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request GET \> --url 'https://api.sandbox.airwallex.com/api/v1/billing/billing_customers/billing_customer_id' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "address": {3 "city": "Shanghai",4 "country_code": "CN",5 "postcode": "100000",6 "state": "Shanghai",7 "street": "Pudong District"8 },9 "automatic_tax_eligibility": "ELIGIBLE",10 "created_at": "2024-06-10T12:34:56+0000",11 "default_billing_currency": "USD",12 "default_legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",13 "description": "VIP customer",14 "email": "[email protected]",15 "id": "bcus_hkpd7fedfgb004apkvs",16 "metadata": {17 "customer_segment": "premium"18 },19 "name": "John Doe",20 "nickname": "JohnnyD",21 "phone_number": "+1234567890",22 "tax_identification_number": "123-45-6789",23 "type": "INDIVIDUAL",24 "updated_at": "2024-06-10T12:34:56+0000"25}
Retrieve Bank Transfer Instructions of a Billing Customer
GET /api/v1/billing/billing_customers/{id}/bank_transfer_instructions
Retrieves the bank transfer instructions of a Billing Customer as a read-only list, with one entry per supported currency. The list is empty until bank transfer instructions have been provisioned.
ID of the Billing Customer object.
Category of the receiving bank account. One of CHECKING, SAVINGS, or BUSINESS.
CHECKINGSAVINGSBUSINESSName of the account holder receiving the transfer.
Bank account number.
Code identifying the bank. Applicable in markets including Singapore and Hong Kong.
Name of the financial institution in which the receiving account is domiciled.
Code identifying the bank branch. Used together with bank_code.
Bank State Branch (BSB) number. Applicable only to accounts in Australia.
Indicates who bears the bank charges on the transfer. Returned only for international (SWIFT) transfers. Omitted for local transfers. Possible value:
OUR: The payer covers all transfer charges so the full amount is received.
OURCurrency of the receiving account (3-letter ISO-4217 code).
IBAN number.
Institution number identifying the bank. Applicable only to accounts in Canada.
The recipient's registered business address, used when making an international (SWIFT) transfer. Returned only for SWIFT transfers. Omitted for local transfers.
Two-letter ISO 3166-1 country code of the recipient's address.
Postal or ZIP code of the recipient's address.
State, province, or region of the recipient's address.
Street address of the recipient, given as one or more address lines.
Suburb or city of the recipient's address.
Bank routing number. Applicable only to accounts in the United States.
Bank sort code. Applicable only to accounts in the United Kingdom.
Bank SWIFT or BIC code.
Bank transit number. Applicable only to accounts in Canada.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 404 | Not Found. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request GET \> --url 'https://api.sandbox.airwallex.com/api/v1/billing/billing_customers/billing_customer_id/bank_transfer_instructions' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1[2 {3 "currency": "USD",4 "account_name": "Tromp, Littel and Luettgen",5 "account_number": "8453687204",6 "bank_name": "Community Federal Savings Bank",7 "routing_number": "026073150"8 }9]
List all Billing Customers
GET /api/v1/billing/billing_customers
Retrieves a list of Billing Customers based on the query parameters.
Email address of the billing customer.
The start time of created_at in ISO8601 format (inclusive).
A bookmark for use in pagination to retrieve either the next page or the previous page of results. You can fetch the value for this identifier from the response of the previous API call. To retrieve the next page of results, pass the value of page_after (if not null) from the response to a subsequent call. To retrieve the previous page of results, pass the value of page_before (if not null) from the response to a subsequent call.
Number of billing customer objects per page. Defaults to 20.
The end time of created_at in ISO8601 format (exclusive).
Paged results.
Indicates whether automatic tax can be applied for this customer based on the customer's current address data and the seller’s tax registration for that jurisdiction.
ELIGIBLECustomer is in a jurisdiction where the seller is registered, and automatic tax can be applied.
LOCATION_NOT_SUPPORTEDThe customer's jurisdiction can be determined from the current address data, but automatic tax calculation isn't supported there.
ADDRESS_INCOMPLETEThe customer's jurisdiction can't be determined from the provided address data.
Time when the billing customer was created.
ID of the billing customer object.
Time when the billing customer was last updated.
Address of the billing customer.
The two-letter country code in ISO 3166-1 alpha-2 format.
City of the address.
PostCode of the address.
State or province of the address.
Street of the address.
Default currency to use when billing this customer in 3-letter ISO-4217 format.
ID of the default legal entity to use when billing this customer.
Additional description about the billing customer.
Email address of the billing customer.
A set of string key-value pairs that you can attach to this object for storing additional information.
Name of the billing customer.
Internal nickname for the billing customer.
Phone number of the billing customer.
Tax identification number of the billing customer.
Type of the billing customer
BUSINESSINDIVIDUALThe page cursor used for searching after page.
The page cursor used for search before page.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request GET \> --url 'https://api.sandbox.airwallex.com/api/v1/billing/billing_customers' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "items": [3 {4 "address": {5 "city": "Shanghai",6 "country_code": "CN",7 "postcode": "100000",8 "state": "Shanghai",9 "street": "Pudong District"10 },11 "automatic_tax_eligibility": "ELIGIBLE",12 "created_at": "2024-06-10T12:34:56+0000",13 "default_billing_currency": "USD",14 "default_legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",15 "description": "VIP customer",16 "email": "[email protected]",17 "id": "bcus_hkpd7fedfgb004apkvs",18 "metadata": {19 "customer_segment": "premium"20 },21 "name": "John Doe",22 "nickname": "JohnnyD",23 "phone_number": "+1234567890",24 "tax_identification_number": "123-45-6789",25 "type": "INDIVIDUAL",26 "updated_at": "2024-06-10T12:34:56+0000"27 }28 ],29 "page_after": "<string>",30 "page_before": "<string>"31}
Update a Billing Customer
POST /api/v1/billing/billing_customers/{id}/update
Updates a Billing Customer. Only fields provided in the request are updated, while omitted fields remain unchanged. Array fields are fully replaced if included. Set a field to null or an empty string (for strings) to clear its value.
ID of the Billing Customer object.
Address of the billing customer.
The two-letter country code in ISO 3166-1 alpha-2 format.
City of the address.
PostCode of the address.
State or province of the address.
Street of the address.
Default currency to use when billing this customer in 3-letter ISO-4217 format.
ID of the default legal entity to use when billing this customer.
Additional description about the billing customer.
Email address of the billing customer.
A set of string key-value pairs that you can attach to this object for storing additional information.
Name of the billing customer.
Internal nickname for the billing customer.
Phone number of the billing customer.
Tax identification number of the billing customer.
Type of the billing customer.
BUSINESSINDIVIDUALAddress of the billing customer.
The two-letter country code in ISO 3166-1 alpha-2 format.
City of the address.
PostCode of the address.
State or province of the address.
Street of the address.
Indicates whether automatic tax can be applied for this customer based on the customer's current address data and the seller’s tax registration for that jurisdiction.
ELIGIBLECustomer is in a jurisdiction where the seller is registered, and automatic tax can be applied.
LOCATION_NOT_SUPPORTEDThe customer's jurisdiction can be determined from the current address data, but automatic tax calculation isn't supported there.
ADDRESS_INCOMPLETEThe customer's jurisdiction can't be determined from the provided address data.
Time when the billing customer was created.
Default currency to use when billing this customer in 3-letter ISO-4217 format.
ID of the default legal entity to use when billing this customer.
Additional description about the billing customer.
Email address of the billing customer.
ID of the billing customer object.
A set of string key-value pairs that you can attach to this object for storing additional information.
Name of the billing customer.
Internal nickname for the billing customer.
Phone number of the billing customer.
Tax identification number of the billing customer.
Type of the billing customer
BUSINESSINDIVIDUALTime when the billing customer was last updated.
| Error status | Description |
|---|---|
| 400 | Bad Request. Possible error codes: |
| 401 | Unauthorized. Possible error codes: |
| 404 | Not Found. Possible error codes: |
| 500 | Server Error. Possible error codes: |
$curl --request POST \> --url 'https://api.sandbox.airwallex.com/api/v1/billing/billing_customers/billing_customer_id/update' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "address": {> "city": "Melbourne",> "country_code": "AU",> "postcode": "3000",> "state": "VIC",> "street": "200 Collins Street"> },> "default_billing_currency": "EUR",> "default_legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",> "description": "Updated corporate account",> "email": "[email protected]",> "metadata": {> "customer_segment": "enterprise"> },> "name": "Acme Corporation",> "nickname": "Acme Corp",> "phone_number": "+1987654321",> "tax_identification_number": "987-65-4321",> "type": "BUSINESS">}'
1{2 "address": {3 "city": "Shanghai",4 "country_code": "CN",5 "postcode": "100000",6 "state": "Shanghai",7 "street": "Pudong District"8 },9 "automatic_tax_eligibility": "ELIGIBLE",10 "created_at": "2024-06-10T12:34:56+0000",11 "default_billing_currency": "USD",12 "default_legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",13 "description": "VIP customer",14 "email": "[email protected]",15 "id": "bcus_hkpd7fedfgb004apkvs",16 "metadata": {17 "customer_segment": "premium"18 },19 "name": "John Doe",20 "nickname": "JohnnyD",21 "phone_number": "+1234567890",22 "tax_identification_number": "123-45-6789",23 "type": "INDIVIDUAL",24 "updated_at": "2024-06-10T12:34:56+0000"25}