Create a Charge via API
Create one-time Pay Links programatically
Charges can be created for both standard Pay Links and subscription-based Pay Links.
Pre-requisites
In order to create a Charge using the Helio API, you need to complete the steps.
1. Create Helio Account & get API keys
You can learn how to set up a Helio account and generate your API keys by following the steps here.
Create a Pay Link
You can learn how to create a Pay Link and explore all configuration options here.
Creating a Charge via API
NOTE: When using the production environment (app.hel.io)
, set your API endpoint to api.hel.io/v1
and generate API keys there. For the development environment, use api.dev.hel.io/v1
and generate API keys from app.dev.hel.io
.
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:
paymentRequestId
refers to the ID of the Pay Link, which can be found at the end of your Pay Link's URL.requestAmount
is required only if your Pay Link is dynamic, as you must specify the price.
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