pakdatakit/raast
Interfaces
Section titled “Interfaces”| Interface | Description |
|---|---|
| EmvField | A parsed EMV field. children is set for template fields. |
| RaastP2PQrOptions | Options for createRaastP2PQr. |
| MerchantAccountInfo | Account details for a merchant QR, as issued by the merchant’s bank. |
| MerchantQrOptions | Options for createMerchantQr. |
| ParsedRaastQr | Result of parseRaastQr. |
| RaastQrValidation | Result of validateRaastQr. |
| ValidateRaastQrOptions | Options for validateRaastQr. |
Type Aliases
Section titled “Type Aliases”| Type Alias | Description |
|---|---|
| RaastDuration | A duration such as '30m', '12h' or '7d' (minutes, hours or days). |
| RaastQrError | A problem that stops a Raast QR from working or makes it unsafe to pay. |
| RaastQrWarning | Something worth telling the payer, but which does not stop payment. |
Functions
Section titled “Functions”| Function | Description |
|---|---|
| createRaastP2PQr | 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. |
| createMerchantQr | Creates an EMVCo merchant-presented QR payload following SBP’s Pakistan QR standard (currency 586, country PK, CRC in tag 63), including the Pakistan-specific due-date fields. |
| parseRaastQr | Parses a Raast QR payload: either a person-to-person QR (payload format 02) or an EMVCo merchant QR (payload format 01), and verifies its CRC. |
| validateRaastQr | Checks whether a Raast QR code can be paid, e.g. before showing a payment screen or to warn about a tampered sticker. |