Version de travail · contenus et exemples à affiner Voir les 95 pages ↗
Parlons de votre projet ↗
Référence API / P060

Créer un lien de paiement

Adaptation éditoriale
Référence de travail. Les routes, schémas, limites et procédures hérités du référentiel sont à aligner avec l’API d’Éric. Ils ne prouvent pas une fonctionnalité livrée. Les hôtes .invalid sont des exemples inertes.

Opération

POST /partner_api/payment_links

Authentification

ApiKey``ApiKeyId

X-API-KEY

Emplacement : header

X-API-KEY-ID

Emplacement : header

Corps de la requête

application/json

Définitions TypeScript

Utilisez le type du corps de requête dans TypeScript.

storeId*string

Identifiant du magasin

Formatuuid

title*string

Payment link title

Longueur10 <= length <= 255

amountCents*integer

Fixed amount in cents

Intervalle10000 <= value

currency*string

Code devise (ISO 4217)

Longueur3 <= length <= 3

Default"XOF"

allowMultiplePayments?boolean

Whether the payment link allows multiple payments

Réponses

200 application/json

400 application/json

401 application/json

403 application/json

404 application/json

422 application/json

500 application/json

cURL

JavaScript

Go

Python

Java

C#

Rust

curl -X POST "https://api.kelyko.invalid/partner_api/payment_links" \
  -H "X-API-KEY: " \
  -H "X-API-KEY-ID: " \
  -H "Content-Type: application/json" \
  -d '{
    "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
    "title": "stringstri",
    "amountCents": 10000,
    "currency": "XOF"
  }'

200400401403404422500

{
  "id": "string",
  "storeId": "string",
  "title": "string",
  "amount": {
    "amount": 0,
    "currency": "XOF"
  },
  "allowMultiplePayments": true,
  "canReceivePayments": true,
  "link": "http://example.com"
}

Get payment request by ID (Partner API)GET\ \ Retrieves a payment request by its ID. Returns the same structure as the create endpoint but includes the current status.\ \ When the payment is still pending, the response may include a `Retry-After` header (seconds) advising clients when to poll again:\ - **Pre-checkout** (no provider session yet, e.g. redirect before the payer opens the pay link): fixed shorter interval (default 60s).\ - **Post-checkout** (pending provider request exists): PSP reconcile interval (default 5 minutes, may count down until the next check).\ **Authentication:**\ - Requires API key headers `X-API-KEY` and `X-API-KEY-ID`\ **Access Control:**\ - Only returns payment requests that belong to the authenticated business\ - Only returns payment requests created via the Partner API Get payment link by ID (Partner API)GET\ \ Retrieves a payment link by its ID with real-time payment availability status.\ **Key Information:**\ - Returns the same structure as the create endpoint\ - `canReceivePayments` field reflects current link status\ - Use this endpoint to check if a link can accept new payments before directing customers\ **Authentication:**\ - Requires API key headers `X-API-KEY` and `X-API-KEY-ID`\ **Access Control:**\ - Only returns payment links that belong to the authenticated business\ **Use Cases:**\ - Verify link availability before sharing with customers\ - Check payment link status in your application\ - Validate single-use links before reuse

Demander à l'IA ⌘I