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.
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.
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.
Let's start ๐
URL
To transfer your digital passport, use the deferred/transfer
.
POST - https://{{nmpUrl}}/deferred/transfer
The API is authenticated with the user rights required โ
certCreate
Body
Field | Type | Required | Description |
---|---|---|---|
tokenId | Number | โ | Digital passport identification number. |
passphrase | String | โ | Digital passport passphrase. |
address | String | โ | The wallet address of the digital passport. |
{
"tokenId": 650923746,
"passphrase": "etdnswn7wp37",
"address": "0x02e07cc7E01b1ca69C0a6de55BFD9B99A8F0aF3a"
}
Return Payload
Field | Code | Description |
---|---|---|
message | nmp.back.deferredTransfer.tokenCanBeTransfered | Token can be transferred to address address . |
{
"message": "Token can be transfered to address 0x02e07cc7E01b1ca69C0a6de55BFD9B99A8F0aF3a",
"code": "nmp.back.deferredTransfer.tokenCanBeTransfered"
}
Errors
Status Code | Code | Message |
---|---|---|
400 | nmp.back.deferredTransfer.alreadyOwner | The user is already the owner of the token. |
400 | nmp.back.deferredTransfer.tokenNotFound | Incorrect token ID. |
400 | nmp.back.deferredTransfer.issuerNotOwner | You are not the issuer of the digital passport. |
400 | nmp.back.deferredTransfer.passphraseNotRight | Incorrect passphrase. |
400 | nmp.back.deferredTransfer.errorFetchRequestKey | The passphrase is not a request key. |
400 | nmp.back.deferredTransfer.pending | Token transfer is already pending. |
500 | nmp.back.deferredTransfer.errorTransfer | An error occurred during the transfer. |
{ 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.
Updated about 1 year ago