Aller au contenu

Environnement de développement : contenu en cours de rédaction, rien ne pointe vers la production.

Sommaire de la documentation

payment-links

Version 0.1.08 opérations

Payment links of the organisation, newest first, keyset paginated

GET/payment-linksClé API

Paramètres

  • cursoranyquery
  • limitintegerquery
    • max: 200
    • default: 50
  • qanyquery

    Title contains (case insensitive)

  • accountanyquery

    Payment account id

  • statusstringquery
    • enum: "active", "disabled", "expired", "completed"
  • organisationIdanyquery

    Required with a session

Réponses

  • 200

    • itemsPaymentLinkDto[]obligatoire
      • idstring (uuid)obligatoire
      • slugstringobligatoire
      • urlstringobligatoire

        Public page of the link on the checkout

      • organisationIdstring (uuid)obligatoire
      • paymentAccountIdstring (uuid)obligatoire
      • titlestringobligatoire
      • descriptionstring | nullobligatoire
      • amountTypestringobligatoire
        • enum: "fixed", "open"
      • amountnumber | nullobligatoire
      • minAmountnumber | nullobligatoire
      • maxAmountnumber | nullobligatoire
      • currencystringobligatoire
      • usagestringobligatoire
        • enum: "single", "reusable"
      • maxUsesnumber | nullobligatoire
      • expiresAtstring (date-time) | nullobligatoire
      • acceptedProvidersstring[]obligatoire
      • payerFieldsPayerFieldSettingsDtoobligatoire
        • namestringobligatoire
          • enum: "hidden", "optional", "required"
        • emailstringobligatoire
          • enum: "hidden", "optional", "required"
        • phonestringobligatoire
          • enum: "hidden", "optional", "required"
      • successMessagestring | nullobligatoire
      • redirectUrlstring | nullobligatoire
      • statusstringobligatoire

        Effective status (expired from expiresAt)

        • enum: "active", "disabled", "expired", "completed"
      • paymentsCountnumberobligatoire

        Payments started from the link

      • succeededCountnumberobligatoire
      • collectedAmountnumberobligatoire

        Sum of the succeeded amounts, minor units

      • disabledAtstring (date-time) | nullobligatoire
      • createdAtstring (date-time)obligatoire
      • updatedAtstring (date-time)obligatoire
    • nextCursorstring | nullobligatoire

Exemples de code

curl -X GET "$KONNECT_API_URL/payment-links" \
  -H "x-api-key: $KONNECT_API_KEY"

Exemple : 200

{
  "items": [
    {
      "id": "id",
      "slug": "Ab3dE6gH9jK2",
      "url": "url",
      "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
      "paymentAccountId": "paymentAccountId",
      "title": "title",
      "description": "description",
      "amountType": "fixed",
      "amount": 1,
      "minAmount": 1,
      "maxAmount": 1,
      "currency": "TND",
      "usage": "single",
      "maxUses": 1,
      "expiresAt": "2026-10-01T09:30:00.000Z",
      "acceptedProviders": [
        "clictopay"
      ],
      "payerFields": {
        "name": "hidden",
        "email": "buyer@example.com",
        "phone": "hidden"
      },
      "successMessage": "successMessage",
      "redirectUrl": "redirectUrl",
      "status": "active",
      "paymentsCount": 1,
      "succeededCount": 1,
      "collectedAmount": 1,
      "disabledAt": "2026-10-01T09:30:00.000Z",
      "createdAt": "2026-10-01T09:30:00.000Z",
      "updatedAt": "2026-10-01T09:30:00.000Z"
    }
  ],
  "nextCursor": "nextCursor"
}

Create a payment link

POST/payment-linksClé API

A fixed or open amount, single use or reusable (with an optional cap), an optional expiry. Honours the Idempotency-Key header.

Paramètres

  • Idempotency-Keystringheader

