# Generate an IPS QR code for an invoice `POST https://api.leapa.co/v2/invoices/{invoiceId}/generate-qr-code` Send your API key as a bearer token in the `Authorization` header. ## Path parameters - `invoiceId` · _string_ · **required** Example: `inv_7c1f9a2b48` ## Request body Optional. `application/json`. - `amount` · _integer_ - `currency` · _string_ - `qr_type` · _string_ ```json { "amount": 45000, "currency": "BIF", "qr_type": "string" } ``` ## Response 200 - `amount` · _integer_ - `currency` · _string_ - `status` · _string_ - `message` · _string_ - `invoice_id` · _string_ - `qr_reference` · _string_ - `qr_header_uuid` · _string_ - `qr_as_text` · _string_ - `qr_as_image` · _string_ - `expires_at` · _integer_ ```json { "amount": 45000, "currency": "BIF", "status": "pending", "message": "Request sent to the payer", "invoice_id": "inv_7c1f9a2b48", "qr_reference": "QR2026013100147", "qr_header_uuid": "string", "qr_as_text": "00020101021226580014BI.CBB.QR0111...", "qr_as_image": "data:image/png;base64,iVBORw0KGgo...", "expires_at": 1769850251000 } ``` ## Status codes - `200` OK - `400` Bad request - `401` Unauthorized - `402` Payment required - `403` Forbidden - `404` Not found - `428` Precondition required - `500` Server error ## Example ```bash curl -X POST "https://api.leapa.co/v2/invoices/inv_7c1f9a2b48/generate-qr-code" \ -H "Authorization: Bearer $LEAPA_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "amount": 45000, "currency": "BIF", "qr_type": "string" }' ``` --- _Generated from the Leapa documentation at leapa.co/docs._