Skip to main content
POST
Give a subscriber credit
Webhook: none. The credit changes no subscription state. A renewal that the credit pays sends checkout.session.completed and subscription.renewed. See Which action fires which event.

Headers

Idempotency-Key
string
required

Required, not optional. Mint one string per credit you mean to give, and send the same one again if the call times out and you retry. Nothing on our side survives a retry to recognise it by, so a retry without a key credits the subscriber a second time. Two different keys for the same amount give two credits, which is how you deliberately credit someone twice.

Maximum string length: 200

Path Parameters

id
string<uuid>
required

Subscription UUID (the id field from the list response, not stripeSubscriptionId).

Body

application/json
amountMinor
integer
required

Positive integer minor units of the subscription's currency, at most the next invoice's amount due. There is no currency field: a credit in the wrong currency is accepted by the processor and then never reaches an invoice.

Required range: x >= 1
reason
string
required

Why you gave it. Shown back to you and on the credit at the processor.

Maximum string length: 200

Response

The credit was given.

A credit you gave, with both figures it changes. Money is integer minor units.

id
string
required

The credit's id at the payment processor. There is no id of ours.

amountMinor
integer
required

What you gave, positive.

currency
string
required

The subscription's, lower-case.

reason
string
required
creditBalanceMinor
integer
required

All unspent credit on this customer's account with you.

nextInvoiceMinor
integer
required

What their next invoice would have taken before this credit.

nextInvoiceDueAfterCreditMinor
integer
required

What it will take now.

nextInvoiceAt
string<date-time>
required
createdBy
string<uuid>
required

The person who gave it.

createdAt
string<date-time>
required