One branch. One redirect.
One webhook.

Enough of the interface to estimate the work before you talk to us. The full API contract and a sandbox key follow under NDA.

Your platformFinletryHosted payment pagePOST /v1/payment_intentsBearer key · Idempotency-Key201 · checkout_urlwith an estimated breakdownRedirect to checkout_urlcard data stays on the hosted pagePayment result3-D Secure, licensed institutionBack at return_urlshow pending, not paidpayment_intent.succeededsigned webhook · act on this
  1. You → FinletryPOST /v1/payment_intentsBearer key · Idempotency-Key
  2. Finletry → You201 · checkout_urlwith an estimated breakdown
  3. You → Hosted pageRedirect to checkout_urlcard data stays on the hosted page
  4. Hosted page → FinletryPayment result3-D Secure, licensed institution
  5. Hosted page → YouBack at return_urlshow pending, not paid
  6. Finletry → Youpayment_intent.succeededsigned webhook · act on this

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.

  1. Route Turkish transactions to us

    One conditional branch where you create a payment today. Everything else in your checkout stays where it is.

  2. 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.

  3. 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.

RequestPOST /v1/payment_intents
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}
Response201 Created
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.

  1. Redirect

    Your platform sends the buyer to checkout_url.

  2. Hosted payment page

    The buyer pays with a licensed payment institution.

  3. Back at return_url

    Show a pending state, whatever the outcome.

  4. 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.

  1. Delivery
  2. 1s
  3. 4s
  4. 15s
  5. 60s
  6. 5m
  7. 30m
  8. 2h
  9. Dead-letter queuea human reviews it
DeliveryPOST /your/webhook
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}
Verificationraw body, then act
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.

Same key, same bodyReplayed

The original response, replayed. No new side effect.

Same key, different body409

The key is already bound to another request.

Same key, still in flight409 + Retry-After

The first call is still running.

Key not seen for 24 hoursNew

Retention 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.

HTTPTypeMeaningRetry with the same body
400invalid_request_errorMalformed or missing parametersNo
401authentication_errorMissing, invalid or revoked API keyNo
403permission_errorKey is valid but not allowed for this resourceNo
404not_found_errorResource does not existNo
409conflict_errorIdempotency conflict or invalid state transitionNo
422compliance_errorBlocked by a tax, identity or risk ruleNo
429rate_limit_errorToo many requests — honour Retry-AfterYes
500api_errorOur fault. Safe to retry with the same idempotency keyYes

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 1111Success
  • 4000 0000 0000 0002Declined
  • 4000 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

Send us your current payment flow. We will map it to ours and tell you what changes — before your engineers spend a sprint finding out.