NFT Transactions and Custody

With the introduction of banq 5.0, Integrators and end-users are now able to custody NFTs within their banq accounts. Let's review the workflow and steps to providing this functionality for your clients:

  1. Create a payment link for the end-user for a particular NFT
POST {{baseUrl}}/v1/payments/get-paid-link

{
    "destination": {
        "banqGuid": "{{banqGuid}}"
    },
    "funds": 20,
    "frequency": "once",
    "startDate": null,
    "endDate": null,
    "comment": "order description",
    "externalOrderCode": "# form other system"
}
  1. Monitor for completion of the payment (webhook). There will be a transaction object created for the payment that will provide the details you need (source banqGuid will let you know who receives the NFT, status should be completed on the transaction object).
GET {{baseUrl}}/v1/transactions/{{transaction-guid}}

{
            "id": 57685,
            "guid": "d27ea680-e10a-42c8-a13b-98ef88685813",
            "type": "pay",
            "flowType": "default",
            "moveType": "internal",
            "paymentGuid": "91ef503f-45a6-48fb-8997-31526987739d",
            "externalOrderCode": "ExternalOrder 123456",
            "recurrence": {
                "frequency": "once",
                "startDate": "2021-09-22T00:00:00"
            },
            "source": {
                "userId": "3faddd51-7b64-41a1-a39f-92990bf180ca",
                "type": "banq",
                "accountType": "personal",
                "accountId": 14808,
                "banq": {
                    "id": 15995,
                    "banqGuid": "c14cd3a1-7702-464c-a930-bcf73bc2c714",
                    "custodialNumber": 420074505315,
                    "banqName": "tipjar",
                    "transactionName": "TylerTipJar"
              ...
  1. Mint the NFT into your merchant account (wallet address to be provided).

🚧

Update your Webhook Config!!

This new functionality delivers values via webhooks. To streamline your process as much as possible, be sure to update your webhook config to include new NFT and Linking webhooks.

PATCH /api/v1/account-spaces/{accountSpaceId}/webhook-config
The schema can be found here: https://api.banq.com/core/index.html

  1. Move the NFT from the merchant banq account to end-user banq account (using the source banqGuid from the completed transaction).
POST {{baseUrl}}/v1/nft-transactions

{
    "tokenId": "token Id",
    "contractAddress": "сontract address",
    "sourceBanq": "{{sourceBanqGuid}}", //Your merchant account
    "destinationBanq": "{{banqGuid}}",  //Your customer's account from the transaction
    "amount": 1
}
47564756