Airwallex logo

Prices

Copy for LLMView as Markdown

A Price defines the pricing information for a Product such as amount, currency, and billing frequency. A Product can have multiple Prices. For example, you can offer the following pricing options for a software license Product:

    1. Standard Price: $10 / month
    1. Student Price: $5 / month
    1. Lifetime Access: $200 one-off purchase

Prices are primarily used in Invoice and Subscription APIs.

Endpoints
POST /api/v1/billing/prices/create
GET /api/v1/billing/prices/{id}
POST /api/v1/billing/prices/{id}/update
GET /api/v1/billing/prices

Create a price

POST /api/v1/billing/prices/create

Create a new Price object.

Request body
currencyrequiredstring

Currency of the price (in 3-letter ISO-4217 format).

product_idrequiredstring

ID of the Product object this price is associated with.

request_idrequiredstring

Unique request ID specified by the merchant.

activeboolean

true if the price is available for new purchases, false otherwise. Defaults to true.

billing_typestring

Indicates when should the price be billed, one of

  • IN_ADVANCE: billed at the beginning of the billing cycle.
  • IN_ARREARS: billed at the end of the billing cycle.

Defaults to IN_ADVANCE.

descriptionstring

Price description. Used for internal classification and identification.

flat_amountnumber

The fixed amount to be charged. Only required when the pricing model is FLAT.

lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for PER_UNIT price.

lot.rounding_moderequiredstring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

lot.sizerequiredinteger

The amount of quantity that constitutes a single billable lot.

metadataobject

A set of string key-value pairs that you can attach to this object for storing additional information.

meter_idstring

ID of the Meter object specifying how to calculate the usage for this price.

meteredboolean

Specify how to determine the quantity of the product used in each billing cycle for subscription payments. true if the quantity is dynamically determined during the billing cycle. The merchant should call the Ingest Usage Events API to submit usage data when the product is used. false if the quantity is determined when creating a subscription.

pricing_modelstring

Specify how to calculate the total billing amount when a quantity is provided. One of

  • FLAT: a fixed price.
  • PER_UNIT: a fixed price per unit quantity.
  • VOLUME: the unit price is based on which tier the total quantity falls in.
  • GRADUATED: the unit price changes as the quantity increases.

Defaults to PER_UNIT.

recurringobject

The frequency at which the price is charged. null for one-time charge.

recurring.period_unitrequiredstring

Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.

recurring.periodinteger

The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH. Defaults to 1.

tax_includedboolean

Whether the price includes tax. Defaults to false.

tiersarray

List of quantity-based pricing tiers for this price. Required when the pricing model is VOLUME or GRADUATED.

tiers.flat_amountnumber

The flat amount to be charged for this tier when pricing model is GRADUATED, or the overall flat amount to be charged when pricing model is VOLUME.

tiers.lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for VOLUME and GRADUATED prices.

tiers.lot.rounding_moderequiredstring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

tiers.lot.sizerequiredinteger

The amount of quantity that constitutes a single billable lot.

tiers.unit_amountnumber

The per-unit amount to be charged for this tier when pricing model is GRADUATED, or the overall per-unit amount to be charged when pricing model is VOLUME.

tiers.unit_descriptionstring

Description of the billable unit for the tier.

tiers.upper_boundnumber

The upper quantity limit of this tier. This tier is applicable when the quantity does not exceed the upper bound of this tier, and is greater than the upper bound of the tier below it(or 0 if this is the first tier). For the last tier, the upper bound must be left empty.

unit_amountnumber

The amount to be charged per product unit. Only required when the pricing model is PER_UNIT.

unit_descriptionstring

Description of the billable unit for the price.

Response body - 201 Created
activeboolean

true if the price is available for new purchases, false otherwise.

billing_typestring

Indicates when should the price be billed, one of

  • IN_ADVANCE: billed at the beginning of the billing cycle.
  • IN_ARREARS: billed at the end of the billing cycle.
created_atstring

Time when the price was created.

currencystring

Currency of the price (in 3-letter ISO-4217 format).

