{
  "info": {
    "_postman_id": "141352a0-60af-487d-a9ff-2205cd1da828",
    "name": "Volume API",
    "description": "Hosted crypto checkout and invoices for businesses.\n\n**Setup**\n1. Sign up at https://paywithvolume.com/dashboard, open **Developers** and make a test key (`vk_test_…`).\n2. Open this collection's **Variables** tab and paste it into `apiKey`.\n3. Send **Payments → Create an invoice**.\n\nEvery request sends `Authorization: Bearer {{apiKey}}`. The key decides the mode, so the same `baseUrl` serves test mode and live money.\n\nRequests that create something send `Idempotency-Key: {{$guid}}`, a fresh value on every send. To see a retry return the original response, replace it with a fixed value.\n\nBuilt from https://docs.paywithvolume.com/openapi.json (v0.1.0). Guides and the full reference: https://docs.paywithvolume.com/docs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.paywithvolume.com",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "",
      "type": "string",
      "description": "A vk_test_ key for test mode, or vk_live_ for real money."
    }
  ],
  "item": [
    {
      "name": "Account",
      "description": "The merchant a login or API key acts for.",
      "item": [
        {
          "name": "The account",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/account",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "account"
              ]
            },
            "description": "The merchant a session or API key acts for, and its status."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Webhooks",
      "description": "Where Volume delivers a merchant's events, signed; see \"Webhooks\" above.",
      "item": [
        {
          "name": "List webhook endpoints",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints"
              ]
            },
            "description": "The endpoints registered in this mode, deleted ones aside, newest first."
          },
          "response": []
        },
        {
          "name": "Register a webhook endpoint",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints"
              ]
            },
            "description": "Registers the https URL that receives events in one mode, and returns its\nsigning secret this once. Deliveries are signed\n`Volume-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<body>\">`. A\nlive endpoint needs an active account. One registration per URL.\n\nWith an API key, in the key's mode: an integration can register its own\nendpoint when it deploys. Logged in, name the mode."
          },
          "response": []
        },
        {
          "name": "Delete a webhook endpoint",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints/:webhook_endpoint_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints",
                ":webhook_endpoint_id"
              ],
              "variable": [
                {
                  "key": "webhook_endpoint_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Nothing more is sent to it, and deliveries waiting to retry are cancelled.\nAnswers with the endpoint, its status `deleted`; it is not found after that."
          },
          "response": []
        },
        {
          "name": "Send a test event",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_endpoints/:webhook_endpoint_id/test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_endpoints",
                ":webhook_endpoint_id",
                "test"
              ],
              "variable": [
                {
                  "key": "webhook_endpoint_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Sends the endpoint a `webhook_endpoint.test` event, whatever it subscribes to,\nsigned and delivered like any other. The answer is the event; its delivery is\nqueued and follows within seconds."
          },
          "response": []
        },
        {
          "name": "List webhook deliveries",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/webhook_deliveries",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "webhook_deliveries"
              ],
              "query": [
                {
                  "key": "webhook_endpoint",
                  "value": "",
                  "description": "Only deliveries to this endpoint.",
                  "disabled": true
                },
                {
                  "key": "status",
                  "value": "pending",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "20",
                  "description": "How many to return, newest first.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` of the page before, for the page after it.",
                  "disabled": true
                }
              ]
            },
            "description": "Every event sent to the account's endpoints in this mode and how each endpoint\nanswered, newest first, to debug an integration."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Payments",
      "description": "Invoices, and the hosted checkouts that collect them.",
      "item": [
        {
          "name": "Create an invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Makes the request safe to retry: the same key replays the first response\ninstead of repeating the effect. At most 255 characters."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/invoices",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices"
              ]
            },
            "description": "A one-off USD invoice, in the mode of the API key. Open a checkout session for it\nto collect payment. At most $100,000.00. Lightning carries at most\n$1,000.00, so a checkout above that does not offer it."
          },
          "response": []
        },
        {
          "name": "Get an invoice",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/invoices/:invoice_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "invoices",
                ":invoice_id"
              ],
              "variable": [
                {
                  "key": "invoice_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "The invoice, its status, and every transfer that paid towards it."
          },
          "response": []
        },
        {
          "name": "List checkout sessions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/checkout_sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "checkout_sessions"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "open",
                  "description": "",
                  "disabled": true
                },
                {
                  "key": "limit",
                  "value": "20",
                  "description": "How many to return, newest first.",
                  "disabled": true
                },
                {
                  "key": "cursor",
                  "value": "",
                  "description": "The `next_cursor` of the page before, for the page after it.",
                  "disabled": true
                }
              ]
            },
            "description": "The account's checkouts, newest first. With an API key, those of its mode; when\nlogged in, name the mode."
          },
          "response": []
        },
        {
          "name": "Create a checkout session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Makes the request safe to retry: the same key replays the first response\ninstead of repeating the effect. At most 255 characters."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice_id\": \"\",\n  \"success_url\": \"\",\n  \"cancel_url\": \"\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/checkout_sessions",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "checkout_sessions"
              ]
            },
            "description": "A hosted checkout for an open invoice. Send the payer to its `url`\n(`paywithvolume.com/{id}`); it is open for 24 hours, and once the payer picks a\ncoin they have 30 minutes to pay. Return URLs must be https in live mode."
          },
          "response": []
        },
        {
          "name": "Get a checkout session",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/v1/checkout_sessions/:checkout_session_id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "checkout_sessions",
                ":checkout_session_id"
              ],
              "variable": [
                {
                  "key": "checkout_session_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Its status, the payer's choice of coin and network, and what has arrived. With\nan API key, in its mode; when logged in, name the mode."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Test helpers",
      "description": "Test mode only. Simulate what a payer does, for your own tests.",
      "item": [
        {
          "name": "Pay a test checkout by simulation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}",
                "description": "Makes the request safe to retry: the same key replays the first response\ninstead of repeating the effect. At most 255 characters."
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/v1/test_helpers/checkout_sessions/:checkout_session_id/pay",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "v1",
                "test_helpers",
                "checkout_sessions",
                ":checkout_session_id",
                "pay"
              ],
              "variable": [
                {
                  "key": "checkout_session_id",
                  "value": "",
                  "description": ""
                }
              ]
            },
            "description": "Test keys only. Once the payer has chosen a coin and network, a simulated\npayment arrives at the checkout's address at once and is accepted about ten\nseconds later, through the same path as a real one: the checkout's status,\n`payment.confirmed`, `invoice.paid` (with `invoice.overpaid` when over, or\n`invoice.underpaid` instead when short) and the merchant's balance all follow\nas they would live. `exact` sends what is still due, `short` a tenth less and\n`over` a tenth more, both past the tolerance (up to 1% or $0.50 short,\nwhichever is smaller, still counts as paid). A Lightning invoice is paid\nexactly only. No money moves. A live key is refused with `403 test_mode_only`."
          },
          "response": []
        }
      ]
    }
  ]
}
