QuickBuy Callback

Overview

The body of this request contains details about the requested exchange and the captured payment once the exchange has been agreed.

Completed fiat payment callback

The body of this request contains details about the requested exchange and the captured payment once the exchange has been agreed.

Key details:

  • transactionReference is our reference for the transaction, for use in correspondence.

  • status is currently always SUCCESS as this callback currently only occurs for captured payments. In future other status codes may be added.

  • The requestDetails object contains:

    • client signature and user reference used to initiate the widget,

    • user selected asset, currency, and payment amount,

    • the estimate displayed to the user of the amount of crypto asset to purchase, and

    • other details about the widget instantiation like the timestamp and IP address.

  • The transactionDetails object contains:

    • payment card details;

    • payment capture date;

    • confirmation of the amount charged to the user's card;

    • confirmation of the fee charged - the amount used to buy the crypto will be the charged amount less this fee;

    • the amount of the crypto asset to be purchased (note that there are several transactions to make before this reaches the nominated external wallet, and some fees may be incurred);

    • an estimated value in the selected fiat currency of this crypto amount; and

    • other details such as the card payment processor.

  • The content type of the body is application/json.

Callback Example

{
  "TransactionReference": "QBWE1001",
  "Status": "SUCCESS",
  "RequestDetails": {
    "UserReference": "TestWidgetUser1",
    "ClientSignature": "lafsao7y4v5q847yrjerocq32yroaerq398", 
    "CryptoAssetCode": "USDC",
    "FiatCurrencyCode": "USD",
    "FiatCurrencyAmount": 50,
    "CryptoAssetAmount": 49.95,
    "RequestDate": "2022-02-18T14:30:59.52",
    "RequestIp": "51.141.9.231"
  },
  "TransactionDetails": {
    "StatementDescriptor": null,
    "PaymentProcessor": "Processor 1", 
    "CryptoAssetGrossAmount": 47, 
    "CryptoAssetEstimatedFiatValue": 47.5, 
    "FiatCurrencyChargedAmount": 50, 
    "FiatCurrencyFeeAmount": 2.5, 
    "PaymentCaptureDate": "2022-02-18T14:31:59.577", 
    "PaymentCardLast4Digits": "1111"
  } 
}

We will include a signing header with this request (see below).


Completed Cryptocurrency deposit callback

The body of this request contains details about transaction which deposits the cryptocurrency into the customers wallet.

Key details:

  • transactionReference is our reference for the transaction, for use in correspondence.

  • status is currently always SUCCESS as this callback currently only occurs for captured payments. In future other status codes may be added.

  • The requestDetails object contains:

    • client signature and user reference used to initiate the widget,

    • user selected asset, currency, and payment amount,

    • the estimate displayed to the user of the amount of crypto asset to purchase, and

    • other details about the widget instantiation like the timestamp and IP address.

  • The transactionDetails object contains:

    • payment card details;

    • payment capture date;

    • confirmation of the amount charged to the user's card;

    • confirmation of the fee charged - the amount used to buy the crypto will be the

    • charged amount less this fee;

    • the amount of the crypto asset to be purchased (note that there are several transactions to make before this reaches the nominated external wallet, and some fees may be incurred);

    • an estimated value in the selected fiat currency of this crypto amount;

    • the transaction hash; and

    • other details such as the card payment processor.

  • The content type of the body is application/json.

Completed cryptocurrency deposit callback body

{
  "TransactionReference": "QBWE1001",
  "Status": "SUCCESS",
  "RequestDetails": {
  "UserReference": "TestWidgetUser1",
  "ClientSignature": "lafsao7y4v5q847yrjerocq32yroaerq398", 
  "CryptoAssetCode": "USDC",
  "FiatCurrencyCode": "USD",
  "FiatCurrencyAmount": 50,
  "CryptoAssetAmount": 49.95,
  "RequestDate": "2022-02-18T14:30:59.52",
  "RequestIp": "51.141.9.231"
  },
  "TransactionDetails": {
    "StatementDescriptor": null,
    "PaymentProcessor": "Processor 1",
    "CryptoAssetGrossAmount": 47,
    "CryptoAssetEstimatedFiatValue": 47.5,
    "FiatCurrencyChargedAmount": 50,
    "FiatCurrencyFeeAmount": 2.5,
    "PaymentCaptureDate": "2022-02-18T14:31:59.577",
    "PaymentCardLast4Digits": "1111",
    "TransactionHash": "0x9ec48ce0653cc7b2bcaa463a92b3191ddee5275d897854f2d210d2b298828d00"
    } 
}

We will include a signing header with this request (see below).


Callback Signing

In order for you to authenticate a call to your payment capture webhook we will sign it using the shared secret provided to you. To generate the signing header we:

  • Append the shared secret (in UTF8 encoding) to the bytes of the request body.

  • Perform a SHA256 hash on the result

  • Provide the hash value in the QuickBuy-Signature header for the callback (encoded as a base64 string).

Note: This only applies to the payment capture callback, we currently do not sign the initial authentication callback.

Last updated