External fiat deposit with exchange by fixed rate and send crypto to external Address

This endpoint is a combination of two other endpoints in one operation - v2/exchange/external/deposit-with-exchange and v2/withdraw/crypto.
This allows you to exchange euros paid using a bank card for crypto and simultaneously (without calling a separate endpoint) withdraw the received cryptocurrency to the specified crypto address.

For the endpoint, the conditions of execution are valid, which are valid for separately taken endpoints of deposit with exchange and withdrawal.

So, before making a request to v2/exchange/external/buy-to-send-crypto, you must send a request to receive rateId to /v2/rate/freeze. This request allows you to "freeze" the exchange rate for a certain (defined by the settings) time.

At the same time, in order to receive a freeze rate as part of this type of transaction, it is required to specify the depositPaymentCode AND also withdrawPaymentCode, since a deposit by card and withdraw to crypto address is used.

The payment methods, in addition to determining the cost of the exchange operation, also contains a list of required fields (fields) asked by the provider (for deposit) and by the blockchain (for withdraw) to ensure the successful execution of the payment.
Therefore, when performing a freeze rate (/v2/rate/freeze), it is enough to specify only the depositPaymentCode and withdrawPaymentCode, but when performing an exchange operation (/v2/exchange/external/buy-to-send-crypto), you need to specify the depositPaymentCode and withdrawPaymentCode together with the fields for this payment methods.

The list of fields and their parameters are returned together with the payment method as a response to the request at /v2/exchange/external/pre-request.

Provided that all data for creating an invoice have been correctly transmitted, a link to the payment of this invoice or bearerToken (for payment without payment link) will be returned in metadata.invoice object the response to the request to /v2/exchange/external/buy-to-send-crypto. The operation will be continued only after the client pays the invoice, after which the stage of exchanging fiat currency for crypto will begin.

After the exchange and a successful AML check, the received cryptocurrency will be withdrawn to a crypto address, provided that the data is correct and sufficient for such a withdrawal (correct crypto address, memo sign, etc.).

Deposit with exchange can acquire the following statuses:

  • Created - operation created;
  • Processing - operation in processing;
  • OnHold - the operation is blocked (for example, for checking AML);
  • Declined - the operation is rejected;
  • Completed - the operation is successful.

To provide information about the status of the operation, a callback service is implemented. The link for receiving callbacks should be provided in the request to /v2/exchange/external/buy-to-send-crypto.

The duration of execution of that type of operation depends on the speed of execution of its separated parts -speed of fiat deposit, speed of fiat to crypto exchange and speed of crypto withdrawal. Execution of a crypto withdrawal depends on many factors, but the main one is the speed of processing such withdrawal by the blockchain network. In most cases, this is a few minutes, but sometimes the processing time can take much longer. Part of exchange fiat to crypto is instant.

Information about the amount of operation fees will be indicated along with other operation details.

Language
Authorization
URL
Click Try It! to start a request and see the response here!