Skip to main content
GET
/
metadata.json
Get OCID metadata
curl --request GET \
  --url https://kyc.provider.example/opencharge/metadata.json
{
  "opencharge": "0.1",
  "name": "TrustVerify KYC",
  "profile": "Global KYC verification provider",
  "icon": "https://kyc.provider.example/icon.png",
  "config": {
    "publicKey": "a34b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b",
    "endpoint": "https://kyc.provider.example/opencharge",
    "capabilities": [
      "kyc.grant",
      "kyc.validate",
      "kyc.data"
    ]
  },
  "kyc": [],
  "signature": "a1b2c3d4e5f6...7f1b",
  "contact": "support@kycprovider.example"
}
This endpoint is public and does not require authentication. Other services fetch this to discover how to interact with your merchant and verify your signatures.

Implementation

Host this endpoint at the URL you register in the Router Registry smart contract. The response tells other services:
  • Your public key - Used to verify signatures on orders you create
  • Your endpoint URL - Where to send API requests
  • Your capabilities - Which endpoints you support
  • Settlement preferences - Which currencies and settlement providers you accept
  • KYC providers - Supported auto KYC providers that service accepts

Example Response

{
  "opencharge": "0.1",
  "name": "Coffee Shop",
  "profile": "Local coffee shop accepting Opencharge payments",
  "icon": "https://merchant.example/icon.png",
  "config": {
    "publicKey": "a34b5c6d7e8f9a0b...",
    "endpoint": "https://api.merchant.example/opencharge",
    "capabilities": [
      "orders.create",
      "orders.status",
      "transfer.webhook"
    ],
    "settlement": {
      "currencies": ["USD"],
      "accepts": [100, 101, 102]
    }
  },
  "kyc": [540, 737, 2836]
  "signature": "a1b2c3d4e5f6...7f1b",
  "contact": "support@merchant.example"
}
The signature field contains your secp256k1 signature of the canonicalized config object. This proves the configuration was set by the holder of your private key.

Response

200 - application/json

OCID metadata document

opencharge
string
required
name
string
required
config
object
required
signature
string
required
profile
string
icon
string<uri>
kyc
integer[]

Supported auto KYC providers that service accepts

contact
string