Corps de la requête application/json

  • descriptionstring | null
    • maxLength: 500
  • amountnumber | null

    Fixed amount, minor units

  • minAmountnumber | null

    Open amount: lower bound (default 100)

  • maxAmountnumber | null

    Open amount: upper bound

  • maxUsesnumber | null

    Reusable: successful payments accepted; null for no limit

    • max: 100000
  • expiresAtstring (date-time) | null
  • acceptedProvidersstring[]

    Providers offered, within the account routing; empty or omitted: every routed one

  • payerFieldsPayerFieldsDto
    • namestring

      First and last name

      • enum: "hidden", "optional", "required"
    • emailstring

      Receives the receipt

      • enum: "hidden", "optional", "required"
    • phonestring
      • enum: "hidden", "optional", "required"
  • successMessagestring | null
    • maxLength: 280
  • redirectUrlstring | null
  • organisationIdstring (uuid)

    Required with a session; ignored with an API key

  • paymentAccountIdstring (uuid)

    The default account when omitted

  • titlestringobligatoire
    • maxLength: 80
  • amountTypestringobligatoire

    fixed: amount; open: the payer types it

    • enum: "fixed", "open"
  • usagestringobligatoire

    single: one successful payment

    • enum: "single", "reusable"

Réponses

  • 201

    • idstring (uuid)obligatoire
    • slugstringobligatoire
    • urlstringobligatoire

      Public page of the link on the checkout

    • organisationIdstring (uuid)obligatoire
    • paymentAccountIdstring (uuid)obligatoire
    • titlestringobligatoire
    • descriptionstring | nullobligatoire
    • amountTypestringobligatoire
      • enum: "fixed", "open"
    • amountnumber | nullobligatoire
    • minAmountnumber | nullobligatoire
    • maxAmountnumber | nullobligatoire
    • currencystringobligatoire
    • usagestringobligatoire
      • enum: "single", "reusable"
    • maxUsesnumber | nullobligatoire
    • expiresAtstring (date-time) | nullobligatoire
    • acceptedProvidersstring[]obligatoire
    • payerFieldsPayerFieldSettingsDtoobligatoire
      • namestringobligatoire
        • enum: "hidden", "optional", "required"
      • emailstringobligatoire
        • enum: "hidden", "optional", "required"
      • phonestringobligatoire
        • enum: "hidden", "optional", "required"
    • successMessagestring | nullobligatoire
    • redirectUrlstring | nullobligatoire
    • statusstringobligatoire

      Effective status (expired from expiresAt)

      • enum: "active", "disabled", "expired", "completed"
    • paymentsCountnumberobligatoire

      Payments started from the link

    • succeededCountnumberobligatoire
    • collectedAmountnumberobligatoire

      Sum of the succeeded amounts, minor units

    • disabledAtstring (date-time) | nullobligatoire
    • createdAtstring (date-time)obligatoire
    • updatedAtstring (date-time)obligatoire
  • 400validation_failed, amount_required, amount_not_allowed, amount_bounds_invalid, max_uses_invalid, expiry_invalid, provider_not_routed

  • 403permission_denied or account_out_of_scope

  • 409payment_account_inactive

Exemples de code

curl -X POST "$KONNECT_API_URL/payment-links" \
  -H "x-api-key: $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "description",
  "amount": 25000,
  "minAmount": 1,
  "maxAmount": 1,
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "https://shop.example.test/merci",
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "paymentAccountId": "paymentAccountId",
  "title": "Cours de yoga, séance du samedi",
  "amountType": "fixed",
  "usage": "single"
}'

Exemple : corps de la requête

{
  "description": "description",
  "amount": 25000,
  "minAmount": 1,
  "maxAmount": 1,
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "https://shop.example.test/merci",
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "paymentAccountId": "paymentAccountId",
  "title": "Cours de yoga, séance du samedi",
  "amountType": "fixed",
  "usage": "single"
}

Exemple : 201

{
  "id": "id",
  "slug": "Ab3dE6gH9jK2",
  "url": "url",
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "paymentAccountId": "paymentAccountId",
  "title": "title",
  "description": "description",
  "amountType": "fixed",
  "amount": 1,
  "minAmount": 1,
  "maxAmount": 1,
  "currency": "TND",
  "usage": "single",
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "redirectUrl",
  "status": "active",
  "paymentsCount": 1,
  "succeededCount": 1,
  "collectedAmount": 1,
  "disabledAt": "2026-10-01T09:30:00.000Z",
  "createdAt": "2026-10-01T09:30:00.000Z",
  "updatedAt": "2026-10-01T09:30:00.000Z"
}

