Collect payment
Payment is not a step at the end of the journey. On most products it sits between confirmation and signature, because the policyholder signs a direct debit mandate at the same moment they sign the contract — and on some products cover does not begin until the first premium has been collected.
Getting the ordering wrong is the most common way an otherwise correct integration stalls: the signature request is rejected, and the error names a payment method rather than the signature.
Korint uses Stripe as its payment processor. We hold the Stripe account; you never call Stripe's API server-side. Your only Stripe interaction is confirming a setup in the customer's browser with a client secret we give you. A customer who pays by bank transfer needs no setup at all: they wire to an IBAN Korint opens for them.
What the product decides
Read these from GET /config/{productId} before writing any payment code:
payment.allowedPaymentModesarrayDIRECT_DEBIT— Korint collects from a stored payment method: a card, a SEPA debit or the customer's bank transfer account.OFFLINE— no card or SEPA debit is charged: an invoice is paid only from money the customer wires to their IBAN (Paying by bank transfer), and otherwise staysISSUEDuntil it is marked settled.
payment.allowedPaymentMethodsarrayAny of
card,sepa_debitandbank_transfer. A card or a SEPA debit is stored through the Stripe setup below;bank_transferis the customer's dedicated IBAN, described in Paying by bank transfer.
payment.paymentMethodOnEarlyPayment / paymentMethodOnRecurringPaymentarrayWhich method types may be charged for the first premium and for recurring premiums. A product can accept a card for the first payment but require a SEPA mandate for the recurring ones. Both can list
bank_transfer: the bank transfer account is then charged when it is the payer's preferred method, or the method a retry names. Signing a policy whose first premium is paid early requires a method of apaymentMethodOnEarlyPaymenttype, and a bank transfer account counts only as the preferred method.
payment.paymentMethodOnBrokenMethodarrayFallback types charged when the normal method is unusable — a dead mandate, for example. Absent means such invoices are left unpaid.
signature.requirePaymentMethodForNewBusinessbooleanWhen true, a new-business contract cannot be sent for signature until a payment method exists for every direct-debit payer.
requireFirstPaymentToActivatebooleanA top-level property of the product config, not part of
payment. When true, a signed contract only comes into force once the first premium has been collected, in addition to reaching its start date. Optional, and absent on all of the demo products — treat a missing value as false.
payment.paymentMethodIsOnBrokerageFirmbooleanWhen true, the payment method belongs to the distributing brokerage firm rather than the customer, and you collect it on the firm's endpoints instead.
Where payment sits in the journey
Collecting a payment method
- Put the payer on direct debit
A payment method can be stored whenever the product's
allowedPaymentModesincludesDIRECT_DEBIT— whatever the customer's current mode. That is also how anOFFLINEcustomer prepares the switch back to direct debit, which requires a usable method already on file.A new customer already has one: the mode is
DIRECT_DEBITwhenever the product'sallowedPaymentModescontains it, whatever the list order — a mixed list never makesOFFLINEa default by accident. The one exception is a product whoseallowedPaymentModesis["OFFLINE"]alone: a full-offline product, whose customers are bornOFFLINEand are invoiced without ever being debited. So this call only matters for a customer who was moved toOFFLINE, and you can skip it otherwise.Switching back to
DIRECT_DEBITfromOFFLINErequires the customer to already hold a usable payment method — the call fails with400 PAYMENT_METHOD_REQUIREDotherwise — and invoices issued while the customer was offline are not charged retroactively, though a transfer to their IBAN still pays them (A transfer that settles unpaid invoices).OFFLINEitself is only accepted on policies billed to a single payer.curl -X PUT 'https://api.staging.korint.io/customers/<customerId>/payment-mode' \--header 'Authorization: Bearer <access_token>' \--header 'tenant: <tenant>' \--header 'Content-Type: application/json' \--data '{ "paymentMode": "DIRECT_DEBIT" }'Asking for a setup secret on a product whose
allowedPaymentModesexcludesDIRECT_DEBITfails withCONFLICTING_CONFIGnamingallowedPaymentModes, and on a product whoseallowedPaymentMethodslists neithercardnorsepa_debitwithCONFLICTING_CONFIGnamingallowedPaymentMethods. - Get a client secretcurl 'https://api.staging.korint.io/customers/<customerId>/payment-methods/secret' \--header 'Authorization: Bearer <access_token>' \--header 'tenant: <tenant>'{ "clientSecret": "seti_<id>_secret_<secret>" }
This is a Stripe SetupIntent client secret, created on our Stripe account and restricted to the product's
allowedPaymentMethods. It is safe to pass to the browser; it authorises setting up one payment method for one customer and nothing else.allowedPaymentMethodscan be wider than what the contract can actually charge: the SetupIntent accepts everything in that list, while recurring premiums are limited topaymentMethodOnRecurringPayment. Render the intersection of the two — pluspaymentMethodOnEarlyPaymentwhen the first payment is an early one — rather than whatever the SetupIntent permits, or Stripe's Payment Element will offer a card tab that stores a method the contract can never charge.The response does not include a publishable key, and no endpoint serves one. Stripe.js must be initialised with the publishable key of our Stripe account for your tenant and environment — ask Korint for it.
Quote the policy before asking for a secret. The customer's counterpart on the payment side is created when the policy is quoted, not when the customer is created. Ask earlier in the journey — after creating the customer, after setting the payment mode, even after
calculate-quote— and you get:404 PAYMENT_CUSTOMER_NOT_FOUNDPOST /policies/{policyId}/quoteis what creates it;calculate-quotedoes not, because it persists nothing. Confirmation creates it too, for contracts that reach that point another way. - Confirm the setup in the browser
Use Stripe.js with the client secret. For a SEPA direct debit the customer enters an IBAN; for a card, card details. Follow Stripe's own guides — we deliberately do not restate them here:
- Stripe SetupIntents
The setup flow the client secret belongs to.
- Stripe Elements
Collecting IBAN or card details in the browser.
We learn the result from Stripe directly, by webhook — you do not report it back to us. The payment method appears on
GET /customers/{customerId}/payment-methodsshortly after the setup succeeds, which makes this an asynchronous step: see Operations that settle after the response. - Stripe SetupIntents
- Have the mandate signed, for SEPA
A SEPA direct debit needs a signed mandate authorising the collections. When the product configures one, request it for the stored method:
curl -X POST 'https://api.staging.korint.io/customers/<customerId>/payment-methods/<paymentMethodId>/signature' \--header 'Authorization: Bearer <access_token>' \--header 'tenant: <tenant>'Payment methods carry one of four statuses:
ACTIVE— usable; a mandate, if required, has been signed.WAITING_MANDATE_SIGNATURE— stored, mandate not yet signed. Accepted for new business, which is what lets the customer sign the contract and the mandate in one session.INVALID_MANDATE— no longer valid; collections will fail.EXPIRED— the underlying method has expired, typically a lapsed card.
Set the method the customer should be charged on with
PUT /customers/{customerId}/payment-methods/{paymentMethodId}/preferredwhen more than one exists.
Replacing a payment method
A card expires, a bank cancels a mandate, a customer changes banks. Replace the method in this order — add, switch, then remove — because Korint refuses to remove the last method it can still charge:
- Collect the new method with the setup above, and wait until it is
ACTIVE: for SEPA, once its mandate is signed. - Make it the preferred method with
PUT /customers/{customerId}/payment-methods/{paymentMethodId}/preferred. Only a type listed inpayment.paymentMethodOnRecurringPaymentcan be preferred — any other answers400 INVALID_PAYMENT_METHOD— so skip this step for a method whose type is only a fallback type. - Remove the old one with
DELETE /customers/{customerId}/payment-methods/{paymentMethodId}. A removed method is no longer charged.
The removal fails with 409 CANNOT_DELETE_LAST_PAYMENT_METHOD when the method is the customer's last
ACTIVE one of a type the product charges: a type in payment.paymentMethodOnRecurringPayment or
payment.paymentMethodOnBrokenMethod, or any type when the product sets no
paymentMethodOnRecurringPayment. The customer's bank transfer account counts only while it is the
preferred method, so making it preferred is how you remove a customer's last card or SEPA debit. A
method that is already INVALID_MANDATE or EXPIRED can always be removed. On a brokerage firm's
endpoints, the rule is the firm's last ACTIVE method of any type.
To collect an invoice that already failed on the old method, retry it on the new one.
Paying by bank transfer
A customer can also pay by wiring money to an IBAN Korint opens for them at Stripe. The product lists
bank_transfer in payment.allowedPaymentMethods, and also in payment.paymentMethodOnRecurringPayment
when the IBAN may be the customer's preferred method. Every transfer to the IBAN lands in the customer's
cash balance, where it waits until Korint uses it to pay an invoice.
- Open the customer's IBANcurl 'https://api.staging.korint.io/customers/<customerId>/bank-transfer-account' \--header 'Authorization: Bearer <access_token>' \--header 'tenant: <tenant>'{"bic": "<bic>","iban": "<iban>","countryCode": "FR","accountHolderName": "<account holder>"}
The first call opens the account, and later calls return the same one: give these details to the customer once. Like the setup secret, the call needs a quoted policy and answers
404 PAYMENT_CUSTOMER_NOT_FOUNDbefore that. On a product that does not listbank_transferinallowedPaymentMethods, it answers409 CONFLICTING_CONFIG. - Make it the preferred method
The IBAN then appears on
GET /customers/{customerId}/payment-methodsas a method of typebank_transfer. It is alwaysACTIVE, and itslast4are the last four characters of the IBAN:{"total": 1,"data": [{"type": "PAYMENT_METHOD","id": "<paymentMethodId>","status": "ACTIVE","paymentMethodType": "bank_transfer","last4": "<last4>","createdAt": "2026-11-20T13:46:35.839Z","updatedAt": "2026-11-20T13:46:35.839Z","metadata": [],"isPreferred": false}]}To have the customer pay their invoices by transfer, make it the preferred method with
PUT /customers/{customerId}/payment-methods/{paymentMethodId}/preferred. Korint never charges the IBAN just because it is the newest method. The account stays open for good: removing it answers403 FORBIDDEN.
What a charge does with the cash balance
When an invoice is charged, Korint reads the cash balance first. If it covers the whole invoice, the
invoice is paid from it, whatever the preferred method. The two exceptions are a
retry that names a paymentMethodId and
an automatic retry: both charge the method they target.
An OFFLINE customer is never charged on a stored method: the cash balance is the only thing Korint
uses, and an invoice it does not cover stays ISSUED.
Otherwise Korint charges the preferred method. When that is the IBAN, the payment waits for the customer's transfer:
amountRemainingInEuroCents, on the payment returned byGET /customers/{customerId}/payments, is what the customer still has to wire. It goes down with each transfer, so the customer can pay in several.bankTransferReference, on the same payment, is the reference the customer puts on their transfer. When several of their payments wait, Stripe funds the one whose reference the transfer carries; without it, Stripe looks for payments matching the amount, then the oldest (Stripe's reconciliation).- If the product is set up for it, Korint emails the payer the IBAN, the amount to wire and the reference.
- After 14 days without enough transfers, Korint cancels the payment. The invoice becomes
PAYMENT_FAILEDand enters unpaid recovery like any failed payment, and what the transfers had already paid goes back to the cash balance.
A transfer that settles unpaid invoices
When a transfer reaches a customer's IBAN, whether they pay by direct debit or offline, Korint pays their
ISSUED, PAYMENT_FAILED and PAYMENT_DISPUTED invoices from the cash balance, oldest first. An ISSUED
invoice is one no charge has paid yet, typically one issued while the customer paid offline. Korint pays an
invoice only when the balance covers it in full, without counting money already owed to a waiting bank
transfer payment. An invoice the balance cannot cover stays as it was.
Reading the cash balance
curl 'https://api.staging.korint.io/customers/<customerId>/cash-balance' \
--header 'Authorization: Bearer <access_token>' \
--header 'tenant: <tenant>'
{ "cashBalanceInEuroCents": 12345 }
This is the money received and not yet applied to a payment, 0 for a customer without an IBAN. It is
unrelated to the customer balance, which
compares invoices with payments. Money left unused for 75 days is
sent back to the customer's bank by Stripe,
each transfer on its own 75-day clock.
When the first premium is taken
invoicingConfig.firstPayment decides this, and it is a value you set on the policy:
NONE— no distinct first payment; the contract is billed on its normal schedule.FULL_AT_SIGNATURE/EARLY_PAYMENT_AT_SIGNATURE— charged when the contract is signed, either the full first premium or an early-payment portion.FULL_AT_START_DATE/EARLY_PAYMENT_AT_START_DATE— charged when cover begins.
If the product also sets requireFirstPaymentToActivate, cover does not begin until that payment has
been collected. A contract that is signed, with a start date in the past, and still not in force is
usually waiting on exactly this — not on a failure. isAwaitingFirstPayment on the policy tells you so;
read the invoices from GET /customers/{customerId}/invoices.
POST /customers/{customerId}/retry-charge re-attempts a failed collection, and
GET /customers/{customerId}/balance shows what is outstanding. For what happens when payments keep
failing, see Manage unpaid invoices.
Source of NO_VALID_PAYMENT_METHODS on a signature request. POST /policies/{policyId}/signature
is refused when the branch is new business, the payer is on DIRECT_DEBIT, the product sets
signature.requirePaymentMethodForNewBusiness, and no payment method for that payer is ACTIVE or
WAITING_MANDATE_SIGNATURE.
An early-payment firstPayment adds a second condition that is easy to miss: the payer also needs a
method whose type appears in payment.paymentMethodOnEarlyPayment, so a stored SEPA mandate does not
satisfy a product that takes the first payment by card. A bank transfer account satisfies the first
condition, being ACTIVE, but never the second.
The ordering to implement is confirm → payment mode → client secret → browser setup → mandate request → signature.