Three changes in your product.
The interface deliberately mirrors the shape your payment code already has: a bearer key, an Idempotency-Key header on every mutating call, and signed webhooks. The concepts map one to one rather than asking you to learn a second model.
- Route Turkish transactions to us
One conditional branch where you create a payment today. Everything else in your checkout stays where it is.
- Redirect the buyer to the checkout URL
A licensed payment institution hosts the payment page. Card data reaches neither you nor us — our scope is PCI-DSS SAQ-A.
- Handle one signed webhook
Verify the signature against the raw body, then act on success. Delivery is at-least-once, so stay idempotent on event.id.
01Create a payment intent.
Send the amount, the event and the organizer’s reference on your side. We return a hosted checkout URL and an estimated breakdown. Redirect the buyer; everything after that is ours until the webhook arrives.
1POST /v1/payment_intents2Authorization: Bearer fk_test_…3Idempotency-Key: 8f14e45f-ea0b-4f1c-9a3d-2b7c8e1f0a5545{6 "amount_minor": 100000,7 "currency": "TRY",8 "event": {9 "external_ref": "evt_platform_9d2h",10 "title": "Tech Meetup Istanbul",11 "type": "conference",12 "starts_at": "2026-09-14T18:00:00+03:00",13 "ends_at": "2026-09-14T21:00:00+03:00"14 },15 "organizer": {16 "external_ref": "usr_platform_4kq1",17 "email": "organizer@example.com"18 },19 "buyer": { "email": "buyer@example.com", "name": "Ada Lovelace" },20 "platform_fee_minor": 5000,21 "return_url": "https://your-platform.com/checkout/complete"22}
1201 Created23{4 "id": "pi_01K4A7BQ2N8XZ3RM5TVWD9GHJF",5 "status": "requires_payment",6 "amount_minor": 100000,7 "currency": "TRY",8 "checkout_url": "https://pay.finletry.com/c/01K4A7BQ2N…",9 "expires_at": "2026-09-01T15:30:00Z",10 "breakdown": {11 "gross_minor": 100000,12 "vat_minor": 16667,13 "platform_fee_minor": 5000,14 "seller_net_minor": 54249,15 "tax_ruleset_version": "2026.02",16 "estimated": true17 },18 "created_at": "2026-09-01T15:00:00Z"19}
event.type drives the VAT rate. Omit it and the highest — safest — rate applies and the order is flagged for review, so always send it.
The breakdown is estimated until capture. Rates resolve from a versioned rule set at the transaction’s own date, and every breakdown names the version it was computed under. The authoritative numbers arrive on payment_intent.succeeded.
02Redirect the buyer, then wait.
Send the buyer to checkout_url. They pay on the hosted page and come back to your return_url whatever the outcome. The return URL must be HTTPS and its host must be on your allow-list as an exact match, otherwise creation fails with return_url_not_allowed.
- Redirect
Your platform sends the buyer to checkout_url.
- Hosted payment page
The buyer pays with a licensed payment institution.
- Back at return_url
Show a pending state, whatever the outcome.
- Webhook arrives
Now act on payment_intent.succeeded.
Arrival is not proof of payment. Show the buyer a pending state and act only on the webhook.
03Verify, then act.
Delivery is at-least-once and retried with exponential backoff before an event moves to a dead-letter queue a human reviews. Respond 2xx within ten seconds and stay idempotent on event.id.
- Delivery
- 1s
- 4s
- 15s
- 60s
- 5m
- 30m
- 2h
- Dead-letter queuea human reviews it
1POST /your/webhook2Finletry-Signature: t=1756742400,v1=5257a869e7ec…34{5 "id": "evt_01K4A7BQ9V4TZ7PN2MQXY8JDHE",6 "type": "payment_intent.succeeded",7 "created_at": "2026-09-01T15:04:00Z",8 "data": { "object": { "id": "pi_01K4A7BQ2N8XZ3RM5TVWD9GHJF" } }9}
1const [t, v1] = header.split(',').map((p) => p.split('=')[1]);23// The RAW body — before any JSON parsing. Re-serialising changes4// key order and whitespace, and the signature stops matching.5const expected = hmacSha256(`${t}.${rawBody}`, webhookSecret);67if (!timingSafeEqual(expected, v1)) return reject();8if (now - Number(t) > 300) return reject(); // five-minute window
Verify against the raw request body, before any JSON parsing. Parsing and re-serialising changes key order and whitespace, and a signature computed over the result will never match — this is the single most common integration bug on any signed webhook.
Every mutating call is idempotent.
Send a fresh UUID per logical operation and retry with the same key. That is what makes a retry safe rather than a second charge — and the key is scoped to your API key, so it can never collide with another partner’s.
ReplayedThe original response, replayed. No new side effect.
409The key is already bound to another request.
409 + Retry-AfterThe first call is still running.
NewRetention has expired; the call executes as new.
Branch on code, never on message.
code is stable. message is written for a developer reading a log and its wording can change without notice. Every response — successful or not — carries X-Request-Id; log it, and support becomes one message instead of three.
| HTTP | Type | Meaning | Retry with the same body |
|---|---|---|---|
| 400 | invalid_request_error | Malformed or missing parameters | No |
| 401 | authentication_error | Missing, invalid or revoked API key | No |
| 403 | permission_error | Key is valid but not allowed for this resource | No |
| 404 | not_found_error | Resource does not exist | No |
| 409 | conflict_error | Idempotency conflict or invalid state transition | No |
| 422 | compliance_error | Blocked by a tax, identity or risk rule | No |
| 429 | rate_limit_error | Too many requests — honour Retry-After | Yes |
| 500 | api_error | Our fault. Safe to retry with the same idempotency key | Yes |
Everything else returns the same answer until something changes on your side — or, for 422, until the underlying condition does. A 422 is deliberately not a 400: the request was well formed and there is nothing in it to fix.
A complete environment, no real data.
The sandbox behaves identically but uses a simulated payment provider, issues no real documents and moves no real money. Identity verification resolves deterministically from the submitted values, so you can test the verified, failed and manual-review paths without touching real personal data.
4111 1111 1111 1111Success4000 0000 0000 0002Declined4000 0000 0000 32203DS challenge required
The rest follows under NDA.
What is on this page is what you need to size the work — the rest is what you need to do it. These are shared during evaluation:
Versioning. The path carries the major version and a breaking change ships as /v2 with a minimum twelve-month overlap. Additive changes — new fields, event types, enum values — can appear in v1 at any time, so parse defensively and ignore what you don’t recognise.
- The full OpenAPI schema
- Reporting and settlement endpoints
- Refund semantics across every leg
- Organizer onboarding payloads
- A sandbox key