Reusable Payment Links (QR Codes)

The QR Codes endpoint creates fixed-amount payment URLs that can be reused an unlimited number of times. Despite the "QR" name, the API simply returns a URL — you can use it on a website, in an email, or generate a QR code image for print materials.

Each successful payment using a reusable link creates a new order in your merchant account.

Use cases:

  • Fixed-price products (e-books, merchandise)
  • Charity donation amounts (£10, £25, £50)
  • Price lists or menus (food truck, market stall)
  • Subscription or membership fees

Create a QR code

Request

POST /v2/qr-codes
Content-Type: application/json

Body parameters

Parameter Type Required Description
amountintegeryesAmount in GB pence (e.g. 2000 = £20.00).
labelstringyesA name for this payment link (visible to you and the customer).
customer_data_collectionstringnoWhat information to collect from the customer. One of: none, email_only, contact_light, contact_full, billing.

Response

{
    "data": {
        "id": "0e261265",
        "label": "Donation - General Fund",
        "amount": 2000,
        "amount_formatted": "£20.00",
        "pay_link": "https://pay.wonderful.one/p/AbCdEfGh",
        "image_link": "https://api.wonderful.one/v2/qr-codes/0e261265/qr",
        "customer_data_collection": "email_only",
        "created_at": "2024-03-05T11:50:43.000000Z",
        "updated_at": "2024-03-05T11:50:43.000000Z"
    }
}

Example

curl --request POST \
    "https://api.wonderful.one/v2/qr-codes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data '{
        "amount": 2000,
        "label": "Donation - General Fund",
        "customer_data_collection": "email_only"
    }'
const url = new URL("https://api.wonderful.one/v2/qr-codes");

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

const body = {
    amount: 2000,
    label: "Donation - General Fund",
    customer_data_collection: "email_only",
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
})
    .then(response => response.json())
    .then(data => {
        console.log("Pay link:", data.data.pay_link);
        console.log("QR image:", data.data.image_link);
    });
$client = new \GuzzleHttp\Client();
$url = 'https://api.wonderful.one/v2/qr-codes';
$response = $client->post($url, [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
    ],
    'json' => [
        'amount' => 2000,
        'label' => 'Donation - General Fund',
        'customer_data_collection' => 'email_only',
    ],
]);
$body = json_decode((string) $response->getBody());
$payLink = $body->data->pay_link;
$qrImage = $body->data->image_link;

List all QR codes

Request

GET /v2/qr-codes

Response

{
    "data": [
        {
            "id": "0e261265",
            "label": "Donation - General Fund",
            "amount": 2000,
            "amount_formatted": "£20.00",
            "pay_link": "https://pay.wonderful.one/p/AbCdEfGh",
            "image_link": "https://api.wonderful.one/v2/qr-codes/0e261265/qr",
            "customer_data_collection": "email_only",
            "created_at": "2024-03-05T11:50:43.000000Z",
            "updated_at": "2024-03-05T11:50:43.000000Z"
        }
    ]
}

Example

curl --request GET \
    --get "https://api.wonderful.one/v2/qr-codes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
fetch("https://api.wonderful.one/v2/qr-codes", {
    headers: {
        "Authorization": "Bearer {YOUR_AUTH_KEY}",
        "Content-Type": "application/json",
        "Accept": "application/json",
    },
})
    .then(response => response.json())
    .then(data => console.log(data.data));
$client = new \GuzzleHttp\Client();
$response = $client->get('https://api.wonderful.one/v2/qr-codes', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
    ],
]);
$body = json_decode((string) $response->getBody());
print_r($body->data);

Get a single QR code

Request

GET /v2/qr-codes/{id}

Example

curl --request GET \
    --get "https://api.wonderful.one/v2/qr-codes/0e261265" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
fetch("https://api.wonderful.one/v2/qr-codes/0e261265", {
    headers: {
        "Authorization": "Bearer {YOUR_AUTH_KEY}",
        "Content-Type": "application/json",
        "Accept": "application/json",
    },
})
    .then(response => response.json())
    .then(data => console.log(data.data));
$client = new \GuzzleHttp\Client();
$response = $client->get('https://api.wonderful.one/v2/qr-codes/0e261265', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
    ],
]);
$body = json_decode((string) $response->getBody());
print_r($body->data);

Update a QR code

This replaces the entire record, so include all fields you want to keep.

Request

PUT /v2/qr-codes/{id}

Example

curl --request PUT \
    "https://api.wonderful.one/v2/qr-codes/0e261265" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data '{
        "amount": 3000,
        "label": "Donation - Updated"
    }'
fetch("https://api.wonderful.one/v2/qr-codes/0e261265", {
    method: "PUT",
    headers: {
        "Authorization": "Bearer {YOUR_AUTH_KEY}",
        "Content-Type": "application/json",
        "Accept": "application/json",
    },
    body: JSON.stringify({
        amount: 3000,
        label: "Donation - Updated",
    }),
})
    .then(response => response.json())
    .then(data => console.log(data.data));
$client = new \GuzzleHttp\Client();
$response = $client->put('https://api.wonderful.one/v2/qr-codes/0e261265', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
    ],
    'json' => [
        'amount' => 3000,
        'label' => 'Donation - Updated',
    ],
]);
$body = json_decode((string) $response->getBody());
print_r($body->data);

Delete a QR code

Returns 204 No Content on success. Deleting an already-deleted record returns 404.

Request

DELETE /v2/qr-codes/{id}

Example

curl --request DELETE \
    "https://api.wonderful.one/v2/qr-codes/0e261265" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
fetch("https://api.wonderful.one/v2/qr-codes/0e261265", {
    method: "DELETE",
    headers: {
        "Authorization": "Bearer {YOUR_AUTH_KEY}",
        "Content-Type": "application/json",
        "Accept": "application/json",
    },
});
$client = new \GuzzleHttp\Client();
$response = $client->delete('https://api.wonderful.one/v2/qr-codes/0e261265', [
    'headers' => [
        'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
        'Content-Type' => 'application/json',
        'Accept' => 'application/json',
    ],
]);

Next steps

  • Orders & refunds — view payments made via these links and process refunds.
  • Customers — manage customer records linked to payments.