> For the complete documentation index, see [llms.txt](https://bify.gitbook.io/rwa-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bify.gitbook.io/rwa-docs/bify-commerce/api.md).

# Commerce API

The Commerce API is the service surface used by the BIFY SDK and browser component.

## Environments

| Environment | Network      |
| ----------- | ------------ |
| Sandbox     | Base Sepolia |
| Production  | Base mainnet |

Credentials and contract configuration are isolated between environments.

## Route groups

| Group                          | Purpose                                                          | Credential                                   |
| ------------------------------ | ---------------------------------------------------------------- | -------------------------------------------- |
| `/v1/checkout/sessions`        | Create and inspect partner-owned checkout sessions               | Partner API key                              |
| `/v1/public/checkout/sessions` | Load a session, save details, confirm payment, claim certificate | Short-lived client token                     |
| `/v1/orders`                   | Read settlement state and report fulfilment                      | Partner API key                              |
| `/v1/certificates`             | Retrieve and verify certificates                                 | Partner API key or public verification route |
| `/v1/rewards`                  | Create campaigns and process claims                              | Partner API key or claim credential          |
| `/v1/access-passes`            | Configure access entitlements                                    | Partner API key                              |
| `/v1/voting`                   | Create polls and manage status                                   | Partner API key                              |
| `/v1/identity/attest`          | Accept authenticated provider attestations                       | Signed attestation                           |

## Request rules

* Amounts are positive integer strings in USDC base units.
* Checkout creation requires a stable idempotency key.
* Partner prices and quantities are taken from the partner's trusted order snapshot, not from an untrusted browser request.
* Partner API keys are accepted only on server routes.
* Public routes are scoped to the session or claim credential.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://bify.gitbook.io/rwa-docs/bify-commerce/api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