descriptionstring

Price description.

flat_amountnumber

The fixed amount to be charged. Only required when the pricing model is FLAT.

idstring

ID of the Price object.

lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for PER_UNIT price.

lot.rounding_modestring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

lot.sizeinteger

The amount of quantity that constitutes a single billable lot.

metadataobject

A set of string key-value pairs that you can attach to this object for storing additional information.

meter_idstring

ID of the Meter object specifying how to calculate the usage for this price.

meteredboolean

Specify how to determine the quantity of the product used in each billing cycle for subscription payments. true if the quantity is dynamically determined during the billing cycle. The merchant should call the Ingest Usage Events API to submit usage data when the product is used. false if the quantity is determined when creating a subscription.

pricing_modelstring

Specify how to calculate the total billing amount when a quantity is provided. One of

  • FLAT: a fixed price.
  • PER_UNIT: a fixed price per unit quantity.
  • VOLUME: the unit price is based on which tier the total quantity falls in.
  • GRADUATED: the unit price changes as the quantity increases.
product_idstring

ID of the Product object this price is associated with.

recurringobject

The frequency at which the price is charged. null for one-time charge.

recurring.periodinteger

The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH.

recurring.period_unitstring

Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.

tax_includedboolean

Whether the price includes tax.

tiersarray

List of quantity-based pricing tiers for this price. Required when the pricing model is VOLUME or GRADUATED.

tiers.flat_amountnumber

The flat amount to be charged for this tier when pricing model is GRADUATED, or the overall flat amount to be charged when pricing model is VOLUME.

tiers.lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for VOLUME and GRADUATED prices.

tiers.lot.rounding_modestring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

tiers.lot.sizeinteger

The amount of quantity that constitutes a single billable lot.

tiers.unit_amountnumber

The per-unit amount to be charged for this tier when pricing model is GRADUATED, or the overall per-unit amount to be charged when pricing model is VOLUME.

tiers.unit_descriptionstring

Description of the billable unit for the tier.

tiers.upper_boundnumber

The upper quantity limit of this tier. This tier is applicable when the quantity does not exceed the upper bound of this tier, and is greater than the upper bound of the tier below it(or 0 if this is the first tier). For the last tier, the upper bound must be left empty.

typestring

One of ONE_OFF or RECURRING depending on whether the price is for a one-off purchase or a recurring (subscription) purchase.

unit_amountnumber

The amount to be charged per product unit. Only required when the pricing model is PER_UNIT.

unit_descriptionstring

Description of the billable unit for the price.

updated_atstring

Time when the price was last updated.

Errors
Error statusDescription
400

Bad Request. Possible error codes: validation_error, resource_not_found(invalid product_id), duplicate_request_id

401

Unauthorized. Possible error codes: unauthorized

500

Server Error. Possible error codes: internal_error

POST /api/v1/billing/prices/create
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/billing/prices/create' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "active": true,
> "billing_type": "IN_ADVANCE",
> "currency": "USD",
> "description": "Standard option: $10 / month.",
> "flat_amount": 0,
> "metadata": {
> "foo": "bar"
> },
> "meter_id": "<string>",
> "metered": false,
> "pricing_model": "GRADUATED",
> "product_id": "prd_hkpd1x2gbgazzvcd42w",
> "recurring": {
> "period": 1,
> "period_unit": "MONTH"
> },
> "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
> "tax_included": false,
> "lot": {
> "rounding_mode": "UP",
> "size": 10
> },
> "tiers": [
> {
> "unit_amount": 10,
> "upper_bound": 20
> },
> {
> "flat_amount": 20
> }
> ],
> "unit_amount": 0,
> "unit_description": "<string>"
>}'
Response (201 Created)
1{
2 "active": true,
3 "billing_type": "IN_ADVANCE",
4 "created_at": "2022-01-01T10:15:30+0000",
5 "currency": "USD",
6 "description": "Standard option: $10 / month.",
7 "flat_amount": 0,
8 "id": "pri_hkpd7fedfgb004apkvs",
9 "lot": {
10 "rounding_mode": "UP",
11 "size": 10
12 },
13 "metadata": {
14 "foo": "bar"
15 },
16 "meter_id": "<string>",
17 "metered": false,
18 "pricing_model": "GRADUATED",
19 "product_id": "prd_hkpd1x2gbgazzvcd42w",
20 "recurring": {
21 "period": 1,
22 "period_unit": "MONTH"
23 },
24 "tax_included": false,
25 "tiers": [
26 {
27 "unit_amount": 10,
28 "upper_bound": 20
29 },
30 {
31 "flat_amount": 20
32 }
33 ],
34 "type": "RECURRING",
35 "unit_amount": 0,
36 "unit_description": "<string>",
37 "updated_at": "2022-01-01T10:15:30+0000"
38}
Was this section helpful?

