Gallery Platform API
Reference

Arm or disarm installment auto-charge

Arms an installment to be charged off-session against a saved payment method on its due date (or disarms it with `method_id: null`). A decline is surfaced on the installment and can be retried by re-arming.

POST
/gallery/invoices/{id}/payment-schedule/{scheduleId}/auto-charge

Arms an installment to be charged off-session against a saved payment method on its due date (or disarms it with method_id: null). A decline is surfaced on the installment and can be retried by re-arming.

Authorization

bearerAuth payments:write
AuthorizationBearer <token>

A gallery API key, sent as Authorization: Bearer gpk_… (or the x-api-key header).

In: header

Scope: payments:write

Path Parameters

id*string
scheduleId*string

Header Parameters

Idempotency-Key?string

Optional. Send a unique key per logical operation to make retries safe: a retry with the same key replays the stored success for 14 days instead of re-running the write. Reusing a key with a different body returns 400.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Arm or disarm off-session auto-charge of a saved method for an installment.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

{  "id": "string",  "invoice_id": "string",  "sequence": -9007199254740991,  "label": "string",  "amount_cents": -9007199254740991,  "due_date": "string",  "status": "scheduled",  "payment_id": "string",  "auto_charge_method_id": "string",  "auto_charge_attempted_at": "string",  "auto_charge_error": "string",  "reminder_sent_at": "string",  "created_at": "string",  "updated_at": "string"}