Create an offer
This endpoint facilitates the creation of an offer without actually charging the customer. It is useful when generating preliminary details of a transaction or payment operation.
After confirming the phone number or after user authorization, you will receive an access_token. You need to enter this access_token in the
Token
field
The offer is valid for 20 seconds. After this time, the offer becomes invalid, and to create a new offer, you need to request its creation again
This endpoint is accessible for
KYC_0
level and higher
The body parameters
To obtain the cardId
, you can use the endpoint GET /v3/payin/data. This endpoint retrieves the necessary cardId
for your operation.
Request Sample: cURL
At the time of sending the request, the curl command should be as follows:
curl --request POST \
--url https://api.vault.sandbox.testessential.net/v3/payin/offer \
--header 'accept: application/json' \
--header 'authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwNTFhYTc3Mi0yNDk4LTQ0ZTEtODdmYi0zYzNhZDdlMTY1ODgiLCJleHAiOjE3MTI0MDEyNzAsImlhdCI6MTcxMjMxNDg3MH0.356ErWoovqUUHCjmgnEcBXFs-uzL9oEQxJyTn8PhELQ' \
--header 'content-type: application/json' \
--data '
{
"cardId": "7",
"fromCurrency": "EUR",
"amount": 31,
"operation": "PAYIN",
"toCurrency": "USDC"
}
'
After entering the phone number and password into the respective fields, you need to click the Try It!
button.
This action initiates the process of sending data to the server and receiving a response from the API using the provided credentials.
Response Example
Successful execution of the request indicates that the operation was successful.
{
"offerId": 9417,
"expirationTime": "2024-04-05T11:10:58.732+00:00",
"validSeconds": 20,
"fromCurrency": "EUR",
"rate": {
"rate": 1.0558804418453542,
"currency": "EUR",
"commissionFix": 0,
"commissionPercentage": 0,
"minCrypto": 0,
"maxCrypto": 0
},
"feeInfo": [
{
"name": "Crypterium gas",
"value": 0.155,
"valueOld": 0.155,
"scale": 8,
"currency": "EUR"
},
{
"name": "Additional Fee",
"value": 0.155,
"valueOld": 0.155,
"scale": 8,
"currency": "EUR"
},
{
"name": "Transaction fee",
"value": 0.93,
"valueOld": 0.93,
"scale": 8,
"currency": "EUR"
}
],
"fees": {
"currency": "EUR",
"scale": 8,
"rate": 0.025,
"partnerFee": 0,
"crypteriumGas": 0.005,
"additionalFee": 0.005,
"transactionFee": 0.03,
"insuranceFee": null,
"feeTableEnabled": false,
"feeTable": null
}
}
To obtain additional information about the RESPONSE
, you need to click on the Headers
button.
This will allow you to view the server response headers and gain a more detailed understanding of the data returned in response to your request.
Updated 7 months ago