Retrieve a price

GET /api/v1/billing/prices/{id}

Retrieves the details of a Price object by the ID.

Parameters
idrequiredstring

ID of the Price object.

Response body - 200 OK
activeboolean

true if the price is available for new purchases, false otherwise.

billing_typestring

Indicates when should the price be billed, one of

  • IN_ADVANCE: billed at the beginning of the billing cycle.
  • IN_ARREARS: billed at the end of the billing cycle.
created_atstring

Time when the price was created.

currencystring

Currency of the price (in 3-letter ISO-4217 format).

descriptionstring

Price description.

flat_amountnumber

The fixed amount to be charged. Only required when the pricing model is FLAT.

idstring

ID of the Price object.

lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for PER_UNIT price.

lot.rounding_modestring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

lot.sizeinteger

The amount of quantity that constitutes a single billable lot.

metadataobject

A set of string key-value pairs that you can attach to this object for storing additional information.

meter_idstring

ID of the Meter object specifying how to calculate the usage for this price.

meteredboolean

Specify how to determine the quantity of the product used in each billing cycle for subscription payments. true if the quantity is dynamically determined during the billing cycle. The merchant should call the Ingest Usage Events API to submit usage data when the product is used. false if the quantity is determined when creating a subscription.

pricing_modelstring

Specify how to calculate the total billing amount when a quantity is provided. One of

  • FLAT: a fixed price.
  • PER_UNIT: a fixed price per unit quantity.
  • VOLUME: the unit price is based on which tier the total quantity falls in.
  • GRADUATED: the unit price changes as the quantity increases.
product_idstring

ID of the Product object this price is associated with.

recurringobject

The frequency at which the price is charged. null for one-time charge.

recurring.periodinteger

The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH.

recurring.period_unitstring

Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.

tax_includedboolean

Whether the price includes tax.

tiersarray

List of quantity-based pricing tiers for this price. Required when the pricing model is VOLUME or GRADUATED.

tiers.flat_amountnumber

The flat amount to be charged for this tier when pricing model is GRADUATED, or the overall flat amount to be charged when pricing model is VOLUME.

tiers.lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for VOLUME and GRADUATED prices.

tiers.lot.rounding_modestring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

tiers.lot.sizeinteger

The amount of quantity that constitutes a single billable lot.

tiers.unit_amountnumber

The per-unit amount to be charged for this tier when pricing model is GRADUATED, or the overall per-unit amount to be charged when pricing model is VOLUME.

tiers.unit_descriptionstring

Description of the billable unit for the tier.

tiers.upper_boundnumber

The upper quantity limit of this tier. This tier is applicable when the quantity does not exceed the upper bound of this tier, and is greater than the upper bound of the tier below it(or 0 if this is the first tier). For the last tier, the upper bound must be left empty.

typestring

One of ONE_OFF or RECURRING depending on whether the price is for a one-off purchase or a recurring (subscription) purchase.

unit_amountnumber

The amount to be charged per product unit. Only required when the pricing model is PER_UNIT.

unit_descriptionstring

Description of the billable unit for the price.

updated_atstring

Time when the price was last updated.

Errors
Error statusDescription
400

Bad Request. Possible error codes: validation_error

401

