Pont · Documentation
RéférenceAPI

Portefeuilles

Soldes, dépôts, retraits et transferts (PostgreSQL uniquement).

Lire un portefeuille

GET
/v1/wallets/{user}

Authorization

ApiKey
headerAuthorizationBearer <token>

PONT_API_KEY, pour les routes /v1.

Path Parameters

user*string

Identifiant de l'utilisateur (A-Z a-z 0-9 _ -, 64 caractères au plus).

Response Body

Le portefeuille.

application/json
  1. response
userId*string

Identifiant de l'utilisateur dans votre application.

Match^[A-Za-z0-9_-]{1,64}$
currency*Currency

Devise : le XOF et le XAF n'ont pas de décimales, les montants sont des entiers.

Value in"XOF""XAF"
available*integer

Solde disponible.

held*integer

Montant bloqué (retraits en cours).

tier*|null
frozen*boolean

Un compte gelé ne peut plus rien sortir.

curl -X GET 'http://localhost:8787/v1/wallets/string'
{  "userId": "awa",  "currency": "XOF",  "available": 0,  "held": 0,  "tier": "string",  "frozen": true}
PUT
/v1/wallets/{user}

Authorization

ApiKey
headerAuthorizationBearer <token>

PONT_API_KEY, pour les routes /v1.

Path Parameters

user*string

Identifiant de l'utilisateur (A-Z a-z 0-9 _ -, 64 caractères au plus).

Request Body

application/json
  1. body
tier?string

Palier KYC, 1 à 32 caractères.

Length1 <= length <= 32
frozen?boolean

Gèle ou dégèle le compte.

Response Body

Le portefeuille.

application/json
  1. response
userId*string

Identifiant de l'utilisateur dans votre application.

Match^[A-Za-z0-9_-]{1,64}$
currency*Currency

Devise : le XOF et le XAF n'ont pas de décimales, les montants sont des entiers.

Value in"XOF""XAF"
available*integer

Solde disponible.

held*integer

Montant bloqué (retraits en cours).

tier*|null
frozen*boolean

Un compte gelé ne peut plus rien sortir.

curl -X PUT 'http://localhost:8787/v1/wallets/string' \  -H 'Content-Type: application/json' \  -d '{  "tier": "complet"}'
{  "userId": "awa",  "currency": "XOF",  "available": 0,  "held": 0,  "tier": "complet",  "frozen": false}

Lister les mouvements

GET
/v1/wallets/{user}/movements

Authorization

ApiKey
headerAuthorizationBearer <token>

PONT_API_KEY, pour les routes /v1.

Path Parameters

user*string

Identifiant de l'utilisateur (A-Z a-z 0-9 _ -, 64 caractères au plus).

Query Parameters

limit?integer

Nombre d'éléments (1 à 200, 50 par défaut).

Range1 <= value <= 200
Default50

Response Body

Mouvements.

application/json
  1. response
data*array<>
curl -X GET 'http://localhost:8787/v1/wallets/string/movements'
{  "data": [    {      "entryId": "string",      "accountId": "string",      "direction": "debit",      "amount": 0,      "createdAt": 0    }  ]}

Alimenter un portefeuille

POST
/v1/wallets/{user}/deposits

Authorization

ApiKey
headerAuthorizationBearer <token>

PONT_API_KEY, pour les routes /v1.

Path Parameters

user*string

Identifiant de l'utilisateur (A-Z a-z 0-9 _ -, 64 caractères au plus).

Request Body

application/json
  1. body
amount*integer

Montant à encaisser.

Range1 <= value
country*Country

Pays (ISO 3166-1 alpha-2).

Value in"BJ""TG""CI""SN""BF""ML""NE""GN""CM""CG""CD""GA"
phone*string

Numéro du payeur (E.164).

Length6 <= length <= 20
operator?Operator

Opérateur Mobile Money (<opérateur>_<pays>), indépendant des codes des agrégateurs.

Value in"mtn_bj""moov_bj""celtiis_bj""moov_tg""tmoney_tg""mtn_ci""orange_ci""moov_ci""wave_ci""orange_sn""free_sn""wave_sn""expresso_sn""wizall_sn""orange_bf""moov_bf""orange_ml""moov_ml""mtn_cm""orange_cm""mtn_cg""airtel_cg""airtel_ga"
reference*string

Votre référence, 1 à 64 caractères.

Length1 <= length <= 64

Response Body

Paiement de dépôt créé.

application/json
  1. response
id*string

Identifiant Pont.

mode*string

Mode du serveur au moment de la création.

Value in"test""live"
country*string

Pays (ISO 3166-1 alpha-2).

Value in"BJ""TG""CI""SN""BF""ML""NE""GN""CM""CG""CD""GA"
currency*Currency

Devise : le XOF et le XAF n'ont pas de décimales, les montants sont des entiers.

Value in"XOF""XAF"
provider*string

Agrégateur choisi par Pont (fedapay, pawapay, paydunya, kkiapay, sandbox ou un agrégateur personnalisé).

