createRaastP2PQr
function createRaastP2PQr(options): string;Defined in: raast.ts:234
Creates a Raast person-to-person QR payload in SBP’s P2P QR format (payload
format 02), matching the QR codes banking apps generate, so it can be
scanned by apps such as Easypaisa and JazzCash. Encode the string as a QR
code with any QR library.
A QR with an amount is dynamic and needs expiresAt; this layout
(01 = 12, amount in tag 05, expiry in tag 07) matches dynamic QR codes
from banking apps and scans in Easypaisa and JazzCash.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
options |
RaastP2PQrOptions |
Payee IBAN and optional amount with expiry, bank name and description |
Returns
Section titled “Returns”string
QR payload string
Example
Section titled “Example”createRaastP2PQr({ iban: 'PK36SCBL0000001123456702' });createRaastP2PQr({ iban: 'PK36SCBL0000001123456702', amount: 1500, expiresIn: '1d' });Throws
Section titled “Throws”If the IBAN is invalid, a field is too long, or an
amount is given without expiresAt or expiresIn