Finrax API
HomeChangelogIntegration GuideResources
HomeChangelogIntegration GuideResources
  1. Crypto Payments
  • Getting Started
    • Introduction
    • Environments
    • Errors
    • Authorization
      • API Key Management
      • Signature
      • Code Snippets
  • Payments and Withdrawals
    • Crypto Payments
      • Fetch payment by ID
        GET
      • 🔒Fetch payments
        GET
      • Submit crypto payment
        PATCH
      • Request crypto payment
        POST
    • Fetch withdrawals
      GET
    • Fetch withdrawal metadata
      GET
    • Request crypto withdrawal
      POST
    • Fetch whitelisted addresses
      GET
    • Whitelist an address
      POST
    • Fetch crypto withdrawal approval by ID
      GET
    • Fetch business by ID
      GET
    • Fetch business balance
      GET
    • Unwhitelist an address
      DELETE
  • Callbacks
    • Deposit received notification
    • Withdrawal broadcast notification
    • Withdrawal approved/rejected notification
  • Address validation
    • Validate address
      GET
    • Validate address and destination tag
      GET
  • Rates and metadata
    • Fetch market rates
      GET
    • Fetch fiat rates
      GET
    • Fetch deposit rates
      GET
    • Fetch all currencies
      GET
  1. Crypto Payments

Submit crypto payment

PATCH
/api/v1/payments/{paymentId}
If you are using our payment URL supplied as a response of "Request payment" request, you'll not need to run this request. It will be handled by our hosted checkout application.

Request

Authorization
Add parameter in header
FRX-API
Example:
FRX-API: ********************
Path Params
paymentId
string <uuid>
required
ID of the payment to submit.
Body Params application/json
depositCurrency
enum<string> 
required
Cryptocurrency that should be used for the deposit.
Allowed values:
BCHBNBBTCETHLINKLTCSOLTRXUSDCUSDTXLMXRP
network
enum<string> 
optional
Cryptocurrency network on which the deposit will be received. Defaults to the native network for depositCurrency.
Allowed values:
BCHBTCLTCXLMXRPETHBSCSOLTRX
displayCurrency
enum<string> 
optional
Fiat currency, if not provided on payment creation.
Allowed values:
AEDARSAUDBDTBGNBRLCADCHFCLPCNYCZKDKKEURGBPHKDHRKHUFIDRILSINRISKJPYKESKRWMXNMYRNGNNOKNZDPENPHPPLNQARRONRUBSEKSGDTHBTRYUSDVNDZAR
displayAmount
string 
optional
Amount in displayCurrency, if not provided on payment creation.
Example
{
    "displayCurrency": "EUR",
    "displayAmount": 50,
    "depositCurrency": "USDT",
    "network": "ETH"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH 'https://payments.finrax.com/api/v1/payments/' \
--header 'Content-Type: application/json' \
--header 'FRX-API;' \
--data-raw '{
    "displayCurrency": "EUR",
    "displayAmount": 50,
    "depositCurrency": "USDT",
    "network": "ETH"
}'

Responses

