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:

  1. Select "NFT Redemption" as your preferred settlement method at checkout.

  2. The shop will initiate a request to create an RE:VIVE order.

  3. You will be redirected to the RE:DREAMER website.

  4. On the RE:DREAMER website, connect your wallet.

  5. A list of available NFTs for the order will be displayed.

  6. Choose an NFT to redeem.

  7. 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

Headers

Request Body

{
    "uuid": String,
    "network": String,
    "contract_addresses": [
        String
    ],
    "realm_address": String,
    "custom_id": String,
    "item_name": String,
    "item_url": String,
    "redirect_link": String,
    "created_at": "2023-03-27T04:10:33.608518518Z"
}

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

{
    "uuid": String,
    "network": String,
    "contract_addresses": [
        String
    ],
    "realm_address": String,
    "custom_id": String,
    "item_name": String,
    "item_url": String,
    "redirect_link": String,
    "created_at": "0001-01-01T00:00:00Z"
}

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

Query Parameters

Headers

{
    "data": [
        {
            "id": String,
            "uuid": String,
            "network": String,
            "contract_address": String,
            "token_id": Integer,
            "is_valid": Boolean,
            "is_redeemable": Boolean,
            "created_at": "0001-01-01T00:00:00Z",
            "updated_at": "0001-01-01T00:00:00Z",
            "deleted_at": "0001-01-01T00:00:00Z",
            "name": String,
            "description": String,
            "image": String,
            "external_url": String,
            "animation_url": String,
            "attributes": []
        }
    ]
}

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

Headers

Request Body

{
    "uuid": String,
    "order_uuid": String,
    "network": String,
    "contract_address": String,
    "token_id": Integer,
    "status": "redeemed",
    "redeemer_address": String,
    "user_input_data": {
        "additionalProp1": {}
    },
    "created_at": "2023-03-24T09:55:34.664463Z",
    "updated_at": "2023-03-24T09:55:34.664463Z"
}

Last updated