POST/v1/payment/token/:token/pay

Charge a customer against an active payment token by collecting from their mobile money account.

When to use this

This is what runs when a customer opens a payment token link and enters their phone number, whether on the hosted pay.kawrie.com page or your own custom UI. It requires no API key because the token itself, generated server-side by you with Generate Payment Token, is the authorization; anyone with the link can pay it exactly once for exactly the amount you set.

  • The "pay now" button on a hosted or custom payment-token page
  • Letting a customer complete a previously shared invoice without logging in

Path parameters

FieldTypeRequiredDescription
tokenstringRequiredThe active payment token to pay

Request headers

FieldTypeRequiredDescription
Content-TypestringRequiredapplication/json

Request body

FieldTypeRequiredDescription
phonestringRequiredPayer phone in E.164 format
customer_namestringOptionalPayer name, max 100 characters

Request example

curl -X POST https://api.kawrie.com/v1/payment/token/pt_9f2h1k3a8b7c/pay \
  -H "Content-Type: application/json" \
  -d '{ "phone": "+256712345678", "customer_name": "John Doe" }'

Response200 OK

response.json
{
  "success": true,
  "data": {
    "kawrie_reference": "KW-20260628-T5R8N2Q1",
    "status": "processing",
    "amount": 15000,
    "currency": "UGX",
    "phone": "+256712345678"
  }
}

Error responses

CodeStatusDescription
TOKEN_NOT_FOUND404No payment token exists with that identifier
TOKEN_EXPIRED400This payment token has expired
TOKEN_ALREADY_PAID400This payment token has already been paid
INVALID_PHONE400Phone number is not registered for mobile money