Creating a Payment
Creating a Payment
POST https://api-processing.crypto-chief.com/v1/payments
Headers
Content-Type
application/json
Signature
Signed request body
Merchant
Merchant ID
Body
amount
string
true
Amount to be paid. If the amount includes pennies, use a ‘.’ as a decimal separator. Example: 10.28
currency
string
true
Currency code
order_id
string
true
Order identifier in your system. Must be a string consisting of letters, digits, underscores, and hyphens. No spaces or special characters allowed. order_id must be unique among seller’s invoices
user_id
string
true
Unique user identifier
network
string
false
Blockchain network code
url_error
string
false
In case of any error or cancellation of the created invoice, the user can click a button on the payment form to return to this URL
url_success
string
false
After successful payment, the user can click a button on the payment form to return to this URL
url_callback
string
false
URL where the webhook will be sent
lifetime
integer
false
Validity period of the issued invoice (in seconds)
accuracy_payment_percent
integer
false
Allowable payment inaccuracy. For example, if you pass a value of 5, the invoice will be marked as paid even if the customer has only paid 95% of the amount. The actual payment amount will be credited to the balance.
additional_data
string
false
Additional information for you (not shown to the client)
coins
array
false
List of allowed coins for payment. This is useful if you want to limit the list of coins your customers can use to pay invoices.
except_coins
array
false
List of excluded coins for payment
course_source
string
false
The service from which exchange rates are taken for recalculation in the invoice.
Available values:
Binance
BinanceP2P
Bybit
BybitP2P
Exmo
Kucoin
Response
Note on address and qr_code fields
address and qr_code fieldsThe fields address and qr_code are returned only when the payment method is fixed — that is, when the merchant specifies a single coin in the coins array and provides a specific network in the request.
In this case, the payment route is predetermined, and a deposit address is generated immediately.
If multiple coins or networks are allowed, these fields will be returned as null, and the customer must select the payment method on the payment terminal via payment_link.
{
type: string, // Payment type PayIn/PayOut
uuid: string, // Unique identifier in our system
order_id: string, // Your order ID sent during creation
user_id: string, // Unique user identifier
lifetime: number | null, // Validity period of the issued invoice (in seconds)
expires_at: number, // Unix timestamp for expiration date/time
amount: string, // Amount of the created order
currency: string, // Currency code
payment_link: string | null, // Link to the payment terminal
fact_amount: string | null, // Amount of actual execution of the order
accuracy_payment_percent: number// Allowable payment inaccuracy
address: string | null // Wallet address for payment
qr_code: string | null, // Wallet address QR code
from: string | null // The wallet address from which the payment was made
txid: string | null // Transaction hash
coins: string[] | null, // List of allowed coins for payment
except_coins: string[] | null, // List of excluded coins for payment
commission: string | null, // Amount taken as commission
is_test: boolean, // Whether the order is a test order
status: string, // Current order status
additional_data: string | null, // Extra info sent at order creation
convert: {
coin: string | null, // Cryptocurrency code for credited amount
network: string | null, // Blockchain network code
rate: string | null, // Conversion rate
course_source: string | null, // Service from which exchange rates are taken
},
extra: null, // Additional invoice information
created_at: string, // ISO-8601 order creation date/time
}
{
"data": null,
"error": {
"status": 400,
"name": "BadRequestError",
"message": "Bad request, Order already Exist",
"details": {}
}
}Last updated