Overview
The Merchant API defines the endpoints that merchants implement to accept payments via the Opencharge protocol. Payment apps and gateways call these endpoints on your server to create orders, check payment status, and notify you of completed payments.OpenAPI Specification
View the complete Merchant OpenAPI specification
Base URL
Host your Merchant API at the endpoint you register in the Router Registry:Endpoints you implement on your server
| Endpoint | Method | Description |
|---|---|---|
/metadata.json | GET | Your OCID metadata (public key, capabilities) |
/capabilities | GET | Partner-specific capabilities |
/orders/create | POST | Create and sign an order |
/orders/{orderId}/status | GET | Return order payment status |
/inventory | GET | Return available items |
/transfer/webhook | POST | Receive payment notifications |
Authentication
Requests to your endpoints include secp256k1 ECDSA signatures in these headers:| Header | Description | Example |
|---|---|---|
X-OC-ID | Caller’s OCID (Opencharge ID) | 200 |
X-OC-Timestamp | Unix timestamp in seconds | 1706500000 |
X-OC-Nonce | Unique request identifier | req_abc123 |
X-OC-Signature | Signature of canonical request | a1b2c3...1b |
/metadata.json endpoint. See Request Authentication for details.