Search...
APIJSLog inGet started in sandbox
Airwallex logo
Home
Platform APIs
Connected Accounts
Accounts
Payments
Billing
Transactional FX
Payouts
Issuing
Back to home
OverviewHow Airwallex Billing worksGet started with billingChoose your billing solutionConfigure your billing settingsSupported currencies
Invoicing
Billing components
Customers
Products
Prices
Prices via API
Payment sourcesCheckout
Test and go live

Prices via API

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

Create a price

Call Create a price API with the following required fields:

  • currency: Specify currency for the price.
  • product_id: ID of the Product object created with Create a Product API.
  • pricing_model: Defaults to PER_UNIT. See Pricing models.
  • billing_type: Defaults to IN_ADVANCE. See Billing types.
  • recurring: Set this object to null for one-time charges.
    • recurring.period_unit: Indicates how often you want to charge your customers for a product or service. Can be one of DAY, WEEK, MONTH,YEAR.
    • recurring.period: Optional. Determines the interval gap based on period_unit. For example, for a bi-monthly billing cycle, specify period= 2 where period_unit=MONTH.
  • active: By default, this field is set to true, which means the price is available for new purchases. You can set it to false to deactivate the price.

The example code below shows how to create a one-time price using the PER_UNIT pricing model for the product.

Shell

The example code below shows how to create a monthly price using the FLAT pricing model and apply charges on a per-month basis.

Shell

Deactivate a price

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

Deactivating a price 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 price.

Shell

Manage prices

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

Was this page helpful?
On this page
  • Create a price
  • Deactivate a price
  • Manage prices
Was this page helpful?