Crypto
Crypto On/Off Ramp API
This guide explains how to integrate with The Payment Company Crypto On/Off Ramp API. It supports seamless on-ramp (fiat to crypto) and off-ramp (crypto to fiat) transactions through a single endpoint, with endpoint details, payload information, and examples in multiple programming languages.
API Endpoint
https://api.thepayment.company/api/v1/live/cryptohttps://api.thepayment.company/api/v1/test/cryptoOverview
The Crypto On/Off Ramp API provides a single solution for both on-ramp and off-ramp cryptocurrency transactions:
- On-ramp (fiat to crypto): Convert fiat currency into cryptocurrency
- Off-ramp (crypto to fiat): Convert cryptocurrency into fiat currency
Both transaction types are handled through the same API endpoint, with the transaction type specified in the request payload.
Request Fields
| Parameter | Type | Description | Required |
|---|---|---|---|
first_name | String | User first name, 3-191 letters only | Yes |
last_name | String | User last name, 3-191 letters only | Yes |
phone_number | String | User phone number, 8-19 digits with an optional + prefix | Yes |
transaction_type | String | Transaction type: ONRAMP (fiat to crypto) or OFFRAMP (crypto to fiat) | Yes |
fiat_currency | String | Fiat currency code, 3 characters, for example USD or EUR | Yes |
crypto_currency | String | Cryptocurrency code, for example BTC, ETH, or USDT | Yes |
crypto_network | String | Cryptocurrency network, for example ETHEREUM or BITCOIN | Yes |
crypto_amount | Number | Cryptocurrency amount, required for OFFRAMP and not allowed for ONRAMP | Conditional |
fiat_amount | Number | Fiat amount, required for ONRAMP and not allowed for OFFRAMP | Conditional |
wallet_address | String | Crypto wallet address used to receive or send funds | Yes |
ip_address | String | User IP address | Yes |
email | String | User email address | Yes |
country | String | Country code in ISO 3166-1 alpha-2 format | Yes |
payment_method | String | Payment method: CARD, BANK, or WALLET | No |
redirect_url | String | URL where the user is redirected after the transaction | Yes |
webhook_url | String | URL used for server-to-server webhook updates | No |
order_id | String | Merchant-side unique order reference | No |
terminal_id | String | Unique connector terminal ID, useful when choosing a primary or fallback connector | No |
Transaction Type Rules
fiat_amountis requiredcrypto_amountshould not be sent- The user pays in fiat currency and receives cryptocurrency
crypto_amountis requiredfiat_amountshould not be sent- The user sends cryptocurrency and receives fiat currency
Sample Payloads
On-Ramp Transaction (Fiat to Crypto)
Off-Ramp Transaction (Crypto to Fiat)
Sample Responses
Integration Notes
Encrypted payment APIs must use AES-256-CBC before transmitting sensitive fields. Authentication, headers, encryption steps, and sample implementations for Node.js, PHP, Python, and Java are documented in Integration Examples.