These docs are for v1.7. Click to read the latest docs for v2.1.

Deferred Claims

Transfer your digital passports at scale.

Before you begin

As a brand, you wish to seamlessly onboard your users and provide the best claiming experience. On-chain transfers can take a while and new users are sometimes unfamiliar with these transfer standards.

This feature allows your users to get a confirmation of the incoming ownership of their digital passport so that your app can provide the best context to your users about the pending status of the claims while waiting for the on-chain transaction to be completed. Our transaction manager takes care of the claiming requests with a queuing system.

Deferred claim API allows the Wallet app users to call the request ownership API and triggers a transfer. The api/deferred/transfer API will also make the claiming status check.

Example of use case: Your brand has an event that involves massive digital passport claims in a short period. To avoid blockchain latency, your users can get a confirmation for an upcoming digital passport ownership.

💡

When a user claims one digital passport of your pool, this token will be reserved for 15 minutes in the queue system and removed from the pool to secure the owner.

⚠️

To have a successful transfer:

  • Your NFT Management Platform must be the digital passport owner.
  • The digital passport passphrase must be the request key.
  • There must not be a pending transfer transaction for the digital passport.

Let's start 🚀

To transfer your digital passport, use the deferred/transfer.

📌

The API is authenticated with the user rights required → certCreate

curl --location --request POST 'https://{nmp-url}/deferred/transfer' \
--header 'x-api-key: 0353d359-c323-4772-82dd-bc4d84e87453' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tokenId": 650923746,
    "passphrase": "etdnswn7wp37",
    "address": "0x02e07cc7E01b1ca69C0a6de55BFD9B99A8F0aF3a"
}'
ParameterTypeMandatoryDescription
tokenIdNumberDigital passport identification number.
passphraseStringDigital passport passphrase.
addressStringThe wallet address of the digital passport.

Result: Find below the httpCode corresponding to your API call return and its value → nmp.back.deferredTransfer.[value].

httpCodeValueDescription
200successThe status is locally stored and the user is informed that the transfer has been taken into account. The token will be transferred to the target wallet.
400alreadyOwnerThe user is already the owner of the token.
400tokenNotFoundIncorrect token ID.
400issuerNotOwnerYou are not the issuer of the digital passport.
400passphraseNotRightIncorrect passphrase.
400errorFetchRequestKeyThe passphrase is not a request key.
400pendingThe digital passport has been already claimed and the transfer is pending.
500errorTransferAn error occurred during the transfer.
{
    "message": "Token can be transfered to address 0x02e07cc7E01b1ca69C0a6de55BFD9B99A8F0aF3a",
    "code": "nmp.back.deferredTransfer.tokenCanBeTransfered"
}
{ code: 'nmp.back.deferredTransfer.pending', description: 'Token tranfer is already pending'}

🚀

Our team tip

We recommend the Wallet app to save the status in local storage to display right information for users.