Crypto
Crypto Payment Link API
This guide explains how to generate secure crypto payment links with The Payment Company API. It allows you to create encrypted payment links for crypto transactions, including on-ramp, off-ramp, and pay-in flows.
API Endpoint
Live APIProduction environment
POST
https://api.thepayment.company/api/v1/live/crypto/payment-linkTest APISandbox environment
POST
https://api.thepayment.company/api/v1/test/crypto/payment-linkOverview
The Crypto Payment Link API generates secure, encrypted payment links for multiple crypto transaction types:
- ONRAMP: Fiat to crypto
- OFFRAMP: Crypto to fiat
- PAYIN: Crypto payment collection
The API validates the secret key, verifies the payment template, and returns a secure URL for transaction completion.
Request Body Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
payment_template_id | String | Yes | ID of the payment template used for the link. |
transaction_type | String | Yes | Transaction type: ONRAMP, OFFRAMP, or PAYIN. |
order_id | String | No | Merchant-side unique order reference. |
terminal_id | String | No | Useful when you want this connector to be the primary or fallback connector. |
expiry_date | String | No | Expiry date in yyyy-mm-dd format. |
crypto_amount | String | Conditional | Cryptocurrency amount, based on the rules below. |
fiat_amount | Number | Conditional | Fiat amount, based on the rules below. |
crypto_currency | String | Conditional | Cryptocurrency code, such as BTC, ETH, or USDT. |
fiat_currency | String | Conditional | Fiat currency code, such as USD or EUR. |
Transaction Type Rules
ONRAMP: Do not provide
crypto_amount.OFFRAMP: Do not provide
fiat_amount.PAYIN: Do not provide
crypto_amount.Headers
| Header Name | Description |
|---|---|
Content-Type | Must be set to application/json. |
Authorization | Bearer token using your Secret key or Test key. |
Environment Behavior
- Test key returns a test payment link with
/testin the URL. - Secret key returns a live payment link with
/livein the URL.