Skip to content

Development environment: content is being written, nothing points to production.

Documentation contents

Guides

Migrating from v2 to v3

What stays the same, what will change and in which order to move from v2 to v3, without downtime.

Nothing forces you to migrate now

The v2 routes (init-payment, GET /payments/{paymentId}) keep being served as they are: same URL, same x-api-key header, same fields, same error codes. When your organisation moves to the new platform, v2 is served by it directly; before that, it is relayed to the current platform. You have nothing to do, and the plugins need no update.

What v3 brings

Topicv2v3 (planned)
Authenticationx-api-key: <organisationId>:<secret>same x-api-key header, new keys kpk_<prefix>:<secret>; current keys keep working
RecipientreceiverWalletIdpaymentAccountId: one payment account of the organisation
Payment methodsacceptedPaymentMethods (bank_card, e-DINAR, flouci)provider codes of the catalogue (clictopay, flouci, izi, mpgs_poste, pluxee)
Currencytokencurrency
Statuspending, completed, ...pending, succeeded, failed, expired, canceled, refunded
Attemptstransactions[]attempts[] with the provider and its reference
Webhookunsigned GET with payment_refJSON POST signed with HMAC (see Webhooks)
ReplaynoIdempotency-Key
Errors{ errors } or { message }{ error, message } with a stable code
Node clientfetch@konnect/sdk, typed from the OpenAPI

Provisional table

The v3 column describes the target of lots 1.2, 1.14 and phase 2. The v3 reference is authoritative: it is generated from the code at every release.

In which order to migrate

  1. Webhooks first. Declare a v3 URL, verify the signature, and keep your v2 webhook alongside. Both can coexist.
  2. Reads next. Read your payments in v3; the reference of a payment created in v2 stays readable in v2.
  3. Creation last. Switch init-payment to the v3 creation with an Idempotency-Key, one payment account at a time.
  4. Remove v2 from your code once no v2 payment is in flight (after the maximum lifespan, 60 minutes).

Status mapping

v2v3
pendingpending
completedsucceeded
failedfailed
expiredexpired
canceledcanceled
refundedrefunded
partialpending with an amount still due