For the complete documentation index, see llms.txt. This page is also available as Markdown.

Refunds

Add an overview of the Refunds API here. This block is preserved across regenerations.

Endpoints

GET /api/v1/invoices/{id}/refunds

List all refunds issued against payments for an invoice

get
/invoices/{id}/refunds
Authorizations
X-API-KeystringRequired

Scoped API key. Scopes: read, commerce, admin.

Path parameters
idstringRequired

Invoice ID

Query parameters
limitinteger · min: 1 · max: 100Optional

Max items to return (1–100, default 20)

Default: 20
offsetintegerOptional

Number of items to skip (default 0)

Default: 0
Responses
200

Paginated list of refunds

No content

get/invoices/{id}/refunds

No content

Notes, examples, or caveats for GET /invoices/{id}/refunds go here.

POST /api/v1/invoices/{id}/refunds

Issue a refund against the payment for an invoice. Targets the most recent successful payment session linked to this invoice.

post
/invoices/{id}/refunds
Authorizations
X-API-KeystringRequired

Scoped API key. Scopes: read, commerce, admin.

Path parameters
idstringRequired

Invoice ID (externalInvoiceId on the payment session)

Header parameters
Idempotency-KeystringOptional

Per-refund idempotency key. A retry with the same key + same body returns the original refund; same key + different body returns 409.

Body
amountCentsinteger · min: 1Optional
reasonstring · max: 500Optional
refundAllbooleanOptionalDefault: false
Responses
200

Replayed prior refund for the same Idempotency-Key

application/json

A refund issued against a successful payment session

idstringOptional
paymentIdstringOptional
invoiceIdstring · nullableOptional
amountCentsintegerOptional
currencystringOptional
statusstring · enumOptionalPossible values:
isFullRefundbooleanOptional
reasonstring · nullableOptional
createdAtstring · date-timeOptional
updatedAtstring · date-timeOptional
post/invoices/{id}/refunds

Notes, examples, or caveats for POST /invoices/{id}/refunds go here.

GET /api/v1/payments/{id}/refunds

List all refunds issued against a payment session

get
/payments/{id}/refunds
Authorizations
X-API-KeystringRequired

Scoped API key. Scopes: read, commerce, admin.

Path parameters
idstringRequired

Payment session ID

Query parameters
limitinteger · min: 1 · max: 100Optional

Max items to return (1–100, default 20)

Default: 20
offsetintegerOptional

Number of items to skip (default 0)

Default: 0
Responses
200

Paginated list of refunds

No content

get/payments/{id}/refunds

No content

Notes, examples, or caveats for GET /payments/{id}/refunds go here.

POST /api/v1/payments/{id}/refunds

Issue a refund against a successful payment session. Supports full refunds (default) and partial refunds via amountCents.

post
/payments/{id}/refunds
Authorizations
X-API-KeystringRequired

Scoped API key. Scopes: read, commerce, admin.

Path parameters
idstringRequired

Payment session ID

Header parameters
Idempotency-KeystringOptional

Per-refund idempotency key. A retry with the same key + same body returns the original refund; same key + different body returns 409.

Body
amountCentsinteger · min: 1Optional

Partial refund amount in cents. Omit to refund the full refundable balance.

reasonstring · max: 500Optional
refundAllbooleanOptional

Explicitly refund the full remaining balance.

Default: false
Responses
200

Replayed prior refund for the same Idempotency-Key

application/json

A refund issued against a successful payment session

idstringOptional
paymentIdstringOptional
invoiceIdstring · nullableOptional
amountCentsintegerOptional
currencystringOptional
statusstring · enumOptionalPossible values:
isFullRefundbooleanOptional
reasonstring · nullableOptional
createdAtstring · date-timeOptional
updatedAtstring · date-timeOptional
post/payments/{id}/refunds

Notes, examples, or caveats for POST /payments/{id}/refunds go here.

Last updated

Was this helpful?