Airwallex logo

Products via API

Copy for LLMView as Markdown

This tutorial will guide you through the steps to create and manage products via Billing APIs.

Before you begin

Create a product

Call Create a product API and provide as much information as possible about the product.

  • name: The name of the product.
  • description: Product description.
  • unit: The billing frequency for the product.

The example code shows how to create a one-off charge product.

Shell
1curl -X POST https://api-demo.airwallex.com/api/v1/products/create \
2 -H 'Content-Type: application/json' \
3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
4 -d '{
5 "active": true,
6 "description": "Product for one-off charge",
7 "name": "One-off product",
8 "request_id": "89185d28-8e2d-4429-9df9-1e40eb707772"
9 }'

Deactivate a product

You can retire products you no longer wish to use by setting the active field to false in Update a product API request.

Deactivating a product means it can no longer be selected when creating new subscriptions or invoices. Note that it will not affect existing subscriptions or invoices that have used this product.

Shell
1curl -X POST https://api-demo.airwallex.com/api/v1/products/prd_hkpd1x2gbgazzvcd42w/update \
2 -H 'Content-Type: application/json' \
3 -H 'Authorization: Bearer {{ACCESS_TOKEN}}' \
4 -d '{
5 "active": false
6 }'

Manage products

After creating a product object, you can perform the following actions:

Was this page helpful?