Build once.
Bring your next site.
Your application knows what the customer is buying. OK Payments handles checkout and tells your server what was paid.
The flow
- Your server authenticates the customer and chooses an approved offer.
- It requests a checkout using its own private site credential.
- Your site redirects to hosted checkout, or mounts Stripe's embedded checkout.
- A verified payment event reaches your server. Your application applies the purchase once and saves its receipt.
Create a checkout
Call from your server. Keep the same idempotency key when retrying the same purchase. Never send an API credential to a browser or desktop app.
POST /v1/checkouts
Authorization: Bearer <site-secret>
X-OKPMT-Environment: test
Idempotency-Key: order-000000001042
Content-Type: application/json
{
"account_id": "your-customer-id",
"external_order_id": "order-000000001042",
"offer_id": "regular",
"ui_mode": "hosted",
"success_url": "https://theimagechimp.com/app?checkout=success",
"cancel_url": "https://theimagechimp.com/app?checkout=cancelled"
}
Offers, prices and return URLs are registered for each site. A different price or customer supplied by a browser must not override the server's order. Custom quotes require an additional permission and stay within the site's configured limits.
Hosted or embedded
| Integration | What your site does |
|---|---|
| Hosted checkout | Create a checkout on your server, then redirect the customer to the returned Stripe URL. |
| Embedded checkout | Request ui_mode: embedded with an approved return_url. Pass the checkout client secret to Stripe.js for that authenticated customer. |
| Billing portal | Verify the customer's billing permissions, then create a short-lived portal session from your server. |
Card details go directly to Stripe. Return pages and browser callbacks never unlock a product or add credits.
Receive the result
Each site gets its own signed event stream and reconciliation cursor. Store the event receipt and business effect in one database transaction. A retry can deliver the same payment more than once; the payment grant must be applied only once.
Subscription state and credit balance have different jobs. A paid monthly invoice adds that month's credits. Cancellation ends future grants. Image Chimp keeps its unused credits and its own usage ledger.
First integration: The Image Chimp
| Offer | Price | Photo credits |
|---|---|---|
| Pro | $10 / month | 500 each paid month |
| Whole Roll | $15 / month | 1,500 each paid month |
| One-time pack | $5 once | 100 |
| Pro top-up | $5 once | 250; active Pro required |
| Whole Roll top-up | $5 once | 500; active Whole Roll required |
Pocket remains a legacy offer. The account trial stays in Image Chimp and is separate from Stripe subscriptions.
Before accepting payments
The first release is being prepared for fixed-price purchases and subscriptions. Tax handling, customer policies, supported countries, account activation and each site's deployed integration must be accepted before sales open. Plan changes, proration, coupons, marketplace payouts and usage-based invoicing are outside this initial integration.
Each site must belong to the verified seller. A separate business needs its own Stripe arrangement and account boundary.
API reference
Download the OpenAPI specification for the private preparation build. Event delivery currently uses authenticated polling. Push delivery is not enabled.