One payment link

GET/payment-links/{linkId}Clé API

Paramètres

  • linkIdstringpathobligatoire

Réponses

  • 200

    • idstring (uuid)obligatoire
    • slugstringobligatoire
    • urlstringobligatoire

      Public page of the link on the checkout

    • organisationIdstring (uuid)obligatoire
    • paymentAccountIdstring (uuid)obligatoire
    • titlestringobligatoire
    • descriptionstring | nullobligatoire
    • amountTypestringobligatoire
      • enum: "fixed", "open"
    • amountnumber | nullobligatoire
    • minAmountnumber | nullobligatoire
    • maxAmountnumber | nullobligatoire
    • currencystringobligatoire
    • usagestringobligatoire
      • enum: "single", "reusable"
    • maxUsesnumber | nullobligatoire
    • expiresAtstring (date-time) | nullobligatoire
    • acceptedProvidersstring[]obligatoire
    • payerFieldsPayerFieldSettingsDtoobligatoire
      • namestringobligatoire
        • enum: "hidden", "optional", "required"
      • emailstringobligatoire
        • enum: "hidden", "optional", "required"
      • phonestringobligatoire
        • enum: "hidden", "optional", "required"
    • successMessagestring | nullobligatoire
    • redirectUrlstring | nullobligatoire
    • statusstringobligatoire

      Effective status (expired from expiresAt)

      • enum: "active", "disabled", "expired", "completed"
    • paymentsCountnumberobligatoire

      Payments started from the link

    • succeededCountnumberobligatoire
    • collectedAmountnumberobligatoire

      Sum of the succeeded amounts, minor units

    • disabledAtstring (date-time) | nullobligatoire
    • createdAtstring (date-time)obligatoire
    • updatedAtstring (date-time)obligatoire
  • 404payment_link_not_found

Exemples de code

curl -X GET "$KONNECT_API_URL/payment-links/linkId" \
  -H "x-api-key: $KONNECT_API_KEY"

Exemple : 200

{
  "id": "id",
  "slug": "Ab3dE6gH9jK2",
  "url": "url",
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "paymentAccountId": "paymentAccountId",
  "title": "title",
  "description": "description",
  "amountType": "fixed",
  "amount": 1,
  "minAmount": 1,
  "maxAmount": 1,
  "currency": "TND",
  "usage": "single",
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "redirectUrl",
  "status": "active",
  "paymentsCount": 1,
  "succeededCount": 1,
  "collectedAmount": 1,
  "disabledAt": "2026-10-01T09:30:00.000Z",
  "createdAt": "2026-10-01T09:30:00.000Z",
  "updatedAt": "2026-10-01T09:30:00.000Z"
}

Change a payment link

PATCH/payment-links/{linkId}Clé API

Any setting but the payment account and the slug. Payments already started keep their amounts. Raising the cap of a completed link makes it active again.

Paramètres

  • linkIdstringpathobligatoire

Corps de la requête application/json

  • descriptionstring | null
    • maxLength: 500
  • amountnumber | null

    Fixed amount, minor units

  • minAmountnumber | null

    Open amount: lower bound (default 100)

  • maxAmountnumber | null

    Open amount: upper bound

  • maxUsesnumber | null

    Reusable: successful payments accepted; null for no limit

    • max: 100000
  • expiresAtstring (date-time) | null
  • acceptedProvidersstring[]

    Providers offered, within the account routing; empty or omitted: every routed one

  • payerFieldsPayerFieldsDto
    • namestring

      First and last name

      • enum: "hidden", "optional", "required"
    • emailstring

      Receives the receipt

      • enum: "hidden", "optional", "required"
    • phonestring
      • enum: "hidden", "optional", "required"
  • successMessagestring | null
    • maxLength: 280
  • redirectUrlstring | null
  • titlestring
    • maxLength: 80
  • amountTypestring
    • enum: "fixed", "open"
  • usagestring
    • enum: "single", "reusable"

