# generatePaynowQR

## Description

Generates a Paynow QR code.

## Input / Parameter

| Name                    | Description                                     | Input Type  | Default | Options | Required |
| ----------------------- | ----------------------------------------------- | ----------- | ------- | ------- | -------- |
| formatIndicator         | The format indicator for the QR code.           | String/Text | -       | -       | Yes      |
| initiationMethod        | The initiation method.                          | Array/List  | -       | -       | Yes      |
| accountIdentifier       | The account id.                                 | String/Text | -       | -       | Yes      |
| accountProxyType        | The proxy type of the account.                  | String/Text | -       | -       | Yes      |
| accountProxyValue       | The proxy value of the account.                 | String/Text | -       | -       | Yes      |
| editableAmountIndicator | The editable amount indicator.                  | String/Text | -       | -       | Yes      |
| qrExpiryDate            | The expiry date of the QR code.                 | String/Text | -       | -       | Yes      |
| merchantCategoryCode    | The category code of the merchant.              | String/Text | -       | -       | Yes      |
| transactionCurrency     | The currency of the transaction.                | String/Text | -       | -       | Yes      |
| transactionAmount       | The transaction amount.                         | String/Text | -       | -       | Yes      |
| countryCode             | The country code of the merchant.               | String/Text | -       | -       | Yes      |
| merchantName            | The name of the merchant.                       | String/Text | -       | -       | Yes      |
| merchantCity            | The city of the merchant.                       | String/Text | -       | -       | Yes      |
| billNumber              | The bill number for the transaction.            | String/Text | -       | -       | Yes      |
| logo                    | The logo of the QR code.                        | String/Text | -       | -       | No       |
| extra                   | Extra parameters stored and passed to callback. | Any         | -       | -       | No       |

## Output

N/A

## Callback?

### callback

The function to be executed if the Paynow QR code is generated successfully.

### errorCallback

The function to be executed if the Paynow QR code is not generated successfully.

## Video

Coming Soon.

## Example

### Steps

1. First we add 2 components to the page:

   1. A button to generate the QR code
   2. `imgQR`, an image placeholder for the QR code once generated.

   ![](/files/oLsdnbairNre01sUGkRv)
2. Select the "Generate QR Local" button and add these 2 functions to the event flow:

   ![](/files/5Xc4E9sDq22EHaKExncA)
3. Specify the parameters for the QR code.
4. For the `setComponentFunction`, we set the "component" value to "imgQR", the image placeholder created in step 1.

   ![](/files/3SuroapYiQUPyhd5Ox2h)

   For 'value', we add a subflow with the function "objectAttr" like so:

   ![](/files/1NIXWwbNf2rLQ5vk2X4Z)

### Result

![](/files/Yeb6mK38g3gae7FAGGgn)

## Links


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/payment/generatepaynowqr.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
