{
  "info": {
    "name": "RMO Payments Network API",
    "description": "Processor / gateway integration kit for the RMO Payments Network. Pre-wired to the public sandbox tenant. Run requests top to bottom: verify credentials, authorize, capture, then explore reversals, payment codes, and webhooks. See https://www.rmous.org/network/developers/ for full docs.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "https://api.rmous.org", "type": "string" },
    { "key": "apiKey", "value": "pk_test_publicsandbox_2026", "type": "string" },
    { "key": "bearer", "value": "sk_test_publicsandbox_2026_anyone_can_use_this", "type": "string" },
    { "key": "panToken", "value": "TOKEN_FROM_TERMINAL", "type": "string" },
    { "key": "authorizationId", "value": "", "type": "string" },
    { "key": "paymentCode", "value": "", "type": "string" },
    { "key": "paymentPin", "value": "", "type": "string" }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{bearer}}", "type": "string" }]
  },
  "item": [
    {
      "name": "Verify credentials",
      "request": {
        "method": "GET",
        "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }],
        "url": { "raw": "{{baseUrl}}/v1/me", "host": ["{{baseUrl}}"], "path": ["v1", "me"] },
        "description": "Confirms the API key + bearer are wired correctly. Returns the tenant identity. 401 = bad keys; 403 = API key not registered in API Gateway."
      }
    },
    {
      "name": "Authorize a card",
      "event": [
        {
          "listen": "test",
          "script": {
            "exec": [
              "var b = pm.response.json();",
              "if (b && b.authorizationId) {",
              "  pm.collectionVariables.set('authorizationId', b.authorizationId);",
              "}"
            ],
            "type": "text/javascript"
          }
        }
      ],
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-API-Key", "value": "{{apiKey}}" },
          { "key": "Idempotency-Key", "value": "{{$guid}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"panToken\": \"{{panToken}}\",\n  \"amount\": 12.99,\n  \"currency\": \"USD\",\n  \"channel\": \"POS\",\n  \"mcc\": \"5812\",\n  \"merchantNameRaw\": \"RMO Coffee Shop\",\n  \"mode\": \"01\"\n}"
        },
        "url": { "raw": "{{baseUrl}}/v1/authorizations", "host": ["{{baseUrl}}"], "path": ["v1", "authorizations"] },
        "description": "Submit an authorization with a 17-char pan token. On approval the test script stores authorizationId for the capture/reverse requests below."
      }
    },
    {
      "name": "Capture an authorization",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-API-Key", "value": "{{apiKey}}" },
          { "key": "Idempotency-Key", "value": "{{$guid}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": { "mode": "raw", "raw": "{}" },
        "url": {
          "raw": "{{baseUrl}}/v1/authorizations/{{authorizationId}}/capture",
          "host": ["{{baseUrl}}"],
          "path": ["v1", "authorizations", "{{authorizationId}}", "capture"]
        },
        "description": "Capture the held authorization. Empty body captures the full remaining hold; send {\"amount\": n} for a partial capture."
      }
    },
    {
      "name": "Reverse an authorization",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-API-Key", "value": "{{apiKey}}" },
          { "key": "Idempotency-Key", "value": "{{$guid}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": { "mode": "raw", "raw": "{}" },
        "url": {
          "raw": "{{baseUrl}}/v1/authorizations/{{authorizationId}}/reverse",
          "host": ["{{baseUrl}}"],
          "path": ["v1", "authorizations", "{{authorizationId}}", "reverse"]
        },
        "description": "Reverse an uncaptured authorization and release the hold. Send {\"amount\": n} for a partial reversal."
      }
    },
    {
      "name": "Increment an authorization",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-API-Key", "value": "{{apiKey}}" },
          { "key": "Idempotency-Key", "value": "{{$guid}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": { "mode": "raw", "raw": "{\n  \"amount\": 5.00\n}" },
        "url": {
          "raw": "{{baseUrl}}/v1/authorizations/{{authorizationId}}/increment",
          "host": ["{{baseUrl}}"],
          "path": ["v1", "authorizations", "{{authorizationId}}", "increment"]
        },
        "description": "Raise the held amount on an open authorization."
      }
    },
    {
      "name": "Redeem a payment code",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-API-Key", "value": "{{apiKey}}" },
          { "key": "Idempotency-Key", "value": "{{$guid}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"code\": \"{{paymentCode}}\",\n  \"pin\": \"{{paymentPin}}\",\n  \"amount\": 24.50,\n  \"currency\": \"USD\",\n  \"merchantNameRaw\": \"RMO Coffee Shop\"\n}"
        },
        "url": { "raw": "{{baseUrl}}/v1/payment-codes/redeem", "host": ["{{baseUrl}}"], "path": ["v1", "payment-codes", "redeem"] },
        "description": "Redeem a member-generated 10-char code + 7-char PIN against an amount. For no-card-present sales."
      }
    },
    {
      "name": "Create a webhook subscription",
      "request": {
        "method": "POST",
        "header": [
          { "key": "X-API-Key", "value": "{{apiKey}}" },
          { "key": "Idempotency-Key", "value": "{{$guid}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"url\": \"https://your-app.example.com/webhooks/rmo\",\n  \"events\": [\"authorization.approved\", \"authorization.captured\"],\n  \"description\": \"Processor certification receiver\"\n}"
        },
        "url": { "raw": "{{baseUrl}}/v1/webhook-subscriptions", "host": ["{{baseUrl}}"], "path": ["v1", "webhook-subscriptions"] },
        "description": "Register a webhook endpoint. The signing secret is returned ONCE in the response - persist it. Verify X-RMO-Signature + X-RMO-Timestamp on every delivered event."
      }
    },
    {
      "name": "List webhook subscriptions",
      "request": {
        "method": "GET",
        "header": [{ "key": "X-API-Key", "value": "{{apiKey}}" }],
        "url": { "raw": "{{baseUrl}}/v1/webhook-subscriptions", "host": ["{{baseUrl}}"], "path": ["v1", "webhook-subscriptions"] },
        "description": "List the webhook subscriptions registered for this tenant."
      }
    }
  ]
}