Réponses

  • 200

    • idstring (uuid)obligatoire
    • slugstringobligatoire
    • urlstringobligatoire

      Public page of the link on the checkout

    • organisationIdstring (uuid)obligatoire
    • paymentAccountIdstring (uuid)obligatoire
    • titlestringobligatoire
    • descriptionstring | nullobligatoire
    • amountTypestringobligatoire
      • enum: "fixed", "open"
    • amountnumber | nullobligatoire
    • minAmountnumber | nullobligatoire
    • maxAmountnumber | nullobligatoire
    • currencystringobligatoire
    • usagestringobligatoire
      • enum: "single", "reusable"
    • maxUsesnumber | nullobligatoire
    • expiresAtstring (date-time) | nullobligatoire
    • acceptedProvidersstring[]obligatoire
    • payerFieldsPayerFieldSettingsDtoobligatoire
      • namestringobligatoire
        • enum: "hidden", "optional", "required"
      • emailstringobligatoire
        • enum: "hidden", "optional", "required"
      • phonestringobligatoire
        • enum: "hidden", "optional", "required"
    • successMessagestring | nullobligatoire
    • redirectUrlstring | nullobligatoire
    • statusstringobligatoire

      Effective status (expired from expiresAt)

      • enum: "active", "disabled", "expired", "completed"
    • paymentsCountnumberobligatoire

      Payments started from the link

    • succeededCountnumberobligatoire
    • collectedAmountnumberobligatoire

      Sum of the succeeded amounts, minor units

    • disabledAtstring (date-time) | nullobligatoire
    • createdAtstring (date-time)obligatoire
    • updatedAtstring (date-time)obligatoire
  • 404payment_link_not_found

Exemples de code

curl -X PATCH "$KONNECT_API_URL/payment-links/linkId" \
  -H "x-api-key: $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "description": "description",
  "amount": 25000,
  "minAmount": 1,
  "maxAmount": 1,
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "https://shop.example.test/merci",
  "title": "title",
  "amountType": "fixed",
  "usage": "single"
}'

Exemple : corps de la requête

{
  "description": "description",
  "amount": 25000,
  "minAmount": 1,
  "maxAmount": 1,
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "https://shop.example.test/merci",
  "title": "title",
  "amountType": "fixed",
  "usage": "single"
}

Exemple : 200

{
  "id": "id",
  "slug": "Ab3dE6gH9jK2",
  "url": "url",
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "paymentAccountId": "paymentAccountId",
  "title": "title",
  "description": "description",
  "amountType": "fixed",
  "amount": 1,
  "minAmount": 1,
  "maxAmount": 1,
  "currency": "TND",
  "usage": "single",
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "redirectUrl",
  "status": "active",
  "paymentsCount": 1,
  "succeededCount": 1,
  "collectedAmount": 1,
  "disabledAt": "2026-10-01T09:30:00.000Z",
  "createdAt": "2026-10-01T09:30:00.000Z",
  "updatedAt": "2026-10-01T09:30:00.000Z"
}

Disable a payment link: no new payment; started ones go on

POST/payment-links/{linkId}/disableClé API

Paramètres

  • linkIdstringpathobligatoire

Réponses

  • 200

    • idstring (uuid)obligatoire
    • slugstringobligatoire
    • urlstringobligatoire

      Public page of the link on the checkout

    • organisationIdstring (uuid)obligatoire
    • paymentAccountIdstring (uuid)obligatoire
    • titlestringobligatoire
    • descriptionstring | nullobligatoire
    • amountTypestringobligatoire
      • enum: "fixed", "open"
    • amountnumber | nullobligatoire
    • minAmountnumber | nullobligatoire
    • maxAmountnumber | nullobligatoire
    • currencystringobligatoire
    • usagestringobligatoire
      • enum: "single", "reusable"
    • maxUsesnumber | nullobligatoire
    • expiresAtstring (date-time) | nullobligatoire
    • acceptedProvidersstring[]obligatoire
    • payerFieldsPayerFieldSettingsDtoobligatoire
      • namestringobligatoire
        • enum: "hidden", "optional", "required"
      • emailstringobligatoire
        • enum: "hidden", "optional", "required"
      • phonestringobligatoire
        • enum: "hidden", "optional", "required"
    • successMessagestring | nullobligatoire
    • redirectUrlstring | nullobligatoire
    • statusstringobligatoire

      Effective status (expired from expiresAt)

      • enum: "active", "disabled", "expired", "completed"
    • paymentsCountnumberobligatoire

      Payments started from the link

    • succeededCountnumberobligatoire
    • collectedAmountnumberobligatoire

      Sum of the succeeded amounts, minor units

    • disabledAtstring (date-time) | nullobligatoire
    • createdAtstring (date-time)obligatoire
    • updatedAtstring (date-time)obligatoire

