Payouts
Pay customers, agents and suppliers from your float. Payouts are asynchronous: you get an id immediately and the result on your callback URL.
New in 1.0.3Bank payouts now return the receiving bank's reference in the callback.
DownloadOpenAPI (JSON)OpenAPI (YAML)Postman collectionGenerated clients
Authentication
Swap your keys for a token
Send your app's consumer key and secret to the token endpoint using HTTP Basic auth. You get a bearer token that lasts one hour. Send it in the Authorization header of every call.
Sandbox base URL https://devportal.softwaregroup.com/api/sandbox
Get keys for Treasurycurl -X POST 'https://devportal.softwaregroup.com/api/sandbox/oauth/v1/token' \
-u "$LANGO_KEY:$LANGO_SECRET" \
-d 'grant_type=client_credentials'Send a payout
POST/payouts/v1/send
Moves money out of your float. Each reference can be used once.
Request body
amountintegerrequired- Whole currency units. In the sandbox, 1 triggers the low-float scenario.min 10
currencystringrequired- KES · TZS · UGX
destinationobjectrequiredtypestringrequired- mobile · bank
phoneNumberstring- Required when type is mobile.
bankCodestring- Required when type is bank.
accountNumberstring- Required when type is bank.
referencestringrequired- Unique per payout. Reusing one returns 409.max length 32
reasonstring- Salary · Supplier · Refund · Commission · Other
callbackUrlurirequired
Responses
202Payout queued.Fields
202 body
payoutIdstringstatusstring- QUEUED
409The reference was already used.Fields
409 body
errorstringmessagestringrequestIdstring
Sandbox scenarios
Payout succeedsdefault
202 + callbackFloat too lowamount = 1
202 + callbackDuplicate referencereference = "DUPLICATE"
409curl -X POST 'https://devportal.softwaregroup.com/api/sandbox/payouts/v1/send' \
-H "Authorization: Bearer $LANGO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 25000,
"currency": "KES",
"destination": {
"type": "mobile",
"phoneNumber": "254712345678"
},
"reference": "PAYRUN-0917-044",
"reason": "Salary",
"callbackUrl": "https://example.com/hooks/lango"
}'{
"amount": 25000,
"currency": "KES",
"destination": {
"type": "mobile",
"phoneNumber": "254712345678"
},
"reference": "PAYRUN-0917-044",
"reason": "Salary",
"callbackUrl": "https://example.com/hooks/lango"
}Choose what happens
Check a payout
GET/payouts/v1/{payoutId}
Path parameters
payoutIdstringrequired
Responses
200Current state of the payout.Fields
200 body
payoutIdstringstatusstring- QUEUED · DELIVERED · FAILED
amountintegerreceiptstring
Sandbox scenarios
Delivereddefault
200curl -X GET 'https://devportal.softwaregroup.com/api/sandbox/payouts/v1/pay_3n7c2q8d' \
-H "Authorization: Bearer $LANGO_TOKEN"Choose what happens