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

Request a pre-approval

Ask a customer to approve future debits without a prompt each time. Needs the collect permission.

POST/preapprovals

Sends the customer a prompt to approve future charges. Once it’s approved, collect with preapproval_reference to charge them without asking again. See Recurring payments.

external_referencebodystringrequired

Your unique reference for this pre-approval. Retrying with it returns the original.

providerbodystringrequired
Default: momo

Provider to request it through.

phone_numberbodystringrequired

The customer’s MoMo number.

currencybodystringrequired
Default: SZL

Currency of the charges it will cover.

messagebodystring

Shown to the customer when they approve. RazPay appends a short Ref XXXXXXXX tag; the whole message stays within 160 characters.

validity_secondsbodyintegerrequired

How long the approval lasts once given.

metadatabodyobject

Your own data.

The pre-approval object

external_referencestringrequired

Your reference.

provider_idstringrequired

The provider.

provider_refstringrequired

The reference RazPay gave the provider.

payer_phonestringrequired

The customer’s number, canonical form.

currencystringrequired

ISO 4217 code.

messagestringrequired

The message the customer saw, including the tag.

validity_secondsintegerrequired

As requested.

statusstringrequired

pending, approved, failed, cancelled or expired.

failure_reasonstring

Why it failed, was cancelled by the payer, or expired.

expires_atinteger

Unix time (seconds) the approval runs out, once approved.

metadataobjectrequired

Your own data.

created_atintegerrequired

Unix time (seconds) it was requested.

updated_atintegerrequired

Unix time (seconds) of its last change.

Request
curl -X POST 'https://api.razpay.razonetix.com/v1/preapprovals' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "external_reference": "gym-membership-sipho",
  "provider": "momo",
  "phone_number": "76123456",
  "currency": "SZL",
  "message": "Monthly gym membership",
  "validity_seconds": "31536000"
}'
{
  "success": true,
  "message": "pre-approval requested",
  "data": {
    "external_reference": "gym-membership-sipho",
    "provider_id": "momo",
    "provider_ref": "11377cbe-374c-43f6-a019-4fb70e57b617",
    "payer_phone": "26876123456",
    "currency": "SZL",
    "message": "Monthly gym membership Ref 11377CBE",
    "validity_seconds": 31536000,
    "status": "pending",
    "metadata": {},
    "created_at": 1760774400,
    "updated_at": 1760774400
  }
}

Was this page helpful?