POST /v1/billing/credit_grants

Creates a credit grant.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
applicability_config Object Yes

Configuration specifying what this credit grant applies to. We currently only support metered prices that have a Billing Meter attached to them.

applicability_config.scope Object Yes
applicability_config.scope.prices[] Array No
applicability_config.scope.prices[].id String Yes
applicability_config.scope.price_type String No

Possible values:

  • "metered"
category String Yes

The category of this credit grant.

Possible values:

  • "promotional"
  • "paid"
priority Integer No

The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.

customer String Yes

ID of the customer to receive the billing credits.

name String No

A descriptive name shown in the Dashboard.

amount Object Yes

Amount of this credit grant.

amount.type String Yes

Possible values:

  • "monetary"
amount.monetary Object No
amount.monetary.value Integer Yes
amount.monetary.currency String Yes
expand[] Array No

Specifies which fields in the response should be expanded.

metadata Object No

Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.

effective_at Integer No

The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.

expires_at Integer No

The time when the billing credits expire. If not specified, the billing credits don't expire.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.