The Payment Company Logo

Crypto

Crypto Pay-In API

This guide explains how to integrate with The Payment Company Crypto Payin API. The API supports seamless cryptocurrency payment processing and includes endpoint details, payload information, and examples in multiple programming languages.

SectionCrypto
Topics08
Pathcrypto / crypto-payin / payin

API Endpoint

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

Request Fields

ParameterTypeDescriptionRequired
first_nameStringPayer first nameYes
last_nameStringPayer last nameYes
emailStringUser email addressYes
amountNumberTransaction amount in the smallest currency unitYes
currencyStringCurrency code in ISO 4217 formatYes
crypto_currencyStringCryptocurrency code, such as BTC, ETH, or USDTYes
crypto_networkStringCryptocurrency network, such as ETHEREUM or BITCOINYes
ip_addressStringUser IP addressYes
phone_numberStringPayer phone numberYes
addressStringBilling street addressYes
countryStringCountry code in ISO 3166-1 alpha-2 formatYes
order_idStringMerchant-side unique order referenceYes
redirect_urlStringURL where the user is redirected after paymentYes
webhook_urlStringURL used for server-to-server webhook updatesNo
terminal_idStringUnique connector terminal ID, useful when bypassing routing and cascading logicNo

Payload

Send the request payload as JSON. The sample structure is shown below:

{
"first_name": "James",
"last_name": "Crypto",
"email": "james.crypto@gmail.com",
"amount": 100,
"currency": "USD",
"crypto_currency": "BTC",
"crypto_network": "BITCOIN",
"ip_address": "127.0.0.1",
"phone_number": "7654233212",
"address": "64 Hertingfordbury Rd",
"order_id": "CRYPTO_12524",
"redirect_url": "https://thepayment.company",
"webhook_url": "https://thepayment.company/webhook",
"terminal_id": "T7244234",
}

Sample Responses

{
"status": "SUCCESS",
"message": "Payment processed successfully",
"redirect_url": "https://example.com/success",
"data": {
  "amount": 100.50,
  "currency": "USD",
  "order_id": "ORD123456",
  "transaction_id": "TXN789012",
  "customer": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@example.com"
  },
  "refund": {
    "status": false,
    "refund_date": null
  },
  "crypto_currency": "BTC",
  "crypto_network": "BITCOIN",
  "crypto_payment_status": "FULLPAID",
  "crypto_amount": 0.0025,
  "crypto_paid_amount": 0.0025
}
}

Understanding Crypto Payment Status

The crypto_payment_status field in the response indicates the payment completion status for cryptocurrency transactions. It is used to determine whether the received amount exactly matches, falls below, or exceeds the requested amount.

Payment Status Values

{
  "crypto_payment_status": "FULLPAID"
}

Description: The customer paid the exact requested amount.

Implementation Notes

Important: Always check the crypto_payment_status field before fulfilling orders for cryptocurrency payments. Because of blockchain transaction characteristics, small variations in payment amounts can occur because of:

  • Network fees and gas prices
  • Exchange-rate fluctuations during transaction processing
  • Limitations in the user's wallet

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.

On this page