{
  "info": {
    "_postman_id": "67f42a19-4bd9-44c4-8a2a-7d55f23d21fb",
    "name": "Hilt Pay Public API",
    "description": "Official Postman collection for Hilt Pay Workspace and Hilt Pay API, including x402 V2 settlement, atomic metered usage, durable entitlements, native subscriptions, receipts, support, and webhooks.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Products",
      "item": [
        {
          "name": "Create product",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"product_type\": \"PAYMENT_LINK\",\n  \"title\": \"30-day Discord access\",\n  \"description\": \"One-off access period\",\n  \"amount_minor_units\": 29000000,\n  \"token_mint\": \"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\",\n  \"merchant_wallet\": \"{{merchantWallet}}\",\n  \"delivery_type\": \"DISCORD_INVITE\",\n  \"delivery_value\": \"https://discord.gg/example\",\n  \"membership_config\": {\n    \"enabled\": true,\n    \"platform\": \"DISCORD\",\n    \"identity_type\": \"DISCORD_USER_ID\",\n    \"renewal_mode\": \"ONE_OFF\",\n    \"billing_interval_days\": 30,\n    \"grace_period_days\": 3\n  }\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products"
              ]
            }
          }
        },
        {
          "name": "List products",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products"
              ]
            }
          }
        },
        {
          "name": "Create signed handoff link",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"identity_type\": \"TELEGRAM_USER_ID\",\n  \"identity_value\": \"728255790\",\n  \"identity_display\": \"@buyer\",\n  \"expires_in_minutes\": 30\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/products/{{productId}}/handoff-link",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "{{productId}}",
                "handoff-link"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Hosted checkout",
      "item": [
        {
          "name": "Read public checkout payload",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/v1/products/p/{{slug}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "p",
                "{{slug}}"
              ]
            }
          }
        },
        {
          "name": "Connect checkout session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payer_wallet\": \"{{payerWallet}}\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/products/p/{{slug}}/connect",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "products",
                "p",
                "{{slug}}",
                "connect"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Payments",
      "item": [
        {
          "name": "Read payment status",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/v1/payments/{{paymentId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "payments",
                "{{paymentId}}"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Hilt Pay API",
      "item": [
        {
          "name": "Agent bootstrap",
          "description": "Agent-first Hilt Pay API setup: create a sandbox setup intent, submit a manifest, receive a pricing recommendation, and wait for owner approval before live key issuance.",
          "item": [
            {
              "name": "Create agent setup intent",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"agent_name\": \"Acme API Builder\",\n  \"agent_platform\": \"cursor\",\n  \"requested_use_case\": \"Protect /ai/pro with Hilt Pay API\",\n  \"contact_email\": \"founder@acme.test\",\n  \"requested_permissions\": [\n    \"access:read\",\n    \"access:write\",\n    \"access:webhooks\"\n  ],\n  \"ttl_hours\": 24\n}"
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/access/agent-bootstrap",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "access",
                    "agent-bootstrap"
                  ]
                }
              }
            },
            {
              "name": "Submit agent setup manifest",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"setup_token\": \"{{setupToken}}\",\n  \"manifest\": {\n    \"app\": {\n      \"name\": \"Acme AI\",\n      \"external_app_id\": \"acme-ai\"\n    },\n    \"product\": {\n      \"external_product_id\": \"pro-api\",\n      \"title\": \"Pro API access\",\n      \"amount_minor_units\": 79000000,\n      \"default_rail\": \"solana_usdc\",\n      \"expected_monthly_payments\": 120,\n      \"expected_monthly_volume_usd\": 9480,\n      \"expected_monthly_webhook_events\": 500,\n      \"expected_monthly_entitlement_checks\": 12000,\n      \"billing_model\": \"recurring\",\n      \"renewal_mode\": \"solana_native_subscription\",\n      \"billing_interval_days\": 30,\n      \"cancel_at_period_end\": true\n    },\n    \"payment_protocol\": \"x402\",\n    \"settlement_rail\": \"solana_usdc\",\n    \"protected_resource\": {\n      \"url\": \"https://api.acme.test/ai/pro\",\n      \"method\": \"POST\",\n      \"customer_identity\": \"external_customer_id\"\n    },\n    \"webhook\": {\n      \"url\": \"https://api.acme.test/webhooks/hilt\",\n      \"subscribed_events\": [\n        \"access.entitlement.activated\",\n        \"payment.confirmed\"\n      ]\n    }\n  }\n}"
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/access/agent-bootstrap/{{setupIntentId}}/manifest",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "access",
                    "agent-bootstrap",
                    "{{setupIntentId}}",
                    "manifest"
                  ]
                }
              }
            },
            {
              "name": "Get agent setup status",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"setup_token\": \"{{setupToken}}\"\n}"
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/access/agent-bootstrap/{{setupIntentId}}/status",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "access",
                    "agent-bootstrap",
                    "{{setupIntentId}}",
                    "status"
                  ]
                }
              }
            },
            {
              "name": "Owner approves agent setup",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Authorization",
                    "value": "Bearer {{bearerToken}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"setup_token\": \"{{setupToken}}\",\n  \"approved_permissions\": [\n    \"access:read\",\n    \"access:write\",\n    \"access:webhooks\"\n  ],\n  \"issue_live_key\": true,\n  \"live_key_name\": \"Acme AI Hilt Pay API key\",\n  \"confirm_owner_approval\": true\n}"
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/access/agent-bootstrap/{{setupIntentId}}/approve",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "access",
                    "agent-bootstrap",
                    "{{setupIntentId}}",
                    "approve"
                  ]
                }
              }
            }
          ]
        },
        {
          "name": "List Pay API rails",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/access/rails",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "rails"
              ]
            }
          }
        },
        {
          "name": "Create Pay API app",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "postman-pay-api-app-001",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Pro AI API\",\n  \"external_app_id\": \"pro-ai-api\",\n  \"default_rail\": \"solana_usdc\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/apps",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "apps"
              ]
            }
          }
        },
        {
          "name": "Create Pay API product",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "postman-pay-api-product-001",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"access_app_id\": \"{{payApiAppId}}\",\n  \"external_product_id\": \"pro-ai-api\",\n  \"title\": \"Pro AI API - Monthly\",\n  \"amount_minor_units\": 25000000,\n  \"merchant_wallet\": \"{{merchantWallet}}\",\n  \"entitlement_duration_days\": 30,\n  \"default_rail\": \"solana_usdc\",\n  \"status\": \"paused\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "products"
              ]
            }
          }
        },
        {
          "name": "Create native SOL Pay API product",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "postman-pay-api-sol-product-001",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"access_app_id\": \"{{payApiAppId}}\",\n  \"external_product_id\": \"native-sol-api-access\",\n  \"title\": \"Native SOL API access\",\n  \"amount_minor_units\": 50000000,\n  \"merchant_wallet\": \"{{merchantWallet}}\",\n  \"entitlement_duration_days\": 30,\n  \"billing_model\": \"one_off\",\n  \"default_rail\": \"solana_sol\",\n  \"allowed_rails\": [\"solana_sol\"],\n  \"status\": \"active\",\n  \"live_mode_confirmed\": true\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "products"
              ]
            }
          }
        },
        {
          "name": "Create x402 USDC Pay API payment session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "payment-{{payApiRequestId}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_product_id\": \"{{payApiExternalProductId}}\",\n  \"external_customer_id\": \"{{payApiExternalCustomerId}}\",\n  \"rail\": \"solana_usdc\",\n  \"payment_protocol\": \"x402\",\n  \"settlement_rail\": \"solana_usdc\",\n  \"metadata\": {\n    \"resource\": \"https://api.example.com/research\",\n    \"description\": \"One metered request\",\n    \"mime_type\": \"application/json\"\n  }\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/payment-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "payment-sessions"
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('payment session created', () => pm.expect(pm.response.code).to.be.oneOf([200, 201]));",
                  "const body = pm.response.json();",
                  "const session = body.payment_session || {};",
                  "if (session.id) pm.environment.set('payApiPaymentSessionId', session.id);",
                  "const required = (((session.payment_requirement || {}).headers || {})['PAYMENT-REQUIRED']);",
                  "if (required) pm.environment.set('payApiPaymentRequired', required);"
                ]
              }
            }
          ]
        },
        {
          "name": "Create native SOL hosted payment session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "native-sol-payment-{{payApiRequestId}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_product_id\": \"native-sol-api-access\",\n  \"external_customer_id\": \"{{payApiExternalCustomerId}}\",\n  \"rail\": \"solana_sol\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/payment-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "payment-sessions"
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('native SOL hosted session created', () => pm.expect(pm.response.code).to.be.oneOf([200, 201]));",
                  "const body = pm.response.json();",
                  "const session = body.payment_session || {};",
                  "pm.expect(session.rail).to.eql('solana_sol');",
                  "pm.expect(session.checkout_url).to.be.a('string').and.not.empty;"
                ]
              }
            }
          ]
        },
        {
          "name": "MPP metered payment channels",
          "item": [
            {
              "name": "Create metered session",
              "request": {
                "method": "POST",
                "header": [
                  {"key": "X-Hilt-Key", "value": "{{apiKey}}", "type": "text"},
                  {"key": "Idempotency-Key", "value": "mpp-session-{{payApiRequestId}}", "type": "text"},
                  {"key": "Content-Type", "value": "application/json", "type": "text"}
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"external_product_id\": \"{{payApiExternalProductId}}\",\n  \"external_customer_id\": \"{{payApiExternalCustomerId}}\",\n  \"cap_minor_units\": 5000000,\n  \"expires_in_seconds\": 3600\n}"
                },
                "url": {"raw": "{{baseUrl}}/v1/access/metered-sessions", "host": ["{{baseUrl}}"], "path": ["v1", "access", "metered-sessions"]}
              },
              "event": [{
                "listen": "test",
                "script": {"type": "text/javascript", "exec": [
                  "pm.test('metered session created', () => pm.expect(pm.response.code).to.eql(201));",
                  "const body = pm.response.json();",
                  "pm.environment.set('mppSessionId', body.metered_session.id);",
                  "pm.environment.set('mppChallenge', body.challenge);"
                ]}
              }]
            },
            {
              "name": "Authorize channel action",
              "request": {
                "method": "POST",
                "header": [{"key": "Authorization", "value": "{{mppAuthorization}}", "type": "text"}],
                "url": {"raw": "{{baseUrl}}/v1/access/metered-sessions/{{mppSessionId}}/authorize", "host": ["{{baseUrl}}"], "path": ["v1", "access", "metered-sessions", "{{mppSessionId}}", "authorize"]}
              }
            },
            {
              "name": "Reserve metered delivery",
              "request": {
                "method": "POST",
                "header": [
                  {"key": "X-Hilt-Key", "value": "{{apiKey}}", "type": "text"},
                  {"key": "Idempotency-Key", "value": "{{mppDeliveryId}}", "type": "text"},
                  {"key": "Content-Type", "value": "application/json", "type": "text"}
                ],
                "body": {"mode": "raw", "raw": "{\n  \"units\": 1,\n  \"delivery_id\": \"{{mppDeliveryId}}\",\n  \"ttl_seconds\": 300\n}"},
                "url": {"raw": "{{baseUrl}}/v1/access/metered-sessions/{{mppSessionId}}/deliveries", "host": ["{{baseUrl}}"], "path": ["v1", "access", "metered-sessions", "{{mppSessionId}}", "deliveries"]}
              }
            },
            {
              "name": "Commit metered delivery",
              "request": {
                "method": "POST",
                "header": [{"key": "Content-Type", "value": "application/json", "type": "text"}],
                "body": {"mode": "raw", "raw": "{\n  \"deliveryId\": \"{{mppDeliveryId}}\",\n  \"voucher\": {\n    \"voucher\": {\n      \"channelId\": \"{{mppChannelId}}\",\n      \"cumulativeAmount\": \"{{mppCumulativeAmount}}\",\n      \"expiresAt\": {{mppVoucherExpiresAt}}\n    },\n    \"signer\": \"{{mppVoucherSigner}}\",\n    \"signature\": \"{{mppVoucherSignature}}\",\n    \"signatureType\": \"ed25519\"\n  }\n}"},
                "url": {"raw": "{{baseUrl}}/v1/access/metered-sessions/{{mppSessionId}}/commits", "host": ["{{baseUrl}}"], "path": ["v1", "access", "metered-sessions", "{{mppSessionId}}", "commits"]}
              }
            },
            {
              "name": "Read metered session evidence",
              "request": {
                "method": "GET",
                "header": [{"key": "X-Hilt-Key", "value": "{{apiKey}}", "type": "text"}],
                "url": {"raw": "{{baseUrl}}/v1/access/metered-sessions/{{mppSessionId}}", "host": ["{{baseUrl}}"], "path": ["v1", "access", "metered-sessions", "{{mppSessionId}}"]}
              }
            },
            {
              "name": "Settle metered session",
              "request": {
                "method": "POST",
                "header": [
                  {"key": "X-Hilt-Key", "value": "{{apiKey}}", "type": "text"},
                  {"key": "Idempotency-Key", "value": "settle-{{mppSessionId}}", "type": "text"}
                ],
                "url": {"raw": "{{baseUrl}}/v1/access/metered-sessions/{{mppSessionId}}/settle", "host": ["{{baseUrl}}"], "path": ["v1", "access", "metered-sessions", "{{mppSessionId}}", "settle"]}
              }
            }
          ]
        },
        {
          "name": "Create Pay API sandbox payment session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{sandboxApiKey}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "postman-pay-api-sandbox-session-001",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_product_id\": \"pro-ai-api\",\n  \"external_customer_id\": \"cust_123\",\n  \"rail\": \"solana_usdc\",\n  \"confirm_sandbox_mode\": true\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/sandbox/payment-sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "sandbox",
                "payment-sessions"
              ]
            }
          }
        },
        {
          "name": "Confirm Pay API sandbox payment session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{sandboxApiKey}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "postman-pay-api-sandbox-confirm-001",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"proof\": \"hilt_sandbox_v1...\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/sandbox/payment-sessions/{{sandboxSessionId}}/confirm",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "sandbox",
                "payment-sessions",
                "{{sandboxSessionId}}",
                "confirm"
              ]
            }
          }
        },
        {
          "name": "Settle x402 V2 payment",
          "description": "Run this after a buyer client signs the advertised Solana USDC terms and places the resulting x402 V2 payload in payApiPaymentSignature.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "settle-{{payApiRequestId}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payment_session_id\": \"{{payApiPaymentSessionId}}\",\n  \"payment_signature\": \"{{payApiPaymentSignature}}\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/x402/settle",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "x402",
                "settle"
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('x402 V2 settlement succeeded', () => pm.expect(pm.response.code).to.be.oneOf([200, 201]));",
                  "const body = pm.response.json();",
                  "pm.expect(body.x402Version).to.eql(2);",
                  "const paymentResponse = pm.response.headers.get('PAYMENT-RESPONSE') || ((body.headers || {})['PAYMENT-RESPONSE']);",
                  "if (paymentResponse) pm.environment.set('payApiPaymentResponse', paymentResponse);"
                ]
              }
            }
          ]
        },
        {
          "name": "Consume metered entitlement",
          "description": "Atomic runtime authority for one billable request. Use one stable request id and idempotency key for each logical operation.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Idempotency-Key",
                "value": "consume-{{payApiRequestId}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_product_id\": \"{{payApiExternalProductId}}\",\n  \"external_customer_id\": \"{{payApiExternalCustomerId}}\",\n  \"units\": 1,\n  \"metadata\": {\n    \"request_id\": \"{{payApiRequestId}}\"\n  }\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/entitlements/consume",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "entitlements",
                "consume"
              ]
            }
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('one usage unit consumed', () => {",
                  "  pm.expect(pm.response.code).to.be.oneOf([200, 201]);",
                  "  pm.expect(pm.response.json().consumed).to.eql(true);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "Check durable Pay API entitlement",
          "description": "Use for durable or time-based access display and planning. Atomic consumption is the authority for metered requests.",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"external_product_id\": \"{{payApiExternalProductId}}\",\n  \"rail\": \"solana_usdc\",\n  \"external_customer_id\": \"{{payApiExternalCustomerId}}\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/access/entitlements/check",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "access",
                "entitlements",
                "check"
              ]
            }
          }
        },
        {
          "name": "Native subscriptions",
          "description": "Read native Solana USDC subscription state and create period-aware cancellation flows for recurring Hilt Pay API products.",
          "item": [
            {
              "name": "Read native subscription",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "X-Hilt-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{baseUrl}}/v1/access/native-subscriptions/{{nativeSubscriptionAuthorizationId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "access",
                    "native-subscriptions",
                    "{{nativeSubscriptionAuthorizationId}}"
                  ]
                }
              }
            },
            {
              "name": "Create native subscription cancellation intent",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Hilt-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reason\": \"buyer_requested\",\n  \"cancel_at_period_end\": true\n}"
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/access/native-subscriptions/{{nativeSubscriptionAuthorizationId}}/cancel-intent",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "access",
                    "native-subscriptions",
                    "{{nativeSubscriptionAuthorizationId}}",
                    "cancel-intent"
                  ]
                }
              }
            },
            {
              "name": "Confirm native subscription cancellation",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "X-Hilt-Key",
                    "value": "{{apiKey}}",
                    "type": "text"
                  },
                  {
                    "key": "Idempotency-Key",
                    "value": "native-cancel-{{nativeSubscriptionAuthorizationId}}-001",
                    "type": "text"
                  },
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"cancel_tx_signature\": \"SOLANA_CANCEL_TRANSACTION_SIGNATURE\",\n  \"reason\": \"buyer_requested\",\n  \"immediate_revoke\": false,\n  \"verify_onchain\": true\n}"
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/access/native-subscriptions/{{nativeSubscriptionAuthorizationId}}/cancel-confirm",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "access",
                    "native-subscriptions",
                    "{{nativeSubscriptionAuthorizationId}}",
                    "cancel-confirm"
                  ]
                }
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Memberships",
      "item": [
        {
          "name": "List memberships",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/memberships?limit=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "memberships"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            }
          }
        },
        {
          "name": "Renewal intelligence",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/memberships/renewal-intelligence?window_days=14&limit=25",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "memberships",
                "renewal-intelligence"
              ],
              "query": [
                {
                  "key": "window_days",
                  "value": "14"
                },
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            }
          }
        },
        {
          "name": "Retry delivery",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/memberships/{{membershipId}}/retry-delivery",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "memberships",
                "{{membershipId}}",
                "retry-delivery"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Receipts",
      "item": [
        {
          "name": "List receipts",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/receipts?page=1&per_page=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "receipts"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "per_page",
                  "value": "20"
                }
              ]
            }
          }
        },
        {
          "name": "Read public receipt proof",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{baseUrl}}/v1/receipt/{{receiptId}}/public",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "receipt",
                "{{receiptId}}",
                "public"
              ]
            }
          }
        },
        {
          "name": "Send proof link",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"buyer@example.com\",\n  \"note\": \"Your receipt and proof link\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/receipt/{{receiptId}}/send-proof",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "receipt",
                "{{receiptId}}",
                "send-proof"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Support",
      "item": [
        {
          "name": "Create support ticket",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Hilt-Key",
                "value": "{{apiKey}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"subject\": \"Buyer needs help\",\n  \"category\": \"OTHER\",\n  \"body\": \"Payment confirmed, but the buyer still needs a manual handoff.\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/support/tickets",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "support",
                "tickets"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "List webhook endpoints",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{bearerToken}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "endpoints"
              ]
            }
          }
        },
        {
          "name": "Create webhook endpoint",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{bearerToken}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"Primary webhook\",\n  \"url\": \"https://example.com/hilt/webhook\",\n  \"subscribed_events\": [\"payment.confirmed\", \"payment.failed\", \"receipt.created\"],\n  \"product_ids\": []\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "endpoints"
              ]
            }
          }
        },
        {
          "name": "Send test event",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{bearerToken}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"event_type\": \"payment.confirmed\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/endpoints/{{endpointId}}/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "endpoints",
                "{{endpointId}}",
                "test"
              ]
            }
          }
        },
        {
          "name": "List deliveries",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{bearerToken}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/deliveries?page=1&per_page=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "deliveries"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "per_page",
                  "value": "20"
                }
              ]
            }
          }
        },
        {
          "name": "Replay delivery",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{bearerToken}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/v1/webhooks/deliveries/{{deliveryId}}/replay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhooks",
                "deliveries",
                "{{deliveryId}}",
                "replay"
              ]
            }
          }
        }
      ]
    }
  ]
}