Unauthorized. Possible error codes: unauthorized

404

Not Found. Possible error codes: resource_not_found

500

Server Error. Possible error codes: internal_error

GET /api/v1/billing/prices/{id}
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/api/v1/billing/prices/price_id' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "active": true,
3 "billing_type": "IN_ADVANCE",
4 "created_at": "2022-01-01T10:15:30+0000",
5 "currency": "USD",
6 "description": "Standard option: $10 / month.",
7 "flat_amount": 0,
8 "id": "pri_hkpd7fedfgb004apkvs",
9 "lot": {
10 "rounding_mode": "UP",
11 "size": 10
12 },
13 "metadata": {
14 "foo": "bar"
15 },
16 "meter_id": "<string>",
17 "metered": false,
18 "pricing_model": "GRADUATED",
19 "product_id": "prd_hkpd1x2gbgazzvcd42w",
20 "recurring": {
21 "period": 1,
22 "period_unit": "MONTH"
23 },
24 "tax_included": false,
25 "tiers": [
26 {
27 "unit_amount": 10,
28 "upper_bound": 20
29 },
30 {
31 "flat_amount": 20
32 }
33 ],
34 "type": "RECURRING",
35 "unit_amount": 0,
36 "unit_description": "<string>",
37 "updated_at": "2022-01-01T10:15:30+0000"
38}
Was this section helpful?

Update a price

POST /api/v1/billing/prices/{id}/update

Updates a Price by setting the values of the request parameters. Any parameters not provided will be left unchanged. 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.

Parameters
idrequiredstring

ID of the Price object.

Request body
activeboolean

true if the price is available for new purchases, false otherwise.

descriptionstring

Price description. Used for internal classification and identification.

metadataobject

A set of string key-value pairs that you can attach to this object for storing additional information.

request_idstring

Unique request ID specified by the merchant.

Response body - 200 OK
activeboolean

true if the price is available for new purchases, false otherwise.

billing_typestring

Indicates when should the price be billed, one of

  • IN_ADVANCE: billed at the beginning of the billing cycle.
  • IN_ARREARS: billed at the end of the billing cycle.
created_atstring

Time when the price was created.

currencystring

Currency of the price (in 3-letter ISO-4217 format).

descriptionstring

Price description.

flat_amountnumber

The fixed amount to be charged. Only required when the pricing model is FLAT.

idstring

ID of the Price object.

lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for PER_UNIT price.

lot.rounding_modestring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

lot.sizeinteger

The amount of quantity that constitutes a single billable lot.

metadataobject

A set of string key-value pairs that you can attach to this object for storing additional information.

meter_idstring

ID of the Meter object specifying how to calculate the usage for this price.

meteredboolean

Specify how to determine the quantity of the product used in each billing cycle for subscription payments. true if the quantity is dynamically determined during the billing cycle. The merchant should call the Ingest Usage Events API to submit usage data when the product is used. false if the quantity is determined when creating a subscription.

pricing_modelstring

Specify how to calculate the total billing amount when a quantity is provided. One of

  • FLAT: a fixed price.
  • PER_UNIT: a fixed price per unit quantity.
  • VOLUME: the unit price is based on which tier the total quantity falls in.
  • GRADUATED: the unit price changes as the quantity increases.
product_idstring

ID of the Product object this price is associated with.

recurringobject

The frequency at which the price is charged. null for one-time charge.

recurring.periodinteger

The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH.

recurring.period_unitstring

Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.

tax_includedboolean

Whether the price includes tax.

tiersarray

List of quantity-based pricing tiers for this price. Required when the pricing model is VOLUME or GRADUATED.

tiers.flat_amountnumber

The flat amount to be charged for this tier when pricing model is GRADUATED, or the overall flat amount to be charged when pricing model is VOLUME.

tiers.lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for VOLUME and GRADUATED prices.

tiers.lot.rounding_modestring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

tiers.lot.sizeinteger

The amount of quantity that constitutes a single billable lot.

tiers.unit_amountnumber

