Before you start
- A sandbox API key (
sk_sandbox_...). See Authentication. - A catalog product to override. See Create a product.
How it works
Add apricing object to a product_cart item. Bachs charges the override instead of the product’s catalog price for that checkout only.
checkout_url and confirm with the collection.succeeded webhook. See Accept a payment with Checkout.
Price types
Ad-hoc pricing supports the same price types as catalog prices, with one exception.
A
custom override lets the buyer choose the amount on the hosted checkout page, within your bounds:
price_type: "custom" with the bounds, priced at the preset until the buyer changes it.
One-time vs recurring
The override behaves differently depending on whether the product is one-time or recurring, but in both cases it stays out of your catalog price list.- One-time product. The override is snapshotted on the checkout. No price row is created; nothing changes in your catalog.
- Recurring product. The override becomes the subscription’s price for its whole life. When the subscription activates, Bachs stores the settled amount as an archived, one-off price the subscription ties to.
An ad-hoc price is a one-off. It is never returned by the product price list and cannot be reused across checkouts. To sell at a price repeatedly, add it to the catalog instead.
Testing
Use a sandbox key (sk_sandbox_...) to run the whole flow against test-mode products without moving real funds. See Sandbox.
Next steps
- Accept a payment with Checkout: the full checkout flow ad-hoc pricing plugs into, including charging a raw amount with no product at all.
- Subscriptions: how a recurring ad-hoc price renews.
- The checkout session object: every field the API accepts and returns.