🟢200Returns the submitted payment.
application/json
Body
paymentInfo
object (DetailedPaymentResponse) 
optional
paymentId
string <uuid>
required
clientPaymentId
string 
required
Payment identifier provided by the merchant on payment creation.
businessId
string <uuid>
required
locale
string 
required
Locale code.
status
enum<string> 
required
Allowed values:
NEWPENDINGAWAITINGDEPOSITEDEXPIREDBLOCKEDOVERPAID
rateType
enum<string> 
required
Allowed values:
FIXEDFLOATING
type
enum<string> 
required
Allowed values:
ONE_TIMEREUSABLE
url
string <url>
required
Checkout link.
overpaymentPolicy
enum<string> 
optional
Allowed values:
PROCESSEXCESS_REFUND
refundFollowUpDepositsForOneTimePayments
boolean 
optional
processorType
enum<string> 
required
Allowed value:
BLOCKCHAIN
walletAddress
string 
optional
Wallet address where the cryptocurrency amount should be deposited.
destinationTag
string 
optional
XLM/XRP destination tag.
displayCurrency
enum<string> 
optional
Fiat currency.
Allowed values:
AEDARSAUDBDTBGNBRLCADCHFCLPCNYCZKDKKEURGBPHKDHRKHUFIDRILSINRISKJPYKESKRWMXNMYRNGNNOKNZDPENPHPPLNQARRONRUBSEKSGDTHBTRYUSDVNDZAR
expectedDisplayAmount
string 
optional
Amount in displayCurrency requested for this payment.
expectedDisplayDistributedUserServiceFee
string 
optional
Distributed service fee amount in displayCurrency requested for this payment.
actualDisplayAmount
string 
required
Actual amount deposited in displayCurrency.
actualDisplayDistributedUserServiceFee
string 
required
Actual distributed service fee amount in displayCurrency.
depositCurrency
enum<string> 
optional
The selected cryptocurrency.
Allowed values:
BCHBNBBTCETHLINKLTCSOLTRXUSDCUSDTXLMXRP
expectedNetwork
enum<string> 
optional
The selected network.
Allowed values:
BCHBTCLTCXLMXRPETHBSCSOLTRX
expectedDepositAmount
string 
optional
Amount in depositCurrency to be deposited to fulfill the required amount in displayCurrency.
expectedDepositDistributedUserServiceFee
string 
optional
Distributed service fee amount in depositCurrency requested for this payment.
actualDepositAmount
string 
required
Actual amount deposited in depositCurrency by the end user.
actualDepositDistributedUserServiceFee
string 
required
Actual distributed service fee amount in depositCurrency.
expectedUniformAmount
string 
optional
Expected deposit amount in EUR.
actualUniformAmount
string 
required
Actual amount deposited in EUR.
userServiceFeeDistributionPercentage
string 
required
Percentage of the service fee covered by the user.
redirectUrl
string <url>
optional
Custom URL where the user will be redirected after payment completion.
expirationMinutes
integer <int64>
required
Timeframe in which the deposit should succeed.
>= 0
paymentInitiatedAt
integer <int64>
required
UNIX seconds at which the payment was initiated.
paymentRequestedAt
integer <int64>
optional
UNIX seconds at which the payment was requested.
deposits
array[object (DetailedDepositResponse) {28}] 
required
Example
{
    "paymentInfo": {
        "paymentId": "2fcd3399-49d4-45e0-b995-7c489f43fe08",
        "clientPaymentId": "test-payment-23-12-18-1",
        "businessId": "407710f4-de33-454b-a47f-dda792e272c8",
        "locale": "en-US",
        "status": "PENDING",
        "rateType": "FLOATING",
        "type": "ONE_TIME",
        "url": "https://example.com/deposit/2fcd3399-49d4-45e0-b995-7c489f43fe08?theme=skilling&locale=en-US&sessionToken=eyJhbGciOiJIUzUxMiJ9.eyJidXNpbmVzc0lkIjoiNDA3NzEwZjQtZGUzMy00NTRiLWE0N2YtZGRhNzkyZTI3MmM4Iiwib3JnYW5pc2F0aW9uSWQiOiJjZjFlNjdkMC00NmY2LTRhMDAtODM3MC0wOTBhNTA4N2M4MGYiLCJpYXQiOjE3MDI5MDY4OTksInBheW1lbnRJZCI6IjJmY2QzMzk5LTQ5ZDQtNDVlMC1iOTk1LTdjNDg5ZjQzZmUwOCJ9.LUnvFdCySVS03SX2ym4eJdUDlQfTe2un_DZ3tbYAoc7c9ABj71Po43tVxLTGP7VknrSftjB5ItvEuxF9EGn84Q",
        "overpaymentPolicy": "PROCESS",
        "refundFollowUpDepositsForOneTimePayments": false,
        "processorType": "BLOCKCHAIN",
        "walletAddress": "0x356c19d41921eb88C03308F31700C3F08cbD36D4",
        "displayCurrency": "EUR",
        "expectedDisplayAmount": "50.00",
        "expectedDisplayDistributedUserServiceFee": "0.00",
        "actualDisplayAmount": "0.00",
        "actualDisplayDistributedUserServiceFee": "0.00",
        "depositCurrency": "USDT",
        "expectedNetwork": "ETH",
        "expectedDepositAmount": "54.759355",
        "expectedDepositDistributedUserServiceFee": "0.000000",
        "actualDepositAmount": "0",
        "actualDepositDistributedUserServiceFee": "0",
        "expectedUniformAmount": "50.00",
        "actualUniformAmount": "0.00",
        "userServiceFeeDistributionPercentage": "0.00",
        "redirectUrl": "https://my-business.com/account?id=3423",
        "expirationMinutes": 10080,
        "paymentRequestedAt": 1702909646,
        "paymentInitiatedAt": 1702906899,
        "deposits": []
    }
}
Modified at 2024-07-24 14:04:47
Previous
🔒Fetch payments
Next
Request crypto payment
Built with