Décaisser
Send money (payouts)
Pay customers, businesses and tax authorities from your settlement account, with an optional second factor and async results.
6 min de lecture
Les guides développeurs sont rédigés en anglais pour que le code, les noms de champs et les messages d'erreur correspondent exactement à l'API.
Sur cette page
Fund your settlement account
Payouts come from your settlement account. Load it with POST /partner/topup ({"amount": 100000}) and check it with GET /partner/balance.
Payout types
| Endpoint | Pays | Key fields |
|---|---|---|
POST /partner/b2c | A customer wallet | to_msisdn, amount, remarks |
POST /partner/bizpocket | A customer's Biz Pocket | to_msisdn, amount, remarks |
POST /partner/b2b | Another business | to_shortcode, amount, account_reference |
POST /partner/tax | Tax or a government biller | to_shortcode, amount, prn |
Each accepts an idem key. Retry with the same key after a timeout and you get the original payout, never a second one.
curl -s https://pesa-bridge.com/api/bridgepay/v1/partner/b2c \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
-d '{"to_msisdn":"254708374149","amount":2500,"remarks":"Refund #91","idem":"refund-91"}'Second factor: Initiator and SecurityCredential
Protect money-out calls with a second factor. Set an initiator password once with POST /partner/initiator. From then on, payouts and reversals must carry initiator plus a security_credential: that password RSA-encrypted (PKCS#1 v1.5) with our certificate, base64-encoded.
- 1
Download the certificate
GET /security/certificatereturns our public X.509 certificate (PEM). - 2
Encrypt on your side
Encrypt the initiator password with it. The password never travels in clear text.
- 3
Send both fields
Add
initiatorandsecurity_credentialto each payout or reversal.
curl -s https://pesa-bridge.com/api/bridgepay/v1/security/certificate -o pesabridge.pem
openssl x509 -in pesabridge.pem -pubkey -noout > pesabridge_pub.pem
printf '%s' "$INITIATOR_PASSWORD" \
| openssl pkeyutl -encrypt -pubin -inkey pesabridge_pub.pem -pkeyopt rsa_padding_mode:pkcs1 \
| base64 -w0POST /security/credential can encrypt a test password for you. In production, always encrypt on your own server.Synchronous or async
Without result_url, a payout answers when it's done. With result_url (and optionally timeout_url) you get an immediate acknowledgement, and the final Result is POSTed there, signed like any webhook, so verify it the same way.
Nos ingénieurs répondent aux questions d'intégration. Envoyez-nous la référence de la requête et nous retrouverons l'appel exact.
Contacter le support