What are Card-on-file Charges?
Card-on-file charges let you charge a customer again on the card they already paid with. The customer buys once through a normal Creem checkout, their card is saved, and from then on your app can charge it with one API call. You decide when to charge and how much. Use it to top up a credit balance when it runs low, to sell an extra pack from inside your app, or to charge for a one-off add-on.Auto top-ups
Refill a customer’s credits when their balance drops below a threshold you set in the dashboard,
or trigger each top-up from your app.
One-click purchases
Let a customer buy more credits or an add-on with one click, without typing their card details
again.
When can you charge a customer?
A charge works only when all of these are true:- Card-on-file charges are enabled for your store. The feature is available on request. Contact support@creem.io to turn it on.
- The product has Auto top-ups switched on. It must be a one-time product with a fixed price. Subscriptions, pay what you want and usage pricing can’t use it.
- The customer has a card on file for that store. They paid for an Auto top-ups product through a Creem checkout with a card, and saw the notice above the Pay button.
- The customer hasn’t stopped it. Charges stop when the customer asks Creem to stop them, when the card is replaced or can no longer be used, or when the customer’s data is erased.
How it works
Set it up
1
Switch on Auto top-ups for a product
In the dashboard, open Products, create or edit a one-time product with a fixed price, and
switch on Auto top-ups in the Pricing section.
Through the API, send

top_ups_enabled: true when you create or update the product.2
Sell the product once through checkout
Send the customer to a normal checkout for that product. Above the Pay button, Creem shows one
line with your store’s name, for example:
By paying, you allow Acme to save this card and charge it later for top-ups. To stop, contact support@creem.io.When the customer pays by card, the card is saved for your store. Free orders save nothing.
3
Charge the card from your app
Call Charge a customer with the customer ID, the product, the
currency and the amount. Creem adds tax, charges the saved card, and answers with the result.
Charge a customer
Send the amount before tax, in the smallest currency unit.2000 is $20.00. Every request needs an Idempotency-Key header, so a retried request never charges twice.
- The amount is yours to set. Any amount from 100 (1.00 in the currency) upwards, within the limits below. The currency must be the currency of the product’s price.
- Tax is added on top. Creem calculates it from the billing address of the checkout where the card was saved, the same way it taxes a checkout payment.
- Credits follow the amount. If the product delivers credits, pass
creditsto grant the number of credits this charge pays for. It replaces the product’s fixed credit grant for this charge. It is required when you charge a credits product at an amount other than its price. Addaccount_idto grant into a specific credits account.
The result
A
202 charge settles on its own. Follow it with Get a card-on-file charge or wait for the webhook.
Webhooks
Limits and declines
Creem caps card-on-file charges to protect your customers and your store:- Per charge, per customer per calendar month (UTC) and per store in any 24 hours, all including tax. A charge over a limit is refused before the card is touched. Contact support@creem.io to learn your store’s limits or to change them.
- Repeated declines pause a card. After 5 declines in 24 hours, or 15 in 30 days, new charges on that card are refused with
reattempt_limituntil the window passes. - Some declines end a card for good. When the bank says the card must never be charged again (for example a lost, stolen or closed card), further charges are refused with
card_do_not_retry. Send the customer a new checkout to save a new card. - Creem never retries a declined charge. Your app decides whether and when to try again.
Good to know
- One card per customer per store. When a customer pays for an Auto top-ups product again, the newer card replaces the old one for your store.
- Refunds work as usual. A charge is an order, so you refund it from the dashboard or the API. A full refund also takes back the credits it granted.
- Customers can stop charges. Today they do so by contacting support@creem.io, as the checkout notice says.
Related
Auto-refill
Refill a customer’s credits automatically when their balance runs low
Charge a customer
Every field, response and error of the charge endpoint
Customer Credits
Give customers a balance of credits to spend in your app
One-time Payments
The products and checkouts card-on-file charges start from