- Getting Started
- Payments and Withdrawals
- Callbacks
- Address validation
- Rates and metadata
Request crypto payment
POST
/api/v1/payments
paymentUrl
is provided in the response which can be served within an iframe.redirectUrl
in the request, we will navigate the end-user back to your website upon payment completion (when we have received a deposit against this payment request). There is also a button which the end-user can use if they wish to get redirected back sooner.Request
Authorization
Add parameter in header
FRX-API
Example:
FRX-API: ********************
Body Params application/json
clientPaymentId
stringÂ
required
businessId
string <uuid>
required
type
enum<string>Â
optional
Allowed values:
ONE_TIMEREUSABLE
displayCurrency
enum<string>Â
optional
depositCurrency
.Allowed values:
AEDARSAUDBDTBGNBRLCADCHFCLPCNYCZKDKKEURGBPHKDHRKHUFIDRILSINRISKJPYKESKRWMXNMYRNGNNOKNZDPENPHPPLNQARRONRUBSEKSGDTHBTRYUSDVNDZAR
displayAmount
stringÂ
optional
displayCurrency
that the user wants to deposit. Required if displayCurrency
is provided.depositCurrency
enum<string>Â
optional
displayCurrency
.Allowed values:
BCHBNBBTCETHLINKLTCSOLTRXUSDCUSDTXLMXRP
depositAmount
stringÂ
optional
depositCurrency
that the user wants to deposit. Required if depositCurrency
is provided.network
enum<string>Â
optional
depositCurrency
is provided.Allowed values:
BCHBTCLTCXLMXRPETHBSCSOLTRX
rateType
enum<string>Â
optional
ONE_TIME
payments: FIXED
or FLOATING
.REUSABLE
payments: You can omit this parameter. Reusable payments are set to FLOATING
.Allowed values:
FIXEDFLOATING
expirationMinutes
integer <int64>
optional
ONE_TIME
payments: Indicates the timeframe in which the deposit should happen. A value of 0 will set the payment expiry to 7 days. Defaults to 30 min.REUSABLE
payments: You can omit this parameter. Reusable payments are set to non-expiry.>= 0
locale
stringÂ
required
redirectUrl
stringÂ
optional
Example
{
"clientPaymentId": "test-payment-15-09-23-1",
"locale": "en-US",
"type": "ONE_TIME",
"displayCurrency": "EUR",
"displayAmount": 50,
"rateType": "FIXED",
"expirationMinutes": 10080,
"businessId": "407710f4-de33-454b-a47f-dda792e272c8",
"redirectUrl": "https://my-business.com/account?id=3423"
}
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 POST 'https://payments.finrax.com/api/v1/payments' \
--header 'Content-Type: application/json' \
--header 'FRX-API;' \
--data-raw '{
"clientPaymentId": "test-payment-15-09-23-1",
"locale": "en-US",
"type": "ONE_TIME",
"displayCurrency": "EUR",
"displayAmount": 50,
"rateType": "FIXED",
"expirationMinutes": 10080,
"businessId": "407710f4-de33-454b-a47f-dda792e272c8",
"redirectUrl": "https://my-business.com/account?id=3423"
}'
Responses
🟢200Returns the created payment.
application/json
Body
paymentInfo
object (DetailedPaymentResponse)Â
optional
paymentId
string <uuid>
required
clientPaymentId
stringÂ
required
businessId
string <uuid>
required
locale
stringÂ
required
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
overpaymentPolicy
enum<string>Â
optional
Allowed values:
PROCESSEXCESS_REFUND
refundFollowUpDepositsForOneTimePayments
booleanÂ
optional
processorType
enum<string>Â
required
Allowed value:
BLOCKCHAIN
walletAddress
stringÂ
optional
destinationTag
stringÂ
optional
displayCurrency
enum<string>Â
optional
Allowed values:
AEDARSAUDBDTBGNBRLCADCHFCLPCNYCZKDKKEURGBPHKDHRKHUFIDRILSINRISKJPYKESKRWMXNMYRNGNNOKNZDPENPHPPLNQARRONRUBSEKSGDTHBTRYUSDVNDZAR
expectedDisplayAmount
stringÂ
optional
displayCurrency
requested for this payment.expectedDisplayDistributedUserServiceFee
stringÂ
optional
displayCurrency
requested for this payment.actualDisplayAmount
stringÂ
required
displayCurrency
.actualDisplayDistributedUserServiceFee
stringÂ
required
displayCurrency
.depositCurrency
enum<string>Â
optional
Allowed values:
BCHBNBBTCETHLINKLTCSOLTRXUSDCUSDTXLMXRP
expectedNetwork
enum<string>Â
optional
Allowed values:
BCHBTCLTCXLMXRPETHBSCSOLTRX
expectedDepositAmount
stringÂ
optional
depositCurrency
to be deposited to fulfill the required amount in displayCurrency
.expectedDepositDistributedUserServiceFee
stringÂ
optional
depositCurrency
requested for this payment.actualDepositAmount
stringÂ
required
depositCurrency
by the end user.actualDepositDistributedUserServiceFee
stringÂ
required
depositCurrency
.expectedUniformAmount
stringÂ
optional
actualUniformAmount
stringÂ
required
userServiceFeeDistributionPercentage
stringÂ
required
redirectUrl
string <url>
optional
expirationMinutes
integer <int64>
required
>= 0
paymentInitiatedAt
integer <int64>
required
paymentRequestedAt
integer <int64>
optional
deposits
array[object (DetailedDepositResponse) {28}]Â
required
paymentUrl
string <url>
optional
Example
{
"paymentInfo": {
"paymentId": "2fcd3399-49d4-45e0-b995-7c489f43fe08",
"clientPaymentId": "test-payment-15-09-23-1",
"businessId": "407710f4-de33-454b-a47f-dda792e272c8",
"locale": "en-US",
"status": "NEW",
"rateType": "FIXED",
"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",
"displayCurrency": "EUR",
"expectedDisplayAmount": "50.00",
"actualDisplayAmount": "0.00",
"actualDisplayDistributedUserServiceFee": "0.00",
"actualDepositAmount": "0",
"actualDepositDistributedUserServiceFee": "0",
"actualUniformAmount": "0.00",
"userServiceFeeDistributionPercentage": "0.00",
"redirectUrl": "https://my-business.com/account?id=3423",
"expirationMinutes": 10080,
"paymentInitiatedAt": 1702906899,
"deposits": []
},
"paymentUrl": "https://example.com/deposit/2fcd3399-49d4-45e0-b995-7c489f43fe08?theme=skilling&locale=en-US&sessionToken=eyJhbGciOiJIUzUxMiJ9.eyJidXNpbmVzc0lkIjoiNDA3NzEwZjQtZGUzMy00NTRiLWE0N2YtZGRhNzkyZTI3MmM4Iiwib3JnYW5pc2F0aW9uSWQiOiJjZjFlNjdkMC00NmY2LTRhMDAtODM3MC0wOTBhNTA4N2M4MGYiLCJpYXQiOjE3MDI5MDY4OTksInBheW1lbnRJZCI6IjJmY2QzMzk5LTQ5ZDQtNDVlMC1iOTk1LTdjNDg5ZjQzZmUwOCJ9.LUnvFdCySVS03SX2ym4eJdUDlQfTe2un_DZ3tbYAoc7c9ABj71Po43tVxLTGP7VknrSftjB5ItvEuxF9EGn84Q"
}
Modified at 2024-07-24 14:04:47