Customers via API
This tutorial will guide you through the steps to create and manage customers via Billing APIs.
Before you begin
- Obtain your access token API by authenticating to Airwallex using your unique Client ID and API key. You will need the access token to make API calls.
- Check out Supported currencies for supported regions and currencies.
Create a customer
Call Create a customer API and provide as much information as possible about the customer.
type: The customer type can beBUSINESSorINDIVIDUAL. Defaults toINDIVIDUALif you do not providetax_identification_number.default_billing_currency: The currency you specify will be used by default when creating invoices or subscriptions for this customer.default_legal_entity_id: This legal entity ID you specify will be used by default when creating invoices or subscriptions for this customer.
Shell
1curl -X POST https://api-demo.airwallex.com/api/v1/billing_customers/create \2 -H 'Content-Type: application/json' \3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \4 -d '{5 "address": {6 "city": "Shanghai",7 "country_code": "CN",8 "postcode": "100000",9 "state": "Shanghai",10 "street": "Pudong District"11 },12 "default_billing_currency": "USD",13 "default_legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",14 "description": "VIP customer",15 "email": "[email protected]",16 "metadata": {17 "customer_segment": "premium"18 },19 "name": "John Doe",20 "nickname": "JohnnyD",21 "phone_number": "+1234567890",22 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",23 "tax_identification_number": "123-45-6789",24 "type": "BUSINESS"25 }'
Manage customers
After creating a customer object, you can perform the following actions:
- Update the details using Update a Billing customer API .
- Retrieve customer details anytime using Retrieve a Billing Customer API.
- Retrieve the list of customers you've created using Get list of Billing Customers API.
Was this page helpful?