Skip to main content
POST
Pay a merchant from the CloudPay wallet

Authorizations

Authorization
string
header
required

access_token from register or login. Expires after JWT_TTL (default 15m) or when the session ends.

Path Parameters

code
string
required
Pattern: ^[a-z0-9]{10}$

Body

application/json
amount
integer<int64>
required

Cents (KES minor units). 100 = KES 1.00.

Required range: x >= 1
Example:

100000

pin
string
required

4-6 digits; repeated (0000) and sequential (1234, 4321) PINs are refused.

Pattern: ^[0-9]{4,6}$
Example:

"4821"

idempotency_key
string
required

Unique per customer per intended operation; a UUID is ideal.

Required string length: 8 - 100

Response

Paid (new or replayed).

status
object
required
data
object