generate_qr
Create M-Pesa QR codes for a set amount and till or paybill. Enable quick payments by generating scannable codes for buy goods, paybill, or send money transactions.
Instructions
Generate a dynamic M-Pesa QR code for a specific amount and till or paybill.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cpi | Yes | Till, paybill, or phone number the payment goes to. | |
| size | No | QR image size in pixels. | 300 |
| refNo | Yes | Your reference for the transaction. | |
| amount | Yes | Amount in KES. Whole numbers only. | |
| trxCode | Yes | BG buy goods, WA withdraw agent, PB paybill, SM send money, SB send to business. | |
| merchantName | Yes | Name shown to the customer scanning the code. |