Validate
Last updated
Last updated
Ownership validation enables the developer to check if the purchaser is holding an NFT from a specified collection. The transaction will fail if the purchaser does not have the NFT and succeed if they do.
Developer specifies an NFT collection or an SPL mint address for an SFT as the verification target. mtnAPI uses the index API to query all the NFTs and SFTs in the user's wallet.
mtnAPI verifies whether an NFT belongs to a collection or an SFT belongs to a specific SPL token address.
If mtnAPI validates the above, there is a program with instruction included in the transaction that verifies NFT or SFT collection on-chain to provide a trusted solution.
Let's use a concert as an example where NFTs and SFTs could be used and how they would be different.
For SFTs, assume the user holds an SFT granting them general admission to the event. mtnAPI would verify that the user has the specified SPL address of the SFT and verify it on the blockchain. In the case of NFTs, assume the user holds an NFT that includes a specific row and seat number. The verification process is similar, with the only difference being validating the user is holding an NFT of a specific collection.
POST
https://api.mtnapi.com/validate
Name | Type | Description |
---|---|---|
GET
https://api.mtnapi.com/validate
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
amount*
String
The payment amount in USDC.
wallet*
String
The public key (wallet address) of the merchant being paid.
devMode
String
Set to TRUE to enable dev mode, otherwise set to FALSE. Dev mode will enable error codes to be sent back for transaction failures.
The default value is set to FALSE.
decimal
String
Set to TRUE to enable human-readable values (i.e USDC, SOL, etc...), or set to FALSE to use SPL base unit quantity (i.e lamport).
The default is set to TRUE.
inputType
String
The token (ticker symbol) provided by the customer as payment and is accepted by the merchant.
The default value is set to SOL.
collection*
String
The public key of NFT collection.
discount*
String
The discount applied to the payment. Discount is specified in percentages (i.e 20% should be specified as 0.20)
account*
String
The public key of the payer's wallet.
amount*
String
The payment amount in USDC.
wallet*
String
The public key (wallet address) of the merchant being paid.
devMode
String
Set to TRUE to enable dev mode, otherwise set to FALSE. Dev mode will enable error codes to be sent back for transaction failures.
The default value is set to FALSE.
cluster
String
Specify Solana devnet or mainnet cluster.
The default value is set to MAINNET.
decimal
String
Set to TRUE to enable human-readable values (i.e USDC, SOL, etc...), or set to FALSE to use SPL base unit quantity (i.e lamport).
The default is set to TRUE
inputType
String
The token (ticker symbol) provided by the customer as payment. If the input parameter is specified, the output parameter must also be specified.
The default value is set to SOL.
collection*
String
The pubkey of nft collection.
discount*
String
The discount applied to the payment. Discount is specified in percentages (i.e 20% should be specified as 0.20)
account*
String
The public key of the payer's wallet.