Skip to content

Generate an IPS QR code for an invoice

POST https://api.leapa.co/v2/invoices/{invoiceId}/generate-qr-code

This endpoint needs your API key

Send it as a bearer token in the Authorization header. A request without one is answered with 401. See Authentication for where to find your key and how to keep it secret.

Request

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"
  }'

Response

OK

{
  "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
}

Path parameters

Values that go into the URL itself.

  • invoiceIdstringrequired
    Example:inv_7c1f9a2b48

Request body

application/json

Optional. Send it as JSON.

  • amountinteger<int64>
  • currencystring
  • qr_typestring

Response

application/json
  • amountinteger<int64>
  • currencystring
  • statusstring
  • messagestring
  • invoice_idstring
  • qr_referencestring
  • qr_header_uuidstring
  • qr_as_textstring
  • qr_as_imagestring
  • expires_atinteger<int64>

Status codes

  • 200OK
  • 400Bad request
  • 401Unauthorized
  • 402Payment required
  • 403Forbidden
  • 404Not found
  • 428Precondition required
  • 500Server error

Request

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"
  }'

Response

OK

{
  "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
}