Give a customer credits for their usage.
A permission of its own
Granting credits gives money away, so a restricted key needs write access to credit grants, apart from usage.
Endpoint
Request body
| Name | Type | Required | Description |
|---|---|---|---|
customer | string | Required | Who it's for, cust_.... |
name | string | Required | Shown on invoices. |
category | enum | Required | paid or promotional. |
currency | string | Required | usd. |
amount | integer | Required | In cents. |
applicability | object | Optional | Default: { "scope": "all" }. |
priority | integer | Optional | Lower is spent first. Default 50. |
effective_at | timestamp | Optional | Default: now. |
expires_at | timestamp | Optional | Default: never. |