Create a mobile money payment
Sends a USSD payment prompt to the customer's phone. The customer approves it with their mobile money PIN. A 202 response means the request was accepted, not that the customer paid: read the collection or wait for the payment.completed webhook. customer.country and money.currency must be a pair your key can use (see Get capabilities); otherwise the error is unsupported_market. Requires collection:create and mobile money push enabled for your account.
BearerAuthAuthorizationBearer <token>Secret API key: tp_test_. or tp_live_.. Server-side only.
Idempotency-Key*string^[A-Za-z0-9_-]+$8 <= length <= 128application/json- body
money*customer*description?stringlength <= 240Persisted payment state, provider-neutral money and public reference; no provider credentials or diagnostics
application/json- response
id*stringpublic_reference?stringUse this reference to read the payment.
operation*unknownstatus*unknown"created""pending""processing""succeeded""failed""reversed""refunded"status_detail?unknownPresent only for failed payments the customer cancelled or that expired.
"cancelled""expired"money*created_at*stringdate-timeupdated_at*stringdate-timecurl -X POST 'https://api.teepay.me/v1/collections' \ -H 'Idempotency-Key: order-1001' \ -H 'Content-Type: application/json' \ -d '{ "money": { "amount_minor": "500000", "currency": "TZS" }, "customer": { "country": "TZ", "phone": "+255712345678", "name": "Asha Juma", "email": "asha@example.com" }, "description": "Order 1001"}'{ "id": "string", "public_reference": "string", "operation": "charge", "status": "created", "status_detail": "cancelled", "money": { "amount_minor": 0, "currency": "string" }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}Get capabilities GET
Returns which features this key can use right now, and the countries and currencies it can collect in (supported_countries, supported_currencies). A feature is true only when the key has the scope, the account has the permission and TeePay has enabled the feature for the account. Read this instead of hard-coding markets: new countries appear here when TeePay enables them.
Get a collection GET
One collection by its public_reference. Poll this after creating a mobile money payment until status is succeeded or failed. Requires collection:read.