Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Idempotency-Key
string
required

Generate one per intended investment (a UUID is recommended) and resend it on retries. The same key with the same body returns the original Payment; with a different body, 409.

Path Parameters

shortName
string
required

Your partner short name

externalUserId
string
required

Your own ID for the customer

Body

application/json
planId
number
required

A plan id from GET plans

Example:

12

amount
number
required
Required range: x >= 1
Example:

5000

currency
enum<string>
required
Available options:
KES,
USD,
RWF,
TZS,
EUR,
GBP
Example:

"KES"

channel
enum<string>
required
Available options:
MPESA,
BANK_TRANSFER
Example:

"BANK_TRANSFER"

phoneNumber
string

Required for MPESA: the number that receives the STK push. Any valid number; it need not be the customer's own

Example:

"+254712345678"

Response

Payment already created with this Idempotency-Key

reference
string
required

The PaymentReference. For a bank transfer, quote it as the transfer memo

Example:

"NDV7F3K9Q"

channel
enum<string>
required
Available options:
MPESA,
BANK_TRANSFER
amount
number
required
Example:

5000

finalAmount
number
required

The amount to pay

Example:

5000

currency
string
required
Example:

"KES"

status
enum<string>
required
Available options:
PENDING,
COMPLETED,
FAILED
createdAt
string<date-time>
required
fee
number
required

The deposit fee this investment will be charged

Example:

50

mnoReference
string | null

The M-Pesa receipt

bankReference
string | null

The bank's own transaction id, once reconciled

phoneNumber
string | null

The paying number, redacted (M-Pesa)

Example:

"+2547...5678"

plan
object | null
transactionId
number | null

The Transaction this Payment funds. Null until the Payment is COMPLETED, when the Transaction is created

completedAt
string<date-time> | null
bankDetails
object | null

Where to send a bank transfer. Only while a BANK_TRANSFER Payment is PENDING