Payment QR All docs

Payment QR API Reference

3 routes. Base URL https://api.apifor.dev, authenticated with x-api-key. Failed calls are not charged. Overview, limits and sources are on the Payment QR decoder API (QRIS, PromptPay, DuitNow, PayNow, VietQR) page.

POST/v1/payment-qr/decode1 credit

Parses an EMVCo merchant-presented QR payload: detects QRIS, PromptPay, DuitNow, SGQR/PayNow or VietQR (otherwise generic EMVCo), checks the CRC, and returns merchant, currency, amount, scheme account fields and every tag. A bad CRC is reported with valid=false, not an error. 1 credit.

Request body · application/json
{
  "payload": "00020101021138570010A00000072701270006970436011300110012345670208QRIBFTTA5204581253037045802VN5908Demo Pho6006Ha Noi6304E36C"
}
POST/v1/payment-qr/decode
curl -X POST 'https://api.apifor.dev/v1/payment-qr/decode' \
  -H 'content-type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{"payload":"00020101021138570010A00000072701270006970436011300110012345670208QRIBFTTA5204581253037045802VN5908Demo Pho6006Ha Noi6304E36C"}'
Example response · 200
{
  "success": true,
  "data": {
    "valid": true,
    "crc": {
      "valid": true,
      "expected": "E36C",
      "actual": "E36C"
    },
    "scheme": {
      "id": "vietqr",
      "name": "VietQR"
    },
    "schemes": [
      "vietqr"
    ],
    "payload_format": "01",
    "point_of_initiation": "static",
    "merchant": {
      "name": "Demo Pho",
      "city": "Ha Noi",
      "postal_code": null,
      "country": "VN",
      "category_code": "5812",
      "alternate": null
    },
    "transaction": {
      "currency": "VND",
      "currency_numeric": "704",
      "amount": null,
      "tip": null
    },
    "merchant_accounts": [
      {
        "tag": "38",
        "guid": "A000000727",
        "scheme": "vietqr",
        "fields": {
          "00": "A000000727",
          "01": "000697043601130011001234567",
          "02": "QRIBFTTA"
        },
        "details": {
          "bank_bin": "970436",
          "account_or_card": "0011001234567",
          "service_code": "QRIBFTTA",
          "service": "transfer_to_account"
        }
      }
    ],
    "card_networks": [],
    "additional_data": null,
    "tags": [
      {
        "tag": "00",
        "name": "payload_format_indicator",
        "length": 2,
        "value": "01"
      },
      {
        "tag": "01",
        "name": "point_of_initiation_method",
        "length": 2,
        "value": "11"
      }
    ],
    "warnings": []
  }
}
  • 200Decoded payload
  • 400Invalid parameters
POST/v1/payment-qr/to-dynamic1 credit

Turns a static QRIS or VietQR code into a dynamic one with a fixed amount (sets point of initiation 12, writes tag 54, recomputes the CRC). Other schemes return 422. 1 credit.

Request body · application/json
{
  "payload": "00020101021138570010A00000072701270006970436011300110012345670208QRIBFTTA5204581253037045802VN5908Demo Pho6006Ha Noi6304E36C",
  "amount": 150000
}
POST/v1/payment-qr/to-dynamic
curl -X POST 'https://api.apifor.dev/v1/payment-qr/to-dynamic' \
  -H 'content-type: application/json' \
  -H 'x-api-key: YOUR_API_KEY' \
  -d '{"payload":"00020101021138570010A00000072701270006970436011300110012345670208QRIBFTTA5204581253037045802VN5908Demo Pho6006Ha Noi6304E36C","amount":150000}'
Example response · 200
{
  "success": true,
  "data": {
    "payload": "00020101021238570010A00000072701270006970436011300110012345670208QRIBFTTA52045812530370454061500005802VN5908Demo Pho6006Ha Noi6304120B",
    "scheme": {
      "id": "vietqr",
      "name": "VietQR"
    },
    "point_of_initiation": "dynamic",
    "amount": "150000",
    "currency": "VND",
    "crc": "120B",
    "previous_amount": null
  }
}
  • 200New payload
  • 400Invalid parameters
  • 422Scheme not supported for this operation
GET/v1/payment-qr/coverageFree

Countries this service covers, with sources, licences, row counts and country-only fields. Free (0 credits), still needs an API key. Price note: Free.

GET/v1/payment-qr/coverage
curl 'https://api.apifor.dev/v1/payment-qr/coverage' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "success": true,
  "data": {
    "service": "payment-qr",
    "global": true,
    "country_param": "none",
    "param_name": "country",
    "countries": [
      {
        "country": "ID",
        "market": null,
        "subdivision_levels": [],
        "rows": null,
        "updated_at": null,
        "sources": [
          {
            "name": "EMV QR Code Specification (Merchant-Presented Mode)",
            "url": "https://www.emvco.com/emv-technologies/qr-codes/",
            "licence": "Public specification, implemented independently",
            "attribution": null
          }
        ],
        "local_fields": [],
        "notes": "QRIS: decode and to-dynamic."
      },
      {
        "country": "VN",
        "market": null,
        "subdivision_levels": [],
        "rows": null,
        "updated_at": null,
        "sources": [
          {
            "name": "EMV QR Code Specification (Merchant-Presented Mode)",
            "url": "https://www.emvco.com/emv-technologies/qr-codes/",
            "licence": "Public specification, implemented independently",
            "attribution": null
          }
        ],
        "local_fields": [],
        "notes": "VietQR: decode and to-dynamic."
      }
    ]
  }
}
  • 200Coverage

Error handling · Rate limits · Prices