Skip to content
Pay
Esc
↑↓navigate↵open⌘Jpreview

Collect a payment

Send a payment request to a customer's wallet. Needs the collect permission.

POST/payments/collect

Creates a pending collection and sends the customer a prompt to approve it. See Collect payments.

Retrying with the same external_reference returns the original transaction and never charges twice.

external_referencebodystringrequired

Your unique reference for this payment, within the project.

providerbodystringrequired
Default: momo

Provider to collect through. Must be enabled for the project.

amountbodynumberrequired

Amount in major units. Greater than 0.

currencybodystringrequired
Default: SZL

ISO 4217 code of your provider environment.

phone_numberbodystringrequired

The payer’s MoMo number: 8 digits starting with 76 or 78, with or without +268.

descriptionbodystring

Shown in both parties’ transaction history. Up to 160 characters.

preapproval_referencebodystring

Charge under an approved pre-approval, so the payer isn’t prompted. It must belong to the same number and currency.

metadatabodyobject

Your own data, returned unchanged on the transaction and in webhooks.

Response

200 with a transaction with type: collection and status: pending.

A retry with an existing external_reference also returns 200, with the transaction in its current status. That may no longer be pending, so read status rather than relying on the response code.

Any other response means the payment wasn’t started:

  • Rejected before it’s created, such as an invalid number: fix the request and retry with the same reference.
  • Refused by the provider: the transaction is saved as failed and no webhook is sent. Retrying that reference returns the failed transaction with 200, so try again with a new reference.
Request
curl -X POST 'https://api.razpay.razonetix.com/v1/payments/collect' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "external_reference": "order-1001",
  "provider": "momo",
  "amount": "30.00",
  "currency": "SZL",
  "phone_number": "76123456",
  "description": "Order 1001"
}'
{
  "success": true,
  "message": "payment initiated",
  "data": {
    "external_reference": "order-1001",
    "type": "collection",
    "direction": "in",
    "provider_id": "momo",
    "provider_ref": "6f0a2e1c-8b1d-4a8e-9a55-0c7d0e3b1f42",
    "amount": 30,
    "currency": "SZL",
    "status": "pending",
    "payer_phone": "26876123456",
    "description": "Order 1001",
    "metadata": {},
    "created_at": 1760774400,
    "updated_at": 1760774400
  }
}
{
  "success": false,
  "message": "phone_number must be an Eswatini MoMo number — 8 digits starting with 76 or 78, with optional +268 country code (e.g. 76123456 or +26876123456)",
  "data": null
}

Was this page helpful?