π§ΎCreate "Charge Pages" via Widget or API
Create single-use checkouts programatically
"Charge pages" or "charges" are an extended feature of Helio Pay Links that allow you to generate unique, single-use checkout pages from the same paylinkID.
Charges are optimal for mobile payment flows, deep-linking, QR codes, embedded pay buttons on simple websites like Wix, plugins to E-commerce baskets, or other custom payment flows.
Create a Charge Page via Widget
You can embed a Helio widget in any website to generate charges. When using the widget, a new tab will open, redirecting the user to the unique checkout page.
The user will only be able to pay once, and refreshing the page will not allow the user to transact again.
When creating your checkout widget, simply include "display": "new-tab"
in your configuration code to enable charges. Below is an example configuration.
When a user selects Pay with Card, scans the QR code or connects from a mobile device, a charge page is automatically generated to offer the optimal user experience.
Refer to our Checkout Widget documentation for more information or use our Checkout Widget Builder to get started quickly.
Create a Charge via API
Pre-requisites
In order to create a Charge using the Helio API, you need to complete the following steps.
1. Create Helio Account & get API keys
Navigate to
https://app.hel.io
and login by using any of the login methods.Navigate to the settings page and select the API tab.
Click on
Enable
checkbox, this will generatePublic API Key
andSecret API Key
for you.Save both securely since you won't be able to retrieve the
Secret API Key
again, however, you can always regenerate both (which will override the old one).
2. Create a Pay Link
Navigate to the Pay Links section on
https://app.hel.io
and create a new Pay Link.Fill in the required details, set the price and generate the pay link.
Note: You can also create a Pay Link via API.
Once you have set up your Pay Link, simply grab the
paymentRequestId
from the Pay Link URL
API Endpoint: https://api.hel.io/v1/charge/api-key
HTTP Method:
POST
Required Query Parameters:
?apiKey={{Your public key here}}
Required Headers:
Authorization: Bearer {{Your API Token here}}
Example request body:
For Pay Links with preset pricing, only
paymentRequestID
is required.If you select dynamic pricing, you'll specify
requestAmount
, this is the amount the user pays.
Example response body:
"id" represents the id of the charge.
"pageUrl" is the url of the charge page.
Example query:
From the following example replace: YOUR_PUBLIC_API_KEY, YOUR_SECRET_API_KEY, with the values you collected in the previous step.
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:
Example query:
Last updated