attemptId*string

Identifiant unique de la tentative, transmis à l'agrégateur quand il l'accepte.

providerRef*|null
failureCode*|null
needsReconciliation*boolean

true quand l'état réel chez l'agrégateur est inconnu : Pont vérifie à chaque cycle, ne réessaie jamais ailleurs.

metadata*

Vos métadonnées libres (valeurs de 500 caractères au plus).

createdAt*integer

Date de création, en millisecondes Unix.

updatedAt*integer

Dernière mise à jour, en millisecondes Unix.

status*PaymentStatus

Statut normalisé d'un paiement. Seul succeeded est vérifié auprès de l'agrégateur.

Value in"created""pending""processing""succeeded""failed""expired""cancelled""refunded""partially_refunded"
amount*integer

Montant en unités entières.

operator*|null
reference*string

Votre référence.

nextAction*||||null
curl -X POST 'http://localhost:8787/v1/wallets/string/deposits' \  -H 'Content-Type: application/json' \  -d '{  "amount": 20000,  "country": "BJ",  "phone": "+2290100000001",  "reference": "depot-1"}'
{  "id": "pay_84a49a19050240ebb01077bdb806c672",  "mode": "test",  "country": "BJ",  "currency": "XOF",  "provider": "fedapay",  "attemptId": "string",  "providerRef": "string",  "failureCode": "string",  "needsReconciliation": true,  "metadata": {    "property1": "string",    "property2": "string"  },  "createdAt": 0,  "updatedAt": 0,  "status": "created",  "amount": 0,  "operator": "mtn_bj",  "reference": "string",  "nextAction": {    "type": "redirect",    "url": "http://example.com"  }}

Retirer vers Mobile Money

POST
/v1/wallets/{user}/withdrawals

Authorization

ApiKey
headerAuthorizationBearer <token>

PONT_API_KEY, pour les routes /v1.

Path Parameters

user*string

Identifiant de l'utilisateur (A-Z a-z 0-9 _ -, 64 caractères au plus).

Request Body

application/json
  1. body
amount*integer

Montant reçu par le bénéficiaire (les frais s'ajoutent au débit).

Range1 <= value
country*Country

Pays (ISO 3166-1 alpha-2).

Value in"BJ""TG""CI""SN""BF""ML""NE""GN""CM""CG""CD""GA"
phone*string

Numéro du bénéficiaire (E.164).

Length6 <= length <= 20
operator*Operator

Opérateur Mobile Money (<opérateur>_<pays>), indépendant des codes des agrégateurs.

Value in"mtn_bj""moov_bj""celtiis_bj""moov_tg""tmoney_tg""mtn_ci""orange_ci""moov_ci""wave_ci""orange_sn""free_sn""wave_sn""expresso_sn""wizall_sn""orange_bf""moov_bf""orange_ml""moov_ml""mtn_cm""orange_cm""mtn_cg""airtel_cg""airtel_ga"
reference*string

Votre référence, 1 à 64 caractères.

Length1 <= length <= 64

Response Body

Retrait exécuté.

application/json
  1. response
id*string

Exécution du workflow wallet.withdraw.

status*"succeeded"
Value in"succeeded"
payoutId*|null
amount*integer
fee*integer

Frais prélevés (PONT_WITHDRAWAL_FEE_BPS).

curl -X POST 'http://localhost:8787/v1/wallets/string/withdrawals' \  -H 'Content-Type: application/json' \  -d '{  "amount": 5000,  "country": "BJ",  "phone": "+2290100000001",  "operator": "mtn_bj",  "reference": "retrait-1"}'
{  "id": "wfr_93b8690f49654ceb9f594af721302033",  "status": "succeeded",  "payoutId": "po_f6be299eb1f44d63a8d4a588965ce39e",  "amount": 5000,  "fee": 0}
POST
/v1/wallets/transfers

Authorization

ApiKey
headerAuthorizationBearer <token>

PONT_API_KEY, pour les routes /v1.

Request Body

application/json
  1. body
from*string

Utilisateur débité.

Match^[A-Za-z0-9_-]{1,64}$
to*string

Utilisateur crédité.

Match^[A-Za-z0-9_-]{1,64}$
amount*integer

Montant transféré.

Range1 <= value
fee?integer

Frais à la charge de l'expéditeur.

Range0 <= value
reference*string

Votre référence, 1 à 64 caractères. Sert aussi de clé d'idempotence.

Length1 <= length <= 64

Response Body

Transfert effectué.

application/json
  1. response
from*
to*
curl -X POST 'http://localhost:8787/v1/wallets/transfers' \  -H 'Content-Type: application/json' \  -d '{  "from": "awa",  "to": "koffi",  "amount": 3000,  "reference": "transfert-1"}'
{  "from": {    "userId": "awa",    "currency": "XOF",    "available": 0,    "held": 0,    "tier": "string",    "frozen": true  },  "to": {    "userId": "awa",    "currency": "XOF",    "available": 0,    "held": 0,    "tier": "string",    "frozen": true  }}