Webhooks

As part of the Payments product we provide a webhooks feature, allowing you to receive a success event after a payment have been finalized on our side.

To setup the webhook you will have to:

  1. Contact us with the request to enable the webhook(s).

  2. Prepare a wehbook HTTP REST endpoint on your backend.

  3. Make sure its accessible for us.

The webhook then will be sent as a POST request with the following JSON body structure:

{
  nftId: "10", // < Your NFT ID (or Token ID)
  blockchainId: "polygon",
  status: "success", // Or `failure`
  price: 1006.18, // Price in `currency` cents charged from the end user
  currency: "usd",
  tokenAmount: 1, // should be 1 for NFT
  transactionHash: "0x3766ae4.....17387d",
  customerName: null,
  requestId: "4e131be2-5932-4519-bfc3-a55e0ab8c2da", // Tweed's internal reqId for tracing
  settlementInfo: { type: "ERC20", amount: "958.0", symbol: "USDC" }, // Your settlement details
  destinationWallet: "0xD9F27...90C5b",
  customData: {
    ... // An object of any custom data *you* have passed to the `BuyWithFiat` function call in the frontend.
  }
}

Last updated