---
title: "Validate Payment & Generate QR API"
slug: validate-standard-payload
url: https://apyhub.com/callable-labs/service/validate-standard-payload
provider: Callable Labs
categories: [Verification Kit]
tags: [qr-validation, payment-validation, gs1-digital-link, swiss-qr-bill, upi, EVMCo, Pix-BR-Code, SEPA, GS1]
auth: api_key
version: 1.0.0
service_type: sync
endpoints: 3
atoms: 1-20
mcp: true
---

# Validate Payment & Generate QR API

Validate GS1 and payment QR payloads, inspect parsed fields, and render scannable QR codes in common formats. Useful for checkout, invoicing, and test automation.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/callable-labs/validate-standard-payload/validate` | What it does Validates a single QR payment or GS1 payload against the selected standard and returns… | 10 |
| POST | `https://api.eu.apyhub.com/callable-labs/validate-standard-payload/render` | What it does Validates a complete GS1 or payment payload against the selected standard and renders… | 20 |
| GET | `https://api.eu.apyhub.com/callable-labs/validate-standard-payload/fixtures` | What it does Returns a list of official-source reference fixtures for the requested QR payment stan… | 1 |

## Endpoint reference

### Validate one GS1 or payment QR payload

`POST https://api.eu.apyhub.com/callable-labs/validate-standard-payload/validate` · 10 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `payload` | body | string | yes | Complete raw payload to validate, exactly as encoded in the QR symbol or URI, 1 to 10,000 characters. Preserve newlines for EPC/SEPA and Swiss QR-bill payloads; whitespace and case are significant fo… |
| `standard` | body | string | yes | Standard to validate the payload against. Only the selected scheme's rules run. Choose `gs1-digital-link`, `epc-sepa`, `swiss-qr-bill`, `pix-br-code`, `upi` or `emvco-mpm`. One of: gs1-digital-link,… |

#### Quickstart

Validate a QR payment payload by sending the standard and raw encoded payload in a JSON body.

```bash
curl -X POST "https://api.eu.apyhub.com/callable-labs/validate-standard-payload/validate" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "standard": "gs1-digital-link",
    "payload": "https://id.gs1.org/01/09506000134352/21/ABC123"
  }'
```

#### What you'll get back

Returns a JSON object with `standard` and `specification` strings, a `valid` boolean, and optional `errors`, `warnings`, `fields`, and `normalized` fields. `valid` is `true` when no blocking validation errors were found.

```json
{
  "standard": "gs1-digital-link",
  "valid": true,
  "normalized": "https://id.gs1.org/01/09506000134352/21/ABC123",
  "fields": {
    "domain": "id.gs1.org",
    "primary_ai": "01",
    "path_ais": {
      "21": "ABC123",
      "01": "09506000134352"
    },
    "query_ais": {}
  },
  "errors": [],
  "warnings": [],
  "specification": "GS1 Digital Link URI Syntax 1.7.0 (August 2026)"
}
```

### Generate a QR code from a validated payload

`POST https://api.eu.apyhub.com/callable-labs/validate-standard-payload/render` · 20 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `dark` | body | string | no | Colour of the dark modules: a hex value such as `#1d4ed8`, an `rgb()` value or a CSS colour name. Default: `#000000`. Example: `#1d4ed8`. |
| `size` | body | integer | no | Exact output width in pixels, 32 to 2048. Omit to use eight pixels per QR module. Example: `300`. |
| `light` | body | string | no | Background colour. Use `transparent` or null for no background; some scanners rely on a light quiet zone, so verify transparent output. Default: `#ffffff`. |
| `format` | body | string | no | Output format. `json` (default) returns a data URI plus metadata; `png`, `svg`, `jpeg`, `webp` and `pdf` return the image or document bytes with the matching content type. One of: json, png, svg, jpe… |
| `payload` | body | string | yes | Complete raw payload exactly as encoded, 1 to 10,000 characters. EPC/SEPA and Swiss QR-bill are line-delimited: separate lines with a line feed inside the JSON string. Literal `\n` sequences are deco… |
| `standard` | body | string | yes | Standard the payload must satisfy before it is rendered. Only the selected scheme's rules run, the same checks as `POST /v1/standards/validate`. If the payload fails, the response is `422 invalid_pay… |

#### Quickstart

Encode a raw GS1 or payment payload into a QR code with the default JSON response.

```bash
curl -X POST "https://api.eu.apyhub.com/callable-labs/validate-standard-payload/render" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "body": {
      "standard": "gs1-digital-link",
      "payload": "https://id.gs1.org/01/09506000134352/21/ABC123",
      "format": "json"
    }
  }'
```

#### What you'll get back

Returns a JSON object containing the rendered QR code as a PNG data URI together with metadata such as `format`, `media_type`, `width`, `height`, `version`, `content`, and `verified`.

