The Payment Company Logo

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.

SectionCrypto
Topics11
Pathcrypto / cryptoPaymentLink

API Endpoint

Live APIProduction environment
POSThttps://api.thepayment.company/api/v1/live/crypto/payment-link
Test APISandbox environment
POSThttps://api.thepayment.company/api/v1/test/crypto/payment-link

Overview

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

ParameterTypeRequiredDescription
payment_template_idStringYesID of the payment template used for the link.
transaction_typeStringYesTransaction type: ONRAMP, OFFRAMP, or PAYIN.
order_idStringNoMerchant-side unique order reference.
terminal_idStringNoUseful when you want this connector to be the primary or fallback connector.
expiry_dateStringNoExpiry date in yyyy-mm-dd format.
crypto_amountStringConditionalCryptocurrency amount, based on the rules below.
fiat_amountNumberConditionalFiat amount, based on the rules below.
crypto_currencyStringConditionalCryptocurrency code, such as BTC, ETH, or USDT.
fiat_currencyStringConditionalFiat 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 NameDescription
Content-TypeMust be set to application/json.
AuthorizationBearer token using your Secret key or Test key.

Environment Behavior

  • Test key returns a test payment link with /test in the URL.
  • Secret key returns a live payment link with /live in the URL.

Sample Payloads

ONRAMP

{
  "payment_template_id": "TPL123456",
  "transaction_type": "ONRAMP",
  "fiat_amount": 1000,
  "fiat_currency": "USD",
  "crypto_currency": "BTC",
  "expiry_date": "2025-12-31",
}

OFFRAMP

{
  "payment_template_id": "TPL123456",
  "transaction_type": "OFFRAMP",
  "crypto_amount": 0.05,
  "crypto_currency": "ETH",
  "fiat_currency": "USD",
  "expiry_date": "2025-12-31",
}

PAYIN

{
  "payment_template_id": "TPL123456",
  "transaction_type": "PAYIN",
  "fiat_amount": 500,
  "fiat_currency": "USD",
  "crypto_currency": "USDT",
  "expiry_date": "2025-12-31",
}

Sample Responses

{
"message": "Crypto payment link created successfully",
"data": "https://portal.thepayment.company/crypto-link/TPL123456/PLK7923412397/live?encrypted_config=ENCRYPTED_STRING"
}

On this page