Exemples de code

curl -X POST "$KONNECT_API_URL/payment-links/linkId/disable" \
  -H "x-api-key: $KONNECT_API_KEY"

Exemple : 200

{
  "id": "id",
  "slug": "Ab3dE6gH9jK2",
  "url": "url",
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "paymentAccountId": "paymentAccountId",
  "title": "title",
  "description": "description",
  "amountType": "fixed",
  "amount": 1,
  "minAmount": 1,
  "maxAmount": 1,
  "currency": "TND",
  "usage": "single",
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "redirectUrl",
  "status": "active",
  "paymentsCount": 1,
  "succeededCount": 1,
  "collectedAmount": 1,
  "disabledAt": "2026-10-01T09:30:00.000Z",
  "createdAt": "2026-10-01T09:30:00.000Z",
  "updatedAt": "2026-10-01T09:30:00.000Z"
}

Enable a disabled payment link again

POST/payment-links/{linkId}/enableClé API

Paramètres

  • linkIdstringpathobligatoire

Réponses

  • 200

    • idstring (uuid)obligatoire
    • slugstringobligatoire
    • urlstringobligatoire

      Public page of the link on the checkout

    • organisationIdstring (uuid)obligatoire
    • paymentAccountIdstring (uuid)obligatoire
    • titlestringobligatoire
    • descriptionstring | nullobligatoire
    • amountTypestringobligatoire
      • enum: "fixed", "open"
    • amountnumber | nullobligatoire
    • minAmountnumber | nullobligatoire
    • maxAmountnumber | nullobligatoire
    • currencystringobligatoire
    • usagestringobligatoire
      • enum: "single", "reusable"
    • maxUsesnumber | nullobligatoire
    • expiresAtstring (date-time) | nullobligatoire
    • acceptedProvidersstring[]obligatoire
    • payerFieldsPayerFieldSettingsDtoobligatoire
      • namestringobligatoire
        • enum: "hidden", "optional", "required"
      • emailstringobligatoire
        • enum: "hidden", "optional", "required"
      • phonestringobligatoire
        • enum: "hidden", "optional", "required"
    • successMessagestring | nullobligatoire
    • redirectUrlstring | nullobligatoire
    • statusstringobligatoire

      Effective status (expired from expiresAt)

      • enum: "active", "disabled", "expired", "completed"
    • paymentsCountnumberobligatoire

      Payments started from the link

    • succeededCountnumberobligatoire
    • collectedAmountnumberobligatoire

      Sum of the succeeded amounts, minor units

    • disabledAtstring (date-time) | nullobligatoire
    • createdAtstring (date-time)obligatoire
    • updatedAtstring (date-time)obligatoire
  • 409link_not_disabled

Exemples de code

curl -X POST "$KONNECT_API_URL/payment-links/linkId/enable" \
  -H "x-api-key: $KONNECT_API_KEY"

Exemple : 200

{
  "id": "id",
  "slug": "Ab3dE6gH9jK2",
  "url": "url",
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "paymentAccountId": "paymentAccountId",
  "title": "title",
  "description": "description",
  "amountType": "fixed",
  "amount": 1,
  "minAmount": 1,
  "maxAmount": 1,
  "currency": "TND",
  "usage": "single",
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "redirectUrl",
  "status": "active",
  "paymentsCount": 1,
  "succeededCount": 1,
  "collectedAmount": 1,
  "disabledAt": "2026-10-01T09:30:00.000Z",
  "createdAt": "2026-10-01T09:30:00.000Z",
  "updatedAt": "2026-10-01T09:30:00.000Z"
}

A new link with the same settings, a new slug and no payment

