Under Settings -> API, check Enable to generate your Public and Secret API Keys.
Save these securely, as the Secret API Key wonβt be retrievable later (you can regenerate both if needed).
2. Prepare request payload
Specify the recipient wallet, payment currency, and accepted recipient currencies:
Under Settings -> Manage Wallets, click the three dots next to your wallet and select Copy Helio ID (note: this is different from your Public Key).
To see supported currencies, use a GET request to https://api.hel.io/v1/currency/all and select your pricing currency and accepted recipient currencies.
For example here is a SOL currency object returned from https://api.hel.io/v1/currency/all
Required Query Parameters: ?apiKey={{Your public key here}}
Required Headers: Authorization: Bearer {{Your API Token here}}
Required request body:
{"template": "OTHER","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": {},/* this must be set, even if empty */"recipients": [ {"walletId":"YOUR_WALLET_ID","currencyId":"6340313846e4f91b8abc519b" } ]}
All the fields in the example request body are mandatory.
Configure multiple recipients and currencies if needed. The recipient currency can differ from the pricing currency.
For instance, you could price the link in EUR (e.g., β¬5) while accepting USDC or USDT as recipient currencies.
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.
For the response body please check the response body section below.
Note for this basic example pricingCurrency and currencyId are the same, but they don't have to be. For example, you can price the Pay Link in USDC and receive SOL, Helio takes care of the conversions on your behalf
Advanced use cases
For advanced use cases, here is the full list of possible request body options.
If you would like to a single-use payments, we recommend using charges. Alternatively you can set a limit of 1 on your Pay Link using the following config: