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

Créer une demande 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_requests

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.

amountCents*integer

Montant dans l’unité technique amountCents (conversion à vérifier)

Intervalle100 <= value

currency*string

Code devise (ISO 4217)

Longueur3 <= length <= 3

reference*string

Référence du paiement

Longueur1 <= length <= 100

storeId*string

Identifiant du magasin

Formatuuid

paymentDetails*object

Réponses

200 application/json

400 application/json

401 application/json

403 application/json

409 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_requests" \
  -H "X-API-KEY: " \
  -H "X-API-KEY-ID: " \
  -H "Content-Type: application/json" \
  -d '{
    "amountCents": 100,
    "currency": "str",
    "reference": "string",
    "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",
    "paymentDetails": {
      "type": "redirect",
      "data": {
        "paymentMethod": "orange",
        "successUrl": "http://example.com",
        "errorUrl": "http://example.com"
      }
    }
  }'

200400401403409422500

{
  "id": "string",
  "storeId": "string",
  "reference": "string",
  "type": "redirect",
  "paymentMethod": "orange",
  "status": "pending",
  "errorReason": "string",
  "transaction": {
    "id": "string",
    "amount": {
      "amount": 0,
      "currency": "XOF"
    },
    "fees": {
      "amount": 0,
      "currency": "XOF"
    },
    "status": "pending",
    "counterpartLabel": "string",
    "counterpartIdentifier": "string",
    "description": "string",
    "executedAt": "string"
  },
  "redirectUrl": "http://example.com"
}

Get store balance (Partner API)GET\ \ Returns the total available balance for a specific store. The balance represents the sum of available balances from all wallets associated with the store.\ **Balance Information:**\ - Returns the total available balance across all wallets for the store\ - Available balance = total balance - blocked balance\ - Balance is returned in the store's currency\ - Amount is in cents (smallest currency unit)\ **Use Cases:**\ - Check store balance before creating transfers\ - Display balance information in dashboards\ - Monitor store financial status\ - Validate sufficient funds for operations\ **Authentication:** Requires API key headers. 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

Demander à l'IA ⌘I