POST/payment-links/{linkId}/duplicateClé API

Paramètres

  • linkIdstringpathobligatoire

Réponses

  • 201

    • idstring (uuid)obligatoire
    • slugstringobligatoire
    • urlstringobligatoire

      Public page of the link on the checkout

    • organisationIdstring (uuid)obligatoire
    • paymentAccountIdstring (uuid)obligatoire
    • titlestringobligatoire
    • descriptionstring | nullobligatoire
    • amountTypestringobligatoire
      • enum: "fixed", "open"
    • amountnumber | nullobligatoire
    • minAmountnumber | nullobligatoire
    • maxAmountnumber | nullobligatoire
    • currencystringobligatoire
    • usagestringobligatoire
      • enum: "single", "reusable"
    • maxUsesnumber | nullobligatoire
    • expiresAtstring (date-time) | nullobligatoire
    • acceptedProvidersstring[]obligatoire
    • payerFieldsPayerFieldSettingsDtoobligatoire
      • namestringobligatoire
        • enum: "hidden", "optional", "required"
      • emailstringobligatoire
        • enum: "hidden", "optional", "required"
      • phonestringobligatoire
        • enum: "hidden", "optional", "required"
    • successMessagestring | nullobligatoire
    • redirectUrlstring | nullobligatoire
    • statusstringobligatoire

      Effective status (expired from expiresAt)

      • enum: "active", "disabled", "expired", "completed"
    • paymentsCountnumberobligatoire

      Payments started from the link

    • succeededCountnumberobligatoire
    • collectedAmountnumberobligatoire

      Sum of the succeeded amounts, minor units

    • disabledAtstring (date-time) | nullobligatoire
    • createdAtstring (date-time)obligatoire
    • updatedAtstring (date-time)obligatoire

Exemples de code

curl -X POST "$KONNECT_API_URL/payment-links/linkId/duplicate" \
  -H "x-api-key: $KONNECT_API_KEY"

Exemple : 201

{
  "id": "id",
  "slug": "Ab3dE6gH9jK2",
  "url": "url",
  "organisationId": "org_01J9Z3K4EXAMPLE0000000000",
  "paymentAccountId": "paymentAccountId",
  "title": "title",
  "description": "description",
  "amountType": "fixed",
  "amount": 1,
  "minAmount": 1,
  "maxAmount": 1,
  "currency": "TND",
  "usage": "single",
  "maxUses": 1,
  "expiresAt": "2026-10-01T09:30:00.000Z",
  "acceptedProviders": [
    "clictopay"
  ],
  "payerFields": {
    "name": "hidden",
    "email": "buyer@example.com",
    "phone": "hidden"
  },
  "successMessage": "successMessage",
  "redirectUrl": "redirectUrl",
  "status": "active",
  "paymentsCount": 1,
  "succeededCount": 1,
  "collectedAmount": 1,
  "disabledAt": "2026-10-01T09:30:00.000Z",
  "createdAt": "2026-10-01T09:30:00.000Z",
  "updatedAt": "2026-10-01T09:30:00.000Z"
}

Payments of a link by status, collected amount and conversion

GET/payment-links/{linkId}/statsClé API

Paramètres

  • linkIdstringpathobligatoire

Réponses

  • 200

    • paymentsCountnumberobligatoire
    • succeededCountnumberobligatoire
    • pendingCountnumberobligatoire
    • failedCountnumberobligatoire
    • expiredCountnumberobligatoire
    • canceledCountnumberobligatoire
    • collectedAmountnumberobligatoire

      Minor units

    • conversionRatenumberobligatoire

      Succeeded over started, 0 to 1

    • lastPaymentAtstring (date-time) | nullobligatoire

Exemples de code

curl -X GET "$KONNECT_API_URL/payment-links/linkId/stats" \
  -H "x-api-key: $KONNECT_API_KEY"

Exemple : 200

{
  "paymentsCount": 1,
  "succeededCount": 1,
  "pendingCount": 1,
  "failedCount": 1,
  "expiredCount": 1,
  "canceledCount": 1,
  "collectedAmount": 1,
  "conversionRate": 1,
  "lastPaymentAt": "2026-10-01T09:30:00.000Z"
}