```json
{
  "format": "json",
  "image_format": "png",
  "media_type": "image/png",
  "width": 328,
  "height": 328,
  "data_uri": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUgAAAFICAYAAAAyFGczAAAGPUlEQVR42u3dUYrDOBRE0cng/W/Zs4CB9ocQVU8657+T2HEuanhIv/d9338A+J9/3QIAgQQQSACBBBBIAIEEEEgAgQQQSACBBBBIAIEEQCABBBJAIAEEEkAgAQQSQCABBBJAIAEEEkAgARBIAIEEEEgAgQQQSACBBBBIAIEEOMGT/gC/3+/oG/y+79L1f/396v3d/frp+7f6+qdf//TfjxUkgEACCCSAQAIIJIBAAggkwPWe9g+YnoP6snsOb/ecW/vnT3++1ecv/fye/vuxggQQSACBBBBIAIEEEEgAgQS43jP9AtL78aWlP9/p+0G2z3H6/VhBAggkgEACCCSAQAIIJIBAAlzucQtmW93PcPXvd79+ej/M6XOIWEECCCSAQAIIJIBAAggkgEACHM4cZFj7nGC76XOYWEECCCSAQAIIJIBAAiCQAAIJsGT8HOT0c3e/pPd7bD93Ov3+q89fes7y9N+PFSSAQAIIJIBAAggkgEACCCTA8ernIO13mJ1znD7HuDrnl35/vx8rSACBBBBIAIEEEEgAgQRAIAH+9HttCDf7C9w8hzf99Xff3938PK0gAQQSQCABBBJAIAEEEgCBBPhT/Rzk6fvZ7b797edi7/7+p+/nmP79tD+fVpAAAgkgkAACCSCQAAIJIJAA14vPQU7fD7B9jnD1+tLS+02m/37395c+9zz9/FtBAggkgEACCCSAQAIIJIBAAoxXPwe5Kj3n1T7nNv37bb/++gCUz3laQQIIJIBAAggkgEACCCQAAgnw4fpzsdvntNr3M5x+f6ff//Sc7em/PytIAIEEEEgAgQQQSACBBBBIgHr1c5CfF1B+rvOq9jnF9v08b9/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QSQCAB6v3e8KDT6ecuTz+Xevd+hO33f/X7mT7nePq511aQAAIJIJAAAgkgkAACCSCQAOPF5yABrCABBBJAIAEEEkAgARBIAIEEEEgAgQQQSACBBBBIAIEEEEgAgQQQSAAEEkAgAQQSQCABBBJAIAEEEkAgAQQSQCABBBJAIN0CAIEEEEgAgQTY6D+gk/yG825EywAAAABJRU5ErkJggg==",
  "warnings": [],
  "verified": true,
  "modules": {
    "width": 33,
    "height": 33
  },
  "version": 4,
  "error": "Q",
  "micro": false,
  "designator": "4-Q",
  "content": "https://id.gs1.org/01/09506000134352/21/ABC123"
}
```

### Get official-source reference fixtures

`GET https://api.eu.apyhub.com/callable-labs/validate-standard-payload/fixtures` · 1 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `standard` | query | string | no | One of: gs1-digital-link, epc-sepa, swiss-qr-bill, pix-br-code, upi, emvco-mpm. |

#### Quickstart

Fetch reference QR payment fixtures for a standard like `upi` or `swiss-qr-bill`.

```bash
curl -X GET "https://api.eu.apyhub.com/callable-labs/validate-standard-payload/fixtures?standard=upi" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON array of fixture objects. Each object includes `id`, `standard`, `title`, `payload`, `source`, and `note` fields, and may also include `expected_valid` to indicate the validator should accept the payload.

```json
[
  {
    "id": "upi-pay-basic",
    "standard": "upi",
    "title": "UPI pay deep link",
    "payload": "upi://pay?pa=callablelabs@upi&pn=Callable%20Labs&am=10.00&cu=INR&tn=API%20test",
    "expected_valid": true,
    "source": "https://www.npci.org.in/PDF/npci/upi/circular/2017/Circular%20on%20Non-compliance%20of%20UPI%20apps%20to%20Deeplinking%20specs%20Circular%2037-%201.11.2017.pdf",
    "note": "Conformance fixture derived from NPCI UPI Deep Linking 1.5.1 requirements."
  }
]
```

## About

## What it does
The **Payment QR Code API** checks a payment or GS1 payload against its official specification and renders it as a QR code. Set `standard` to `gs1-digital-link`, `epc-sepa`, `swiss-qr-bill`, `pix-br-code`, `upi` or `emvco-mpm`, and send the exact encoded `payload`.

The validate endpoint returns `valid`, the exact `specification` version used, the parsed `fields`, and a `normalized` form when one exists. Blocking problems come back in `errors` and non-blocking ones in `warnings`, so you can fix a payload before you store or print it.

The render endpoint runs the same checks, then draws the code. A payload that fails is rejected with `422 invalid_payload`, and nothing is rendered. Set `format` to `json` (default), `png`, `svg`, `jpeg`, `webp` or `pdf`. Set `size` from 32 to 2048 pixels, and `dark` and `light` for the colors. Error correction is fixed at level M. Every code is scanned back, and `verified` confirms it decodes to the payload.

Call the fixtures endpoint to get official-source sample payloads for each standard, so you can test your own encoder.

Teams use the Payment QR Code API to print SEPA (EPC) QR codes on invoices and to create Swiss QR-bills. Others generate Pix and UPI payment codes, or check GS1 Digital Link codes on packaging.

For styled codes with logos, use the [Generate Branded QR Code API](https://apyhub.com/dosvak/service/generate-branded-qr-code). To read codes from images, use the [Decode QR & Barcode API](https://apyhub.com/callable-labs/service/read-qr-barcode-image).

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/callable-labs/service/validate-standard-payload
