Overview

Create single-use Pay Links and checkout sessions

Helio Charges are an extension of Pay Links that let you generate unique, single-use checkout pages from the same paylinkId. They’re ideal for mobile-first flows, QR codes, deep linking, embedded pay buttons, and custom e-commerce integrations.

Using the API to create charges you can:

  • Dynamically set the price of each checkout using the requestAmount parameter.
  • Pass through custom metadata with additionalJSON in the customerDetails object.
  • Trigger a card-only payment flow by appending ?cardonly=true to the charge URL.

The following sections show how to include extra fields in your request and how to configure specific flows like card-only payments.

Using additionalJSON in Your Request:

You can use the additionalJSON field within the customerDetails object to include any extra information you'd like to pass along with your payment request.

Example Request Body:

{  
  "paymentRequestId": "66c49e24701f6930ee9c77dd",
  "requestAmount": "0.01",
  "prepareRequestBody": {
    "customerDetails": {
      "additionalJSON": "[]"
    }
  }
}

Example Query:

curl --location 'https://api.hel.io/v1/charge/api-key?apiKey=<YOUR_PUBLIC_API_KEY>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_API_KEY' \
--data '{
    "paymentRequestId": "667974dbb38d45b726751902",
    "requestAmount": "0.2"
    "prepareRequestBody": {
    "customerDetails": {
      "additionalJSON": "[]" # or whatever json you want here.
    }
  }
}'

Trigger Pay with Card via Charge

To trigger the Pay with Card flow directly from a charge page, simply append the query parameter ?cardonly=true to the end of the charge URL.

This will automatically launch the card payment flow without requiring the user to connect a Web3 wallet, which is useful for streamlining checkout for non-crypto users, enabling faster payments, or setting card as the default in your payment flow.

Example:

https://app.hel.io/charge/0f577645-b680-4d0a-8678-6fec0713ff3d?cardonly=true