Skip to main content
POST
Charges the card a customer saved at checkout, plus tax. Creem opens an order for the product, charges the card and answers with the result. See Card-on-file Charges for how a card gets saved.
When this works. Card-on-file charges must be enabled for your store, the product must have Auto top-ups switched on, and the customer must have paid for an Auto top-ups product through a Creem checkout with a card. Cards saved by a subscription checkout can’t be charged yet. Otherwise the request is refused and nothing is charged.

Authorization

string
required
Your store’s API key. A key with granular scopes needs saved-card-charges:write.
string
required
A unique key per charge. Sending the same key again returns the same charge and never charges twice. Reusing a key with a different body returns 409 idempotency_key_reused.

Path parameters

string
required
The Creem customer ID, for example cust_123.

Body

string
required
The product to charge for. It must be a one-time product with a fixed price and Auto top-ups switched on.
string
required
Three-letter currency code, for example USD. It must be the currency of the product’s price.
integer
required
The amount before tax, in the smallest currency unit. 2000 is $20.00. Minimum 100, maximum 99999999. Tax is added on top.
object
The credits this charge grants once it is paid, instead of the product’s own credit grant. Required when the product grants credits and amount is not the product’s price.
The saved card permission to charge under. Leave it out to use the customer’s current saved card.

Response

string
The charge ID.
string
charged, declined, expired, or while processing reserved, charging or needs_attention.
integer
The amount you sent, before tax.
integer
The tax Creem added.
integer
The total charged to the card, tax included.
object | null
The credits you set on the charge, or null.
string | null
The order the charge created.
string | null
Why nothing was charged, on a declined or expired charge: card_declined, card_do_not_retry, risk_declined, card_unavailable, charge_unavailable, consent_revoked or product_not_top_up_enabled.

Status codes

Refusal codes

A 422 writes nothing and never touches the card. The response carries one of these codes:

Get a card-on-file charge

GET https://api.creem.io/v1/saved-card-charges/{id} Returns a charge as it is now, with the same fields as above. Use it to follow up a 202. A key with granular scopes needs saved-card-charges:read.