W3Block Docs
  • 🚀Start here
    • Welcome to the Docs
    • Integrated Blockchains
  • 👨‍💻Dev Docs
    • API
      • Getting Started
      • Authentication
      • Commerce API services
        • Company Administration
          • Companies (Admin)
          • Assets (Admin)
          • Tags (Admin)
          • Products (Admin)
            • Order Rules (Admin)
          • Orders (Admin)
          • Faq (Admin)
          • Webhooks (Admin)
        • Products
        • Orders
        • Webhooks
        • Faq
        • Globals
      • Key API Services
        • Authentication
        • Companies
        • Tokens
          • Contracts
            • External Contacts
            • Royalty Eligible
          • Categories
            • Subcategories
          • Token Collections
            • Token Editions
          • Metadata
        • Blockchain
        • Cloudinary
        • Integration
          • Ecommerce
            • Associate Tokens
            • Hooks
        • Users
        • Vouchers
  • 📘Knowledge Base
    • First Steps
    • FAQ
    • Glossary
Powered by GitBook
On this page
  • Glossary
  • How to instantiate Commerce SDK
  • Services available inside commerce API:
  1. Dev Docs
  2. API

Commerce API services

This section explains more about commerce api services and what could be done with it

PreviousAuthenticationNextCompany Administration

Last updated 2 years ago

Commerce services includes all kind of services about sales ecosystem based on NFT tokens. Above we can see the services which commerce is integrated

Some examples of what can be done using commerce service:

  • Sell NFTs created using key services

  • Integrate with FIAT payment gateways to receive payments about your token sale

  • Add rules to sell tokens only for specific users or to exclusive users that owns some other collection token

Commerce also have a lightweight front-end that can be easier used by companies to start selling NFT products without any kind of extra development.

Some minor layout customisations can be made into this lightweight front-end inside commerce dashboard.

Glossary

  • Product: is a collection of tokens that can be sold into your commerce service. It can have a set of tokens or just one token. Products can have a unique price or prices by each token.

  • Product Token: is a NFT token that could be sold inside some product collection. All of tokens must be in the same NFT contract address.

  • Currency: Is a currency that can be used to purchase some product. It can be a FIAT or Crypto currency.

  • Order: is the order made to purchase some product token. When some person create an order request, it will lock the NFT token for some minutes (default=10minutes). User will have this time to complete the purchase, i.e, execute the payment, before the order is automatically cancelled.

  • Tag: is a kind of label that can be attached to some product. It can be used to filter products inside the front-end app.

How to instantiate Commerce SDK

import { W3blockIdSDK } from '@w3block/sdk-id';
import { W3blockCommerceSDK } from '@w3block/sdk-commerce';

const idSdk = new W3blockIdSDK({
    baseURL: 'https://api-id.pixway.io',
    autoRefresh: true,
});

// Authenticate using idSdk with your credentials
// example: idSdk.authenticate({email: ..., password: ..., tenantId: ...})

const sdk = new W3blockCommerceSDK({
    idSdk,
    baseUrl: 'https://commerce.pixway.io'
});

Services available inside commerce API:

To instantiate , you must create the ID SDK before and pass it as argument into the commerce SDK instantiation. Because of this accomplishment, you don't need to worry about the authentication layer using commerce SDK. The ID SDK will do this job for you and send the credentials to each request if you're authenticated - specially if autoRefresh is set as true.

👨‍💻
commerce SDK

Products

Orders

FAQ

Globals

Company

Administration

Webhooks

Commerce service connections/infra architecture