RE:VIVE
If you wish to use RE:VIVE before its official release, please reach out to contact@redreamer.io to request early access as the product is currently under development.
Welcome to the RE:VIVE - Redeem as Settlement section of the API documentation. The RE:DREAMER API documentation below outlines the essential steps to enable your end-users to utilize NFTs as settlement in your web store.
NFT Redemption as Settlement
Redemption process:
Select "NFT Redemption" as your preferred settlement method at checkout.
The shop will initiate a request to create an RE:VIVE order.
You will be redirected to the RE:DREAMER website.
On the RE:DREAMER website, connect your wallet.
A list of available NFTs for the order will be displayed.
Choose an NFT to redeem.
RE:DREAMER will redirect you back to the shop after the redemption process is complete.
Prerequisite
To make use of RE:VIVE, a redemption protocol smart contract called RE:ALM is required. You will need to pass the address of your RE:ALM smart contract as realm_address
in the request body parameter to create an order. Please contact our team at contact@redreamer.io to obtain the realm_address
.
STEP 1: Create an Order
To initiate an order for the product that the end-user wishes to redeem, send a POST request to the following endpoint:
Create an Order
POST
/api/v1/revive/:network/orders
Create an order for the product that the end-user wishes to redeem.
Path Parameters
Name | Type | Description |
---|---|---|
network* | String | Unique identifier of the network. Please refer to the "Network" section located on the "General" page for more information. |
Headers
Name | Type | Description |
---|---|---|
x-api-key* | String | API key. |
Request Body
Name | Type | Description |
---|---|---|
contract_addresses* | Array of String | A list of eligible NFT smart contract addresses that can be used for settlement. |
realm_address* | String | The address of the redemption protocol smart contract that is specifically created for the redemption operator. |
redirect_link* | String | A URL that the end-user will be directed to after the redemption process is complete and has been broadcasted to the blockchain network. |
item_url* | String | A URL of the image of the item that the end-user wishes to redeem. |
item_name* | String | The name of the item that the end-user wishes to redeem. |
custom_id* | String | The unique identifier of the order, as provided by the shop owner. |
To obtain details about a created order, issue a GET request to the specified endpoint:
Retrieve Order Details
GET
/api/v1/revive/:network/orders/:uuid
Get detailed information about a created order.
Path Parameters
Name | Type | Description |
---|---|---|
network | String | Unique identifier of the network. Please refer to the "Network" section located on the "General" page for more information. |
uuid | String | The unique identifier of the order for which the information is being retrieved. |
STEP 2: List NFTs for an Order
To retrieve the list of NFTs eligible for redemption for a specific order, send a GET request to the following endpoint:
List NFTs for an Order
GET
/api/v1/revive/:network/nfts
Returns a list of eligible NFTs owned by the connected wallet for a specific order.
Path Parameters
Name | Type | Description |
---|---|---|
network* | String | Unique identifier of the network. Please refer to the "Network" section located on the "General" page for more information. |
Query Parameters
Name | Type | Description |
---|---|---|
order_uuid* | String | The unique identifier of the order for which the list of eligible NFTs is being retrieved. |
Headers
Name | Type | Description |
---|---|---|
Authorization* | String |
|
STEP 3: Use NFT as Settlement
To use the selected NFT as settlement, send a POST request to the following endpoint:
Use an NFT as settlement for specific order
POST
/api/v1/revive/:network/redemption
Settle an order by redeeming the selected NFT.
Path Parameters
Name | Type | Description |
---|---|---|
network* | String | Unique identifier of the network. Please refer to the "Network" section located on the "General" page for more information. |
Headers
Name | Type | Description |
---|---|---|
x-api-key* | String | API key. |
Request Body
Name | Type | Description |
---|---|---|
user_input_data* | JSON Object | Additional key-value pairs |
token_id* | Integer | Unique identifier for an NFT within a specific smart contract. |
realm_address* | String | The address of the redemption protocol smart contract that is specifically created for the redemption operator. |
redeemer_address* | String | The address of the user. |
order_uuid* | String | The unique identifier of the order for which the list of eligible RNFTs is being retrieved. |
contract_address* | String | The address of the smart contract for the selected NFT. |
custom_id* | String | The unique identifier of the order, as provided by the shop owner. |
Last updated