Buy Crypto - Pay by QR Code
https://cms.inr-exchange.rare-able.com/api/user/buy_crypto
POST
This endpoint allows an authenticated user to purchase cryptocurrency using fiat currency. The user must provide details such as the source currency, target currency, amount, exchange rate, and payment information (bank transfer details, payment method, and proof of payment). On success, the API returns complete transaction details, including currencies, amounts, exchange rates, commissions, service fees, and the current transaction status.
BODY PARAMS
from_value
string
required
To test in sandbox use:
100 → Transaction Success
200 → Transaction In Process / Pending
300 → Transaction Failed
100 → Transaction Success
200 → Transaction In Process / Pending
300 → Transaction Failed
from
string
required
to_value
string
required
to
string
required
initial_exchange_rate
string
required
method
string
required
Accepted values : FORWARD , REVERSE
payment_method
string
required
Accepted values : qr
payment_id
string
required
Use unique_id from Generate QR Code for payment_id
HEADERS
Accept "string"
application/json
x-api-key (Secret Key) "string"
To generate please use
Get Access Token
X-Api-Signature "string"
X-Api-Timestamp "Timestamp"
RESPONSES
success "boolean"
message "string"
code "integer"
data "object"
id "integer"
unique_id "string"
external_reference_id "string|null"
user_id "integer"
admin_bank_account_id "integer|null"
buy_direction "string"
from_amount "string"
from_currency "string"
to_amount "string"
to_currency "string"
initial_exchange_rate "string"
adjusted_exchange_rate "string"
payment_id "string"
payment_file "string|null"
payment_method "string"
ip_address "string"
cancel_reason "string|null"
status "integer"
approved_at "string|null"
created_at "string (datetime)"
updated_at "string (datetime)"
from_amount_formatted "string"
to_amount_formatted "string"
status_formatted "string"
executed_exchange_rate_formatted "string"
created_at_formatted "string"
updated_at_formatted "string"
success "boolean"
message "string"
code "integer"
data "object"