The per-unit amount to be charged for this tier when pricing model is GRADUATED, or the overall per-unit amount to be charged when pricing model is VOLUME.

tiers.unit_descriptionstring

Description of the billable unit for the tier.

tiers.upper_boundnumber

The upper quantity limit of this tier. This tier is applicable when the quantity does not exceed the upper bound of this tier, and is greater than the upper bound of the tier below it(or 0 if this is the first tier). For the last tier, the upper bound must be left empty.

typestring

One of ONE_OFF or RECURRING depending on whether the price is for a one-off purchase or a recurring (subscription) purchase.

unit_amountnumber

The amount to be charged per product unit. Only required when the pricing model is PER_UNIT.

unit_descriptionstring

Description of the billable unit for the price.

updated_atstring

Time when the price was last updated.

Errors
Error statusDescription
400

Bad Request. Possible error codes: validation_error

401

Unauthorized. Possible error codes: unauthorized

404

Not Found. Possible error codes: resource_not_found

500

Server Error. Possible error codes: internal_error

POST /api/v1/billing/prices/{id}/update
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/billing/prices/price_id/update' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "active": true,
> "description": "Standard option: $10 / month.",
> "metadata": {
> "foo": "bar"
> },
> "request_id": "ee939540-3203-4a2c-9172-89a566485dd9"
>}'
Response (200 OK)
1{
2 "active": true,
3 "billing_type": "IN_ADVANCE",
4 "created_at": "2022-01-01T10:15:30+0000",
5 "currency": "USD",
6 "description": "Standard option: $10 / month.",
7 "flat_amount": 0,
8 "id": "pri_hkpd7fedfgb004apkvs",
9 "lot": {
10 "rounding_mode": "UP",
11 "size": 10
12 },
13 "metadata": {
14 "foo": "bar"
15 },
16 "meter_id": "<string>",
17 "metered": false,
18 "pricing_model": "GRADUATED",
19 "product_id": "prd_hkpd1x2gbgazzvcd42w",
20 "recurring": {
21 "period": 1,
22 "period_unit": "MONTH"
23 },
24 "tax_included": false,
25 "tiers": [
26 {
27 "unit_amount": 10,
28 "upper_bound": 20
29 },
30 {
31 "flat_amount": 20
32 }
33 ],
34 "type": "RECURRING",
35 "unit_amount": 0,
36 "unit_description": "<string>",
37 "updated_at": "2022-01-01T10:15:30+0000"
38}
Was this section helpful?

Get list of prices

GET /api/v1/billing/prices

Retrieves a list of Prices based on the query parameters.

Parameters
activeboolean

true if the price is available for new purchases, false otherwise.

currencystring

The currency of the Price in 3-letter ISO-4217 format.

pagestring

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.

page_sizeinteger

Number of Prices to be listed per page. Defaults to 20.

product_idstring

ID of the Product object this price is associated with.

recurring_periodinteger

The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if recurring_period=2 and recurring_period_unit=MONTH.

recurring_period_unitstring

Specifies billing frequency.

DAY
WEEK
MONTH
YEAR
Response body - 200 OK
itemsarray

Paged results.

items.activeboolean

true if the price is available for new purchases, false otherwise.

items.created_atstring

Time when the price was created.

items.currencystring

Currency of the price (in 3-letter ISO-4217 format).

items.idstring

ID of the Price object.

items.meteredboolean

Specify how to determine the quantity of the product used in each billing cycle for subscription payments. true if the quantity is dynamically determined during the billing cycle. The merchant should call the Ingest Usage Events API to submit usage data when the product is used. false if the quantity is determined when creating a subscription.

items.pricing_modelstring

Specify how to calculate the total billing amount when a quantity is provided. One of

  • FLAT: a fixed price.
  • PER_UNIT: a fixed price per unit quantity.
  • VOLUME: the unit price is based on which tier the total quantity falls in.
  • GRADUATED: the unit price changes as the quantity increases.
items.product_idstring

ID of the Product object this price is associated with.

items.tax_includedboolean

Whether the price includes tax.

