You can also create a Charge via the API for your subscription, where you can pass additional metadata for individual subscriptions using additionalJSON.
Pre-requisites
Follow the pre-requisite steps to setup our API and get your keys.
Create the Pay Link using your API keys
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/paylink/create/api-key
HTTP Method: POST
Required Query Parameters: ?apiKey={{Your public key here}}
Required Headers: Authorization: Bearer {{Your API Token here}}
Required request body:
{
"template": "SUBSCRIPTION",
"name": "Your paylink name here",
"price": "1000000", /* price is int64 represented by the base units of each currency, e.g. "price": "1000000" = 1 USDC */
"pricingCurrency": "6340313846e4f91b8abc519b", /* currency ID to price it in - can be a fiat currency */
"features": {
"isSubscription": true
},
"recipients": [
{
"walletId": "YOUR_WALLET_ID",
"currencyId": "6340313846e4f91b8abc519b"
}
],
"subscriptionDetails": {
"renewalReminders": 3, /* number of daily renewal reminders before subscription cancellation /*
"gracePeriod": 2, /* grace period (in days) after subscription expiry
"annualDiscountBps": 0, /* discount in basis points if the subscription is annual /*
"interval": "MONTH"
}
}
For the full list of Pay Link customisation options, such as Discord gating, split payments, etc., please refer to our full documentation.
From the following example replace: YOUR_PUBLIC_API_KEY, YOUR_SECRET_API_KEY, YOUR_WALLET_ID (and the pricing/recipient currency IDs) with the values you collected in the previous step.