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.
Shell1curl --request POST \2--url 'https://api-demo.airwallex.com/api/v1/billing_customers/create' \3--header 'Content-Type: application/json' \4--header 'Authorization: Bearer <your_bearer_token>' \5--data '{6 "address": {7 "city": "Shanghai",8 "country_code": "CN",9 "postcode": "100000",10 "state": "Shanghai",11 "street": "Pudong District"12 },13 "default_billing_currency": "USD",14 "default_legal_entity_id": "le_ib2DZgZJN72T7bObvNuMYQ",15 "description": "VIP customer",16 "email": "[email protected]",17 "metadata": {18 "customer_segment": "premium"19 },20 "name": "John Doe",21 "nickname": "JohnnyD",22 "phone_number": "+1234567890",23 "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",24 "tax_identification_number": "123-45-6789",25 "type": "BUSINESS"26}'
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?