Request a pre-approval
Ask a customer to approve future debits without a prompt each time. Needs the collect permission.
/preapprovalsSends 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_referencebodystringrequiredYour unique reference for this pre-approval. Retrying with it returns the original.
providerbodystringrequiredmomoProvider to request it through.
phone_numberbodystringrequiredThe customer’s MoMo number.
currencybodystringrequiredSZLCurrency of the charges it will cover.
messagebodystringShown to the customer when they approve. RazPay appends a short Ref XXXXXXXX tag; the whole message stays within 160 characters.
validity_secondsbodyintegerrequiredHow long the approval lasts once given.
metadatabodyobjectYour own data.
The pre-approval object
external_referencestringrequiredYour reference.
provider_idstringrequiredThe provider.
provider_refstringrequiredThe reference RazPay gave the provider.
payer_phonestringrequiredThe customer’s number, canonical form.
currencystringrequiredISO 4217 code.
messagestringrequiredThe message the customer saw, including the tag.
validity_secondsintegerrequiredAs requested.
statusstringrequiredpending, approved, failed, cancelled or expired.
failure_reasonstringWhy it failed, was cancelled by the payer, or expired.
expires_atintegerUnix time (seconds) the approval runs out, once approved.
metadataobjectrequiredYour own data.
created_atintegerrequiredUnix time (seconds) it was requested.
updated_atintegerrequiredUnix time (seconds) of its last change.
