checkout
Version 0.1.011 opérations
What the checkout shows on a payment page preview (public)
GET/checkout/preview/{token}
Paramètres
tokenstringpathobligatoireamountanyquerySample amount in millimes (default 10000, that is 10 TND)
Réponses
200
referencestringobligatoirestatusstringobligatoire- enum: "pending", "succeeded", "failed", "expired", "canceled"
amountnumberobligatoirecurrencystringobligatoiredescriptionstring | nullobligatoireorderIdstring | nullobligatoireThe merchant's order number, shown to the payer in the order summary (spec 2.2)
expiresAtstring (date-time)obligatoiremerchantCheckoutMerchantDtoobligatoiredisplayNamestringobligatoirethemeColorstring | nullobligatoirelogoUrlstring | nullobligatoirePublic URL of the payment account logo (GET /checkout/:reference/logo); null without a logo
providersCheckoutProviderDto[]obligatoireProviders the payer may choose right now (routed to an active affiliation)
codestringobligatoire- enum: "clictopay", "flouci", "izi", "mpgs_poste", "pluxee", "kashy", "enda_tao"
namestringobligatoiretestModebooleanobligatoireTrue when paying here is a test (sandbox affiliation or fake connector): the checkout shows its test mode badge. False for a verified production affiliation, which makes real payments.
successUrlstring | nullobligatoirefailUrlstring | nullobligatoiresuccessMessagestring | nullobligatoireMessage of the payment link for the success page (lot 2.5), null otherwise
returnOnSuccessbooleanobligatoireSend the payer to successUrl as soon as the payment succeeds (payments of the v2 facade and the plugins, lot 2.4)
pricenumber | nullobligatoireLot 2.7: the price when a payment fee was added to the buyer (amount = price + buyerFee)
buyerFeenumber | nullobligatoireLot 2.7: the payment fee added to the buyer
previewbooleanobligatoireLot 2.8: true on the preview of a payment page (GET /checkout/preview/:token): nothing can be paid, the checkout disables the pay button
- default: false
404checkout_preview_invalid, checkout_preview_expired
429rate_limited (Retry-After)
Exemples de code
curl -X GET "$KONNECT_API_URL/checkout/preview/token"Exemple : 200
{
"reference": "665f1c2e8b3a4d0012ab34cd",
"status": "pending",
"amount": 12500,
"currency": "TND",
"description": "description",
"orderId": "order-1001",
"expiresAt": "2026-10-01T09:30:00.000Z",
"merchant": {
"displayName": "Boutique Exemple",
"themeColor": "#1a2b3c",
"logoUrl": "logoUrl"
},
"providers": [
{
"code": "clictopay",
"name": "ClicToPay",
"testMode": true
}
],
"successUrl": "successUrl",
"failUrl": "failUrl",
"successMessage": "successMessage",
"returnOnSuccess": true,
"price": 1,
"buyerFee": 1,
"preview": false
}Logo of the account of a payment page preview (public)
GET/checkout/preview/{token}/logo
Paramètres
tokenstringpathobligatoire
Réponses
200The image
404checkout_preview_invalid, checkout_preview_expired, logo_not_found
429rate_limited (Retry-After)
Exemples de code
curl -X GET "$KONNECT_API_URL/checkout/preview/token/logo"Exemple : 200
"string"What the checkout shows for a payment (public, no merchant data)
GET/checkout/{reference}
Paramètres
referencestringpathobligatoireviewstringqueryWhich checkout page reads the payment. Only
payment(the default) counts as a checkout open on the payment timeline; the result and attempt pages, which poll, pass their own view.- enum: "payment", "result", "attempt"
Réponses
200
referencestringobligatoirestatusstringobligatoire- enum: "pending", "succeeded", "failed", "expired", "canceled"
amountnumberobligatoirecurrencystringobligatoiredescriptionstring | nullobligatoireorderIdstring | nullobligatoireThe merchant's order number, shown to the payer in the order summary (spec 2.2)
expiresAtstring (date-time)obligatoiremerchantCheckoutMerchantDtoobligatoiredisplayNamestringobligatoirethemeColorstring | nullobligatoirelogoUrlstring | nullobligatoirePublic URL of the payment account logo (GET /checkout/:reference/logo); null without a logo
providersCheckoutProviderDto[]obligatoireProviders the payer may choose right now (routed to an active affiliation)
codestringobligatoire- enum: "clictopay", "flouci", "izi", "mpgs_poste", "pluxee", "kashy", "enda_tao"
namestringobligatoiretestModebooleanobligatoireTrue when paying here is a test (sandbox affiliation or fake connector): the checkout shows its test mode badge. False for a verified production affiliation, which makes real payments.
successUrlstring | nullobligatoirefailUrlstring | nullobligatoiresuccessMessagestring | nullobligatoireMessage of the payment link for the success page (lot 2.5), null otherwise
returnOnSuccessbooleanobligatoireSend the payer to successUrl as soon as the payment succeeds (payments of the v2 facade and the plugins, lot 2.4)
pricenumber | nullobligatoireLot 2.7: the price when a payment fee was added to the buyer (amount = price + buyerFee)
buyerFeenumber | nullobligatoireLot 2.7: the payment fee added to the buyer
previewbooleanobligatoireLot 2.8: true on the preview of a payment page (GET /checkout/preview/:token): nothing can be paid, the checkout disables the pay button
- default: false
404payment_not_found
429rate_limited (Retry-After)
Exemples de code
curl -X GET "$KONNECT_API_URL/checkout/reference"Exemple : 200
{
"reference": "665f1c2e8b3a4d0012ab34cd",
"status": "pending",
"amount": 12500,
"currency": "TND",
"description": "description",
"orderId": "order-1001",
"expiresAt": "2026-10-01T09:30:00.000Z",
"merchant": {
"displayName": "Boutique Exemple",
"themeColor": "#1a2b3c",
"logoUrl": "logoUrl"
},
"providers": [
{
"code": "clictopay",
"name": "ClicToPay",
"testMode": true
}
],
"successUrl": "successUrl",
"failUrl": "failUrl",
"successMessage": "successMessage",
"returnOnSuccess": true,
"price": 1,
"buyerFee": 1,
"preview": false
}Send the payer back to the merchant (public)
GET/checkout/{reference}/return
Records payer_redirected_to_merchant on the payment timeline and redirects to the success URL (succeeded payment), the fail URL, or the checkout result page when the payment is still pending or the merchant gave no URL.
Paramètres
referencestringpathobligatoireoutcomestringquery- enum: "success", "fail"
Réponses
302Redirect to the merchant or the result page
404payment_not_found
429rate_limited (Retry-After)
Exemples de code
curl -X GET "$KONNECT_API_URL/checkout/reference/return"Logo of the payment account of a payment (public, PNG, JPEG or WebP)
GET/checkout/{reference}/logo
Paramètres
referencestringpathobligatoire
Réponses
200The image
404payment_not_found, logo_not_found
429rate_limited (Retry-After)
Exemples de code
curl -X GET "$KONNECT_API_URL/checkout/reference/logo"Exemple : 200
"string"Payment status for the result page polling (public)
GET/checkout/{reference}/status
Paramètres
referencestringpathobligatoire
Réponses
200
referencestringobligatoirestatusstringobligatoire- enum: "pending", "succeeded", "failed", "expired", "canceled"
providerstring | nullobligatoireexpiresAtstring (date-time)obligatoiresuccessUrlstring | nullobligatoirefailUrlstring | nullobligatoiresuccessMessagestring | nullobligatoireMessage of the payment link for the success page (lot 2.5), null otherwise
404payment_not_found
429rate_limited (Retry-After)
Exemples de code
curl -X GET "$KONNECT_API_URL/checkout/reference/status"Exemple : 200
{
"reference": "665f1c2e8b3a4d0012ab34cd",
"status": "pending",
"provider": "provider",
"expiresAt": "2026-10-01T09:30:00.000Z",
"successUrl": "successUrl",
"failUrl": "failUrl",
"successMessage": "successMessage"
}What the payer sees of a payment link (public)
GET/links/{slug}
Paramètres
slugstringpathobligatoire
Réponses
200
slugstringobligatoiretitlestringobligatoiredescriptionstring | nullobligatoirestatusstringobligatoire- enum: "active", "disabled", "expired", "completed"
amountTypestringobligatoire- enum: "fixed", "open"
amountnumber | nullobligatoireminAmountnumber | nullobligatoiremaxAmountnumber | nullobligatoirecurrencystringobligatoirepayerFieldsPayerFieldSettingsDtoobligatoirenamestringobligatoire- enum: "hidden", "optional", "required"
emailstringobligatoire- enum: "hidden", "optional", "required"
phonestringobligatoire- enum: "hidden", "optional", "required"
expiresAtstring (date-time) | nullobligatoiremerchantCheckoutMerchantDtoobligatoiredisplayNamestringobligatoirethemeColorstring | nullobligatoirelogoUrlstring | nullobligatoirePublic URL of the payment account logo (GET /checkout/:reference/logo); null without a logo
providersCheckoutProviderDto[]obligatoireProviders the payer may choose right now on this link (routed to an active affiliation), each with its test mode. The link page is the whole checkout: the payer picks one there.
codestringobligatoire- enum: "clictopay", "flouci", "izi", "mpgs_poste", "pluxee", "kashy", "enda_tao"
namestringobligatoiretestModebooleanobligatoireTrue when paying here is a test (sandbox affiliation or fake connector): the checkout shows its test mode badge. False for a verified production affiliation, which makes real payments.
buyerFeenumber | nullobligatoireLot 2.7: the payment fee added to the buyer for a fixed amount link (the payer pays amount + buyerFee), null when the merchant pays the fee
feeAddedbooleanobligatoireLot 2.7: the payment fee is added to the buyer on this link (open amounts: computed at payment)
404payment_link_not_found
429rate_limited (Retry-After)
Exemples de code
curl -X GET "$KONNECT_API_URL/links/slug"Exemple : 200
{
"slug": "Ab3dE6gH9jK2",
"title": "title",
"description": "description",
"status": "active",
"amountType": "fixed",
"amount": 1,
"minAmount": 1,
"maxAmount": 1,
"currency": "TND",
"payerFields": {
"name": "hidden",
"email": "buyer@example.com",
"phone": "hidden"
},
"expiresAt": "2026-10-01T09:30:00.000Z",
"merchant": {
"displayName": "Boutique Exemple",
"themeColor": "#1a2b3c",
"logoUrl": "logoUrl"
},
"providers": [
{
"code": "clictopay",
"name": "ClicToPay",
"testMode": true
}
],
"buyerFee": 1,
"feeAdded": true
}Logo of the payment account of a link (public, PNG, JPEG or WebP)
GET/links/{slug}/logo
Paramètres
slugstringpathobligatoire
Réponses
200The image
404payment_link_not_found, logo_not_found
429rate_limited (Retry-After)
Exemples de code
curl -X GET "$KONNECT_API_URL/links/slug/logo"Exemple : 200
"string"Start a payment from a link (public)
POST/links/{slug}/payments
Creates a payment (channel link) for this payer and answers its checkout URL, where the payer picks a provider.
Paramètres
slugstringpathobligatoire
Corps de la requête application/json
amountnumberRequired on an open-amount link, minor units
payerLinkPayerDtofirstNamestringlastNamestringemailstringphonestring
Réponses
201
referencestringobligatoirepayUrlstringobligatoireCheckout page where the payer picks a provider
400validation_failed, amount_required, amount_out_of_bounds, payer_field_required
404payment_link_not_found
409link_disabled, link_expired, link_completed, link_busy, payment_account_inactive
429rate_limited (Retry-After)
Exemples de code
curl -X POST "$KONNECT_API_URL/links/slug/payments" \
-H "Content-Type: application/json" \
-d '{
"amount": 25000,
"payer": {
"firstName": "Sami",
"lastName": "Test",
"email": "payer@example.test",
"phone": "+21600000000"
}
}'Exemple : corps de la requête
{
"amount": 25000,
"payer": {
"firstName": "Sami",
"lastName": "Test",
"email": "payer@example.test",
"phone": "+21600000000"
}
}Exemple : 201
{
"reference": "665f1c2e8b3a4d0012ab34cd",
"payUrl": "payUrl"
}Open an attempt at a provider (public)
POST/checkout/{reference}/attempts
Decrypts the routed affiliation for the purpose "payment", calls initPayment and returns where to send the payer: a redirect URL, a QR code or form parameters.
Paramètres
referencestringpathobligatoire
Corps de la requête application/json
providerstringobligatoire- enum: "clictopay", "flouci", "izi", "mpgs_poste", "pluxee", "kashy", "enda_tao"
Réponses
201
attemptIdstring (uuid)obligatoireproviderstringobligatoire- enum: "clictopay", "flouci", "izi", "mpgs_poste", "pluxee", "kashy", "enda_tao"
kindstringobligatoire- enum: "redirect", "qr", "form"
redirectUrlstringWhere to send the payer (kind redirect)
qrAttemptQrDtocontentstringobligatoireContent to render as a QR code
codePaystringShort code the payer may type instead
formobjectProvider form parameters (kind form, for example an MPGS checkout session)
409payment_not_pending, payment_expired, provider_not_accepted, too_many_attempts
429rate_limited (Retry-After)
502provider_init_failed (with providerErrorCode)
Exemples de code
curl -X POST "$KONNECT_API_URL/checkout/reference/attempts" \
-H "Content-Type: application/json" \
-d '{
"provider": "clictopay"
}'Exemple : corps de la requête
{
"provider": "clictopay"
}Exemple : 201
{
"attemptId": "attemptId",
"provider": "clictopay",
"kind": "redirect",
"redirectUrl": "redirectUrl",
"qr": {
"content": "content",
"codePay": "codePay"
},
"form": {}
}An attempt of a payment as the checkout shows it again (public)
GET/checkout/{reference}/attempts/{attemptId}
Kind, status and the payer-facing payload (redirect URL, QR code or form parameters), for the QR page, the hosted form page and the result page.
Paramètres
referencestringpathobligatoireattemptIdstringpathobligatoire
Réponses
200
attemptIdstring (uuid)obligatoireproviderstringobligatoire- enum: "clictopay", "flouci", "izi", "mpgs_poste", "pluxee", "kashy", "enda_tao"
kindstringobligatoire- enum: "redirect", "qr", "form"
redirectUrlstringWhere to send the payer (kind redirect)
qrAttemptQrDtocontentstringobligatoireContent to render as a QR code
codePaystringShort code the payer may type instead
formobjectProvider form parameters (kind form, for example an MPGS checkout session)
statusstringobligatoire- enum: "created", "redirected", "pending", "succeeded", "failed", "canceled", "expired", "refunded"
paymentStatusstringobligatoire- enum: "pending", "succeeded", "failed", "expired", "canceled"
testModebooleanobligatoireTrue when this attempt is a test (sandbox affiliation or fake connector)
404payment_not_found, attempt_not_found
429rate_limited (Retry-After)
Exemples de code
curl -X GET "$KONNECT_API_URL/checkout/reference/attempts/attemptId"Exemple : 200
{
"attemptId": "attemptId",
"provider": "clictopay",
"kind": "redirect",
"redirectUrl": "redirectUrl",
"qr": {
"content": "content",
"codePay": "codePay"
},
"form": {},
"status": "created",
"paymentStatus": "pending",
"testMode": true
}