v2
You are reading v1 & v2. v1 and v2 are deprecated. They keep working and are still supported, but new integrations should use v3.

Confirm a crypto to fiat quote

Sell

POST/api/v1/sell/confirm

Send two credentials: your own, and the customer's.

How authentication works
Either
Authorization: BearerorUser-Authorization: Bearer

Language

Environment

Credentials

Your credential, or the customer's

Choose an environment first.

cURL request
curl -X POST https://api.btcdirect.eu/api/v1/sell/confirm \  -H "Authorization: Bearer $BTCD_PARTNER_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "callbackUrl": "https://www.example.com/payment-completed",    "partnerOrderIdentifier": "4ea2b5e9-a413-4359-a8f6-9263ae8a0ee7",    "quote": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJlbmNyeXB0ZWQiOiJ0b2tlbiJ9.gj80-9FPf_Wl7CGg2eDEFHokoEVtXIT7l4F88ztgxnhGIuhjOrhZ6xZLT3vuJPKXam_jQskm1PuM7T0OQdawDw",    "bankAccount": "NL37BUNQ2025406444",    "accountIdentifier": "NL37BUNQ2025406444"  }'
Choose an environment to run this.

Response

Returns an address to send the cryptocurrency to.
{  "orderId": 1234,  "walletAddress": "3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5",  "destinationTag": {    "default": "ABC1234",    "XRP": 12341  },  "orderExpireTime": "2020-09-25T12:43:25Z",  "transactionFee": 0.55}

Request

callbackUrlstring

After the order is finished, we will send a request to this url.

Examplehttps://www.example.com/payment-completed

partnerOrderIdentifierstring

Unique identifier provided by the partner.

Example4ea2b5e9-a413-4359-a8f6-9263ae8a0ee7

quotestringrequired

The quote generated by the sell/quote endpoint.

ExampleeyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJlbmNyeXB0ZWQiOiJ0b2tlbiJ9.gj80-9FPf_Wl7CGg2eDEFHokoEVtXIT7l4F88ztgxnhGIuhjOrhZ6xZLT3vuJPKXam_jQskm1PuM7T0OQdawDw

bankAccountstring

The IBAN account number to which to send the payment to. DEPRECATED: Use `accountIdentifier` instead.

ExampleNL37BUNQ2025406444

accountIdentifierstring

The account identifier to which to send the payment to. For example an IBAN, depending on the payment method used.

ExampleNL37BUNQ2025406444

Responses

200Returns an address to send the cryptocurrency to.
400A list of possible errors for this endpoint.

Body of the success response

orderIdintegerrequired

The order id.

walletAddressstringrequired

The address of the wallet to send the crypto's to.

Example3FZbgi29cpjq2GjdwV8eyHuJJnkLtktZc5

destinationTagstring|integer

The destination tag which should be used to send the coins. This depends on the coin type and can be a string or an integer. For XRP it is an integer, for other coins it is a string.

orderExpireTimestring

The date and time upto which the user can send the coins, afterwards the received amount will be paid out.

Example2020-09-25T12:43:25Z

transactionFeenumber

The transaction fee that will be subtracted from the estimated payout

Every failure answers with a message and a code. Switch on the code — messages are written for people and can change.