# Commerce API services

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

<figure><img src="/files/ZaCffpa7EAzU4hmrr2cL" alt=""><figcaption><p>Commerce service connections/infra architecture</p></figcaption></figure>

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.

{% hint style="info" %}
*Some minor layout customisations can be made into this lightweight front-end inside commerce dashboard.*
{% endhint %}

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

To instantiate [commerce SDK](https://www.npmjs.com/package/@w3block/sdk-commerce), 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.

```typescript
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:

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td>             Products</td><td></td><td><a href="/pages/A5AyAUdtukvhx3Q64l2U">/pages/A5AyAUdtukvhx3Q64l2U</a></td></tr><tr><td></td><td>                 Orders</td><td></td><td><a href="/pages/oyuW6oAIobC8g3cset8z">/pages/oyuW6oAIobC8g3cset8z</a></td></tr><tr><td></td><td>                  FAQ</td><td></td><td><a href="/pages/nC7bEuyppOMJUjFuikpo">/pages/nC7bEuyppOMJUjFuikpo</a></td></tr><tr><td></td><td>              Globals</td><td></td><td><a href="/pages/phy43npUAwLkt8VVMCuQ">/pages/phy43npUAwLkt8VVMCuQ</a></td></tr><tr><td></td><td><p>              Company              </p><p>          Administration</p></td><td></td><td><a href="/pages/egaFBwC4lUKNHBJqHr0P">/pages/egaFBwC4lUKNHBJqHr0P</a></td></tr><tr><td></td><td>               Webhooks</td><td></td><td><a href="/pages/W6os6bzYAOkD7WnMWnjj">/pages/W6os6bzYAOkD7WnMWnjj</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://w3block.gitbook.io/w3block-eng/dev-docs/api/commerce-api-services.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