items.typestring

One of ONE_OFF or RECURRING depending on whether the price is for a one-off purchase or a recurring (subscription) purchase.

items.updated_atstring

Time when the price was last updated.

items.billing_typestring

Indicates when should the price be billed, one of

  • IN_ADVANCE: billed at the beginning of the billing cycle.
  • IN_ARREARS: billed at the end of the billing cycle.
items.descriptionstring

Price description.

items.flat_amountnumber

The fixed amount to be charged. Only required when the pricing model is FLAT.

items.lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for PER_UNIT price.

items.lot.rounding_modestring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

items.lot.sizeinteger

The amount of quantity that constitutes a single billable lot.

items.metadataobject

A set of string key-value pairs that you can attach to this object for storing additional information.

items.meter_idstring

ID of the Meter object specifying how to calculate the usage for this price.

items.recurringobject

The frequency at which the price is charged. null for one-time charge.

items.recurring.periodinteger

The number of period units between subscription billing cycles. For example, the billing cycle is bi-monthly if period=2 and period_unit=MONTH.

items.recurring.period_unitstring

Specifies billing frequency. One of DAY, WEEK, MONTH or YEAR.

items.tiersarray

List of quantity-based pricing tiers for this price. Required when the pricing model is VOLUME or GRADUATED.

items.tiers.flat_amountnumber

The flat amount to be charged for this tier when pricing model is GRADUATED, or the overall flat amount to be charged when pricing model is VOLUME.

items.tiers.lotobject

Defines how quantity is grouped into billable lots. The unit_amount is then applied per lot. If not set, quantity is treated as the number of billable lots. Only applicable for VOLUME and GRADUATED prices.

items.tiers.lot.rounding_modestring

Specifies how to round the calculated lots when the total quantity is not an exact multiple of the size. One of UP.

items.tiers.lot.sizeinteger

The amount of quantity that constitutes a single billable lot.

items.tiers.unit_amountnumber

The per-unit amount to be charged for this tier when pricing model is GRADUATED, or the overall per-unit amount to be charged when pricing model is VOLUME.

items.tiers.unit_descriptionstring

Description of the billable unit for the tier.

items.tiers.upper_boundnumber

The upper quantity limit of this tier. This tier is applicable when the quantity does not exceed the upper bound of this tier, and is greater than the upper bound of the tier below it(or 0 if this is the first tier). For the last tier, the upper bound must be left empty.

items.unit_amountnumber

The amount to be charged per product unit. Only required when the pricing model is PER_UNIT.

items.unit_descriptionstring

Description of the billable unit for the price.

page_afterstring

The page cursor used for searching after page.

page_beforestring

The page cursor used for search before page.

Errors
Error statusDescription
400

Bad Request. Possible error codes: validation_error

401

Unauthorized. Possible error codes: unauthorized

500

Server Error. Possible error codes: internal_error

GET /api/v1/billing/prices
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/api/v1/billing/prices' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "items": [
3 {
4 "active": true,
5 "billing_type": "IN_ADVANCE",
6 "created_at": "2022-01-01T10:15:30+0000",
7 "currency": "USD",
8 "description": "Standard option: $10 / month.",
9 "id": "pri_hkpd7fedfgb004apkvs",
10 "lot": {
11 "rounding_mode": "UP",
12 "size": 10
13 },
14 "metadata": {
15 "foo": "bar"
16 },
17 "metered": false,
18 "pricing_model": "GRADUATED",
19 "product_id": "prd_hkpd1x2gbgazzvcd42w",
20 "recurring": {
21 "period": 1,
22 "period_unit": "MONTH"
23 },
24 "tax_included": false,
25 "tiers": [
26 {
27 "unit_amount": 10,
28 "upper_bound": 20
29 },
30 {
31 "flat_amount": 20
32 }
33 ],
34 "type": "RECURRING",
35 "updated_at": "2022-01-01T10:15:30+0000"
36 }
37 ],
38 "page_after": "<string>",
39 "page_before": "<string>"
40}
Was this section helpful?