# createRaastP2PQr

Source: https://pakdatakit.dev/api/typescript/raast/functions/createraastp2pqr/

```ts
function createRaastP2PQr(options): string;
```

Defined in: [raast.ts:234](https://github.com/chmuzamil/pakdatakit/blob/a6eeaa47381308c4e4fcda45b29642fe4fbfb1fc/src/raast.ts#L234)

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

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `options` | [`RaastP2PQrOptions`](https://pakdatakit.dev/api/typescript/raast/interfaces/raastp2pqroptions/) | Payee IBAN and optional amount with expiry, bank name and description |

## Returns

`string`

QR payload string

## Example

```ts
createRaastP2PQr({ iban: 'PK36SCBL0000001123456702' });
createRaastP2PQr({ iban: 'PK36SCBL0000001123456702', amount: 1500, expiresIn: '1d' });
```

## Throws

If the IBAN is invalid, a field is too long, or an
  amount is given without `expiresAt` or `expiresIn`
