NFT Checkout
List of events
order.created
This event is sent by default to all the newly generated orders
order.onramp.processing
When the user has completed the fiat payment or at least declared that they have initiated it
order.onramp.failure
When Nivapay fails to detect the fiat payment, or could not convert the fiat to virtual asset, then it fails
order.onramp.success
User’s fiat is received, converting to virtual asset and credited to user’s wallet
order.smartcontract.processing
When virtual asset funds are being used to execute the smart contract
order.smartcontract.success
When the smart contract execution is successfully completed and confirmed on blockchain
order.smartcontract.failure
When the smart contract execution could not happen due to any reason, then it fails
order.success
This additional webhook event will be sent to represent the overall success of the journey
user.widget.open
Whenever the front-end screen is accessed by the user for the first time, this event is dispatched. In case multiple such events are received for a particular order, only the first one should be considered as the truth.
user.widget.close
Whenever user closes the front-end screen this event is sent. This event’s dispatch cannot be guaranteed and will be shared on a best-efforts basis. Due to certain technical constraints, it is difficult to detect closure of a front-end screen.
Context structure for event order.created
orderId
Order ID generated by Nivapay
userRef
Internal ID provided by the merchant for its user during order creation
merchantOrderRef
Internal ID provided by the merchant for this order
fiatSymbol
Symbol of the fiat currency which will be converted to crypto to invoke the SC function
fiatPaymentMethod
Payment method via which fiat currency will be paid
fiatAmount
Fiat amount required to be paid to fulfil this order
smartContractFunctionId
ID of the SC function being called
Context structure for events order.onramp.processing and order.onramp.success
orderId
Order ID generated by Nivapay
userRef
Internal ID provided by the merchant for its user during order creation
merchantOrderRef
Internal ID provided by the merchant for this order
fiatSymbol
Symbol of the fiat currency which will be converted to virtual asset
fiatAmount
Fiat amount which will be converted to virtual asset
onrampCryptoSymbol
Symbol of the virtual asset
onrampCryptoNetwork
Blockchain network on which this virtual asset exists
onrampCryptoContractAddress
Contract address if this virtual asset is a token (ERC20, BEP20, ERC721, etc.)
onrampCryptoAmount
Virtual asset amount expected to be received (order.onramp.processing) OR received (order.onramp.success). This will be null in case of order.onramp.failure. This is the final amount received in the user’s wallet in Nivapay’s custody.
status
PROCESSING or COMPLETED
status_reason
Additional information, if available, on the status
Context structure for events order.onramp.failure
orderId
Order ID generated by Nivapay
userRef
Internal ID provided by the merchant for its user during order creation
merchantOrderRef
Internal ID provided by the merchant for this order
fiatSymbol
Symbol of the fiat currency which will be converted to virtual asset
fiatAmount
Fiat amount which will be converted to virtual asset
onrampCryptoSymbol
Symbol of the virtual asset
onrampCryptoNetwork
Blockchain network on which this virtual asset exists
onrampCryptoContractAddress
Contract address if this virtual asset is a token (ERC20, BEP20, ERC721, etc.)
onrampCryptoAmount
Virtual asset amount expected to be received (order.onramp.processing) OR received (order.onramp.success). This will be null in case of order.onramp.failure. This is the final amount received in the user’s wallet in Nivapay’s custody.
status
One among the following:
CANCELLED: Payment cancelled by the user
EXPIRED: User didn't pay within the expiry time
FAILED: Payment method not supported, payment failed, card declined, etc.
REFUNDED: Payment received & refunded because order cannot be fulfilled
status_reason
Reason for the above status
Context structure for event order.smartcontract.processing
orderId
Order ID generated by Nivapay
userRef
Internal ID provided by the merchant for its user during order creation
merchantOrderRef
Internal ID provided by the merchant for this order
smartContractFunctionId
ID of the SC function being called
tokenSymbol
If the SC function issues a token, then its symbol
tokenContractAddress
If the SC function issues a token, then its contract address
countOfTokens
If the SC function issues a token, then the amount / count of tokens being issued
Context structure for event order.smartcontract.failure
orderId
Order ID generated by Nivapay
userRef
Internal ID provided by the merchant for its user during order creation
merchantOrderRef
Internal ID provided by the merchant for this order
smartContractFunctionId
ID of the SC function being called
transactionHash
Hash of the transaction in which smart contract was executed (if exists)
transactionHashUrl
Block explorer URL corresponding to this txn hash (if exists)
message
Message (if available) describing the reason for transaction failure
Context structure for event order.smartcontract.success
orderId
Order ID generated by Nivapay
userRef
Internal ID provided by the merchant for its user during order creation
merchantOrderRef
Internal ID provided by the merchant for this order
smartContractFunctionId
ID of the SC function being called
tokenSymbol
If the SC function issues a token, then its symbol
tokenContractAddress
If the SC function issues a token, then its contract address
countOfTokens
If the SC function issues a token, then the amount / count of tokens being issued
transactionHash
Hash of the transaction in which smart contract was executed
transactionHashUrl
Block explorer URL corresponding to this txn hash
Context structure for events order.success
orderId
Order ID generated by Nivapay
userRef
Internal ID provided by the merchant for its user during order creation
merchantOrderRef
Internal ID provided by the merchant for this order
fiatSymbol
Symbol of the fiat currency which was converted to crypto to invoke the SC function
fiatPaymentMethod
Payment method via which fiat currency was paid
fiatAmount
Fiat amount paid to fulfil this order
smartContractFunctionId
ID of the SC function being called
transactionHash
Hash of the transaction in which smart contract was executed
transactionHashUrl
Block explorer URL corresponding to this txn hash
Context structure for event user.widget.open and user.widget.close
orderId
Order ID generated by Nivapay
userRef
Internal ID provided by the merchant for its user during order creation
merchantOrderRef
Internal ID provided by the merchant for this order
Last updated
Was this helpful?