{
  "info": {
    "name": "SET Direct Deposit API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Every /api/partner call SET Docs documents, and the recipe folders. Set setPartnerKey to a sandbox partner key (https://simpleeasytransactions.com/docs/overview/sandbox-key); baseUrl is staging. Guide: https://simpleeasytransactions.com/docs/collections/postman"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://wallet-staging.simpleeasytransactions.com"
    },
    {
      "key": "setPartnerKey",
      "value": ""
    },
    {
      "key": "chain",
      "value": "base"
    },
    {
      "key": "netUsd",
      "value": "100.00"
    },
    {
      "key": "address",
      "value": ""
    },
    {
      "key": "reference",
      "value": ""
    },
    {
      "key": "safeAddress",
      "value": ""
    },
    {
      "key": "email1",
      "value": ""
    },
    {
      "key": "amount1",
      "value": "40.00"
    },
    {
      "key": "reference1",
      "value": ""
    },
    {
      "key": "email2",
      "value": ""
    },
    {
      "key": "amount2",
      "value": "60.00"
    },
    {
      "key": "reference2",
      "value": ""
    },
    {
      "key": "email",
      "value": ""
    },
    {
      "key": "amountUsdc",
      "value": "25.00"
    }
  ],
  "item": [
    {
      "name": "Recipe: Exact-net payout",
      "description": "Pay a payee's bank an exact amount, once per reference: ask for the amount to send, reserve it under your reference, send, set the reference, and get payout_intent.paid.\n\nSet these collection variables first: chain, netUsd, address, reference. Each request keeps what the next one needs.\n\n1. (staging) A stand-in payee's Cash-Out Address (staging only)\n2. The amount to send so the bank receives netUsd\n3. Check the address takes that amount\n4. Reserve the payout under your reference\n5. Send amountUsdc USDC to the address (outside SET: Send exactly amountUsdc USDC on chain to address, from a wallet you registered (GET /api/partner/senders). Set txHash to the transaction hash. On staging: A simulated payout to the address.)\n6. Set your reference on the payment\n7. The intent is paid\n8. (staging) The bank leg: payment_submitted (staging only)\n9. (staging) The bank leg: payment_processed (staging only)\n10. payout_intent.paid\n\nGuide: https://simpleeasytransactions.com/docs/direct-deposit/exact-net-payout",
      "item": [
        {
          "name": "(staging) A stand-in payee's Cash-Out Address",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"(staging) A stand-in payee's Cash-Out Address: HTTP 201\", () => pm.expect([201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "if (pick(answer, \"address\") != null) pm.collectionVariables.set(\"address\", String(pick(answer, \"address\")));",
                  "pm.test(\"acceptsPayouts is true\", () => pm.expect([true]).to.include(pick(answer, \"acceptsPayouts\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/cash_out_addresses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "cash_out_addresses"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"chain\": \"{{chain}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Staging only: SET's simulated stand-in. Production has no such call."
          }
        },
        {
          "name": "The amount to send so the bank receives netUsd",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"The amount to send so the bank receives netUsd: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "if (pick(answer, \"amountUsdc\") != null) pm.collectionVariables.set(\"amountUsdc\", String(pick(answer, \"amountUsdc\")));",
                  "if (pick(answer, \"partnerShareUsd\") != null) pm.collectionVariables.set(\"partnerShareUsd\", String(pick(answer, \"partnerShareUsd\")));",
                  "pm.test(\"belowMinimum is false\", () => pm.expect([false]).to.include(pick(answer, \"belowMinimum\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/quote?netUsd={{netUsd}}&chain={{chain}}&address={{address}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "quote"
              ],
              "query": [
                {
                  "key": "netUsd",
                  "value": "{{netUsd}}"
                },
                {
                  "key": "chain",
                  "value": "{{chain}}"
                },
                {
                  "key": "address",
                  "value": "{{address}}"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Check the address takes that amount",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Check the address takes that amount: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "pm.test(\"acceptsPayouts is true\", () => pm.expect([true]).to.include(pick(answer, \"acceptsPayouts\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/address?chain={{chain}}&address={{address}}&amountUsdc={{amountUsdc}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "address"
              ],
              "query": [
                {
                  "key": "chain",
                  "value": "{{chain}}"
                },
                {
                  "key": "address",
                  "value": "{{address}}"
                },
                {
                  "key": "amountUsdc",
                  "value": "{{amountUsdc}}"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Reserve the payout under your reference",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Reserve the payout under your reference: HTTP 201\", () => pm.expect([201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "if (pick(answer, \"id\") != null) pm.collectionVariables.set(\"intentId\", String(pick(answer, \"id\")));",
                  "pm.test(\"state is open\", () => pm.expect([\"open\"]).to.include(pick(answer, \"state\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payout_intents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payout_intents"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"{{reference}}\",\n  \"amountUsdc\": \"{{amountUsdc}}\",\n  \"chain\": \"{{chain}}\",\n  \"address\": \"{{address}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": ""
          }
        },
        {
          "name": "(staging) A simulated payout to the address",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"(staging) A simulated payout to the address: HTTP 201\", () => pm.expect([201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "if (pick(answer, \"id\") != null) pm.collectionVariables.set(\"payoutId\", String(pick(answer, \"id\")));",
                  "if (pick(answer, \"depositTxHash\") != null) pm.collectionVariables.set(\"txHash\", String(pick(answer, \"depositTxHash\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payouts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payouts"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"chain\": \"{{chain}}\",\n  \"address\": \"{{address}}\",\n  \"amount\": \"{{amountUsdc}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Staging only: SET's simulated stand-in. Production has no such call."
          }
        },
        {
          "name": "Set your reference on the payment",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Set your reference on the payment: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/references",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "references"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"chain\": \"{{chain}}\",\n  \"txHash\": \"{{txHash}}\",\n  \"to\": \"{{address}}\",\n  \"reference\": \"{{reference}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": ""
          }
        },
        {
          "name": "The intent is paid",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"The intent is paid: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "pm.test(\"state is paid\", () => pm.expect([\"paid\"]).to.include(pick(answer, \"state\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payout_intents/{{intentId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payout_intents",
                "{{intentId}}"
              ],
              "query": []
            },
            "description": ""
          }
        },
        {
          "name": "(staging) The bank leg: payment_submitted",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"(staging) The bank leg: payment_submitted: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payouts/{{payoutId}}/advance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payouts",
                "{{payoutId}}",
                "advance"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Staging only: SET's simulated stand-in. Production has no such call."
          }
        },
        {
          "name": "(staging) The bank leg: payment_processed",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"(staging) The bank leg: payment_processed: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "pm.test(\"paid is true\", () => pm.expect([true]).to.include(pick(answer, \"paid\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payouts/{{payoutId}}/advance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payouts",
                "{{payoutId}}",
                "advance"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Staging only: SET's simulated stand-in. Production has no such call."
          }
        },
        {
          "name": "payout_intent.paid",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"payout_intent.paid: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "pm.test(\"data.0.type is payout_intent.paid\", () => pm.expect([\"payout_intent.paid\"]).to.include(pick(answer, \"data.0.type\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/events?type=payout_intent.paid&limit=10",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "events"
              ],
              "query": [
                {
                  "key": "type",
                  "value": "payout_intent.paid"
                },
                {
                  "key": "limit",
                  "value": "10"
                }
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Recipe: Payout Safe",
      "description": "Pay from a Safe the platform owns, funded from its exchange account: register the Safe once by EIP-1271, resolve a batch, export it for the Safe Transaction Builder, sign once, report the multisend.\n\nSet these collection variables first: chain, safeAddress, email1, amount1, reference1, email2, amount2, reference2. Each request keeps what the next one needs.\n\n1. (staging) A throwaway wallet stands in for the Safe (staging only, done by scripts/recipes.mjs; set safeAddress to your Safe instead)\n2. The text for the Safe to sign\n3. Sign the text with the Safe (outside SET: In the Safe app, sign `message` as an off-chain message with the Safe's owners (its threshold), within an hour of issuedAt. Set signature to the Safe's signature. On staging: The throwaway wallet signs the text, done by scripts/recipes.mjs, not in this folder.)\n4. Register the Safe as a sender wallet\n5. Resolve the batch\n6. The Safe Transaction Builder file\n7. Sign and execute the batch in the Safe (outside SET: Fund the Safe with USDC from your exchange account. In the Safe app, open Transaction Builder, load the file, then sign and execute it with the owners. Set txHash to the executed transaction's hash. On staging: A simulated multisend paying the batch.)\n8. Report the multisend\n9. The batch, with each payment\n10. payable_payment.in_wallet\n\nGuide: https://simpleeasytransactions.com/docs/direct-deposit/payout-safe",
      "item": [
        {
          "name": "The text for the Safe to sign",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"The text for the Safe to sign: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "if (pick(answer, \"message\") != null) pm.collectionVariables.set(\"message\", String(pick(answer, \"message\")));",
                  "if (pick(answer, \"issuedAt\") != null) pm.collectionVariables.set(\"issuedAt\", String(pick(answer, \"issuedAt\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/senders/message?chain={{chain}}&address={{safeAddress}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "senders",
                "message"
              ],
              "query": [
                {
                  "key": "chain",
                  "value": "{{chain}}"
                },
                {
                  "key": "address",
                  "value": "{{safeAddress}}"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "Register the Safe as a sender wallet",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Register the Safe as a sender wallet: HTTP 200 or 201\", () => pm.expect([200,201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "pm.test(\"proof is eip1271\", () => pm.expect([\"eip1271\"]).to.include(pick(answer, \"proof\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/senders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "senders"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"chain\": \"{{chain}}\",\n  \"address\": \"{{safeAddress}}\",\n  \"issuedAt\": \"{{issuedAt}}\",\n  \"signature\": \"{{signature}}\",\n  \"label\": \"Payout Safe\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": ""
          }
        },
        {
          "name": "Resolve the batch",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Resolve the batch: HTTP 201\", () => pm.expect([201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "if (pick(answer, \"id\") != null) pm.collectionVariables.set(\"batchId\", String(pick(answer, \"id\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees",
                "batch"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"chain\": \"{{chain}}\",\n  \"items\": [\n    {\n      \"email\": \"{{email1}}\",\n      \"amount\": \"{{amount1}}\",\n      \"reference\": \"{{reference1}}\"\n    },\n    {\n      \"email\": \"{{email2}}\",\n      \"amount\": \"{{amount2}}\",\n      \"reference\": \"{{reference2}}\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": ""
          }
        },
        {
          "name": "The Safe Transaction Builder file",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"The Safe Transaction Builder file: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "pm.test(\"transactions.0.value is 0\", () => pm.expect([\"0\"]).to.include(pick(answer, \"transactions.0.value\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees/batch/{{batchId}}?format=safe",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees",
                "batch",
                "{{batchId}}"
              ],
              "query": [
                {
                  "key": "format",
                  "value": "safe"
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "(staging) A simulated multisend paying the batch",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"(staging) A simulated multisend paying the batch: HTTP 201\", () => pm.expect([201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "if (pick(answer, \"txHash\") != null) pm.collectionVariables.set(\"txHash\", String(pick(answer, \"txHash\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payments/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payments",
                "batch"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"batchId\": \"{{batchId}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Staging only: SET's simulated stand-in. Production has no such call."
          }
        },
        {
          "name": "Report the multisend",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Report the multisend: HTTP 200 or 201\", () => pm.expect([200,201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "pm.test(\"payments.0.txHash is {{txHash}}\", () => pm.expect([pm.collectionVariables.get(\"txHash\")]).to.include(pick(answer, \"payments.0.txHash\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payments/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payments",
                "batch"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"chain\": \"{{chain}}\",\n  \"txHash\": \"{{txHash}}\",\n  \"batchId\": \"{{batchId}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": ""
          }
        },
        {
          "name": "The batch, with each payment",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"The batch, with each payment: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "pm.test(\"items.0.payments.0.state is pending_chain or in_wallet\", () => pm.expect([\"pending_chain\", \"in_wallet\"]).to.include(pick(answer, \"items.0.payments.0.state\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees/batch/{{batchId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees",
                "batch",
                "{{batchId}}"
              ],
              "query": []
            },
            "description": ""
          }
        },
        {
          "name": "payable_payment.in_wallet",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"payable_payment.in_wallet: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/events?type=payable_payment.in_wallet&limit=10",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "events"
              ],
              "query": [
                {
                  "key": "type",
                  "value": "payable_payment.in_wallet"
                },
                {
                  "key": "limit",
                  "value": "10"
                }
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Recipe: Wallet everywhere, bank in the US",
      "description": "Pay any payee by email into their own wallet at once; payees in the US (not New York) add the bank step themselves. One event means paid: payable_payment.in_wallet.\n\nSet these collection variables first: chain, email, amountUsdc. Each request keeps what the next one needs.\n\n1. Where to pay this person now\n2. Send amountUsdc USDC to the address (outside SET: Send exactly amountUsdc USDC on chain to address, from a wallet you registered (GET /api/partner/senders). Set txHash to the transaction hash. On staging: A simulated payment into the payee's wallet.)\n3. Report the payment (a wallet SET created)\n4. The payee's status now\n5. payable_payment.in_wallet\n\nGuide: https://simpleeasytransactions.com/docs/direct-deposit/two-legs",
      "item": [
        {
          "name": "Where to pay this person now",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Where to pay this person now: HTTP 200 or 201\", () => pm.expect([200,201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "if (pick(answer, \"payeeId\") != null) pm.collectionVariables.set(\"payeeId\", String(pick(answer, \"payeeId\")));",
                  "if (pick(answer, \"status\") != null) pm.collectionVariables.set(\"status\", String(pick(answer, \"status\")));",
                  "if (pick(answer, \"address\") != null) pm.collectionVariables.set(\"address\", String(pick(answer, \"address\")));",
                  "if (pick(answer, \"destination\") != null) pm.collectionVariables.set(\"destination\", String(pick(answer, \"destination\")));",
                  "pm.test(\"status is direct or claimable\", () => pm.expect([\"direct\", \"claimable\"]).to.include(pick(answer, \"status\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{email}}\",\n  \"chain\": \"{{chain}}\",\n  \"amountUsdc\": \"{{amountUsdc}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": ""
          }
        },
        {
          "name": "(staging) A simulated payment into the payee's wallet",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"(staging) A simulated payment into the payee's wallet: HTTP 201\", () => pm.expect([201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "if (pick(answer, \"txHash\") != null) pm.collectionVariables.set(\"txHash\", String(pick(answer, \"txHash\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payments"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payeeId\": \"{{payeeId}}\",\n  \"chain\": \"{{chain}}\",\n  \"amount\": \"{{amountUsdc}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Staging only: SET's simulated stand-in. Production has no such call."
          }
        },
        {
          "name": "Report the payment (a wallet SET created)",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Report the payment (a wallet SET created): HTTP 200 or 201\", () => pm.expect([200,201]).to.include(pm.response.code));",
                  "const answer = pm.response.json();",
                  "const pick = (value, path) => path.split(\".\").reduce((node, key) => (node === null || node === undefined ? undefined : node[key]), value);",
                  "pm.test(\"payment.state is pending_chain or in_wallet\", () => pm.expect([\"pending_chain\", \"in_wallet\"]).to.include(pick(answer, \"payment.state\")));"
                ]
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payments"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payeeId\": \"{{payeeId}}\",\n  \"chain\": \"{{chain}}\",\n  \"txHash\": \"{{txHash}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": ""
          }
        },
        {
          "name": "The payee's status now",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"The payee's status now: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees/{{payeeId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees",
                "{{payeeId}}"
              ],
              "query": []
            },
            "description": ""
          }
        },
        {
          "name": "payable_payment.in_wallet",
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"payable_payment.in_wallet: HTTP 200\", () => pm.expect([200]).to.include(pm.response.code));"
                ]
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/events?type=payable_payment.in_wallet&limit=10",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "events"
              ],
              "query": [
                {
                  "key": "type",
                  "value": "payable_payment.in_wallet"
                },
                {
                  "key": "limit",
                  "value": "10"
                }
              ]
            },
            "description": ""
          }
        }
      ]
    },
    {
      "name": "Events",
      "item": [
        {
          "name": "Audit log",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/audit_log",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "audit_log"
              ],
              "variable": [],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "1 to 100; 50 by default."
                },
                {
                  "key": "createdBefore",
                  "value": "",
                  "disabled": true,
                  "description": "The last answer's nextCreatedBefore, passed back unchanged; or an ISO 8601 time (entries before it)."
                },
                {
                  "key": "format",
                  "value": "",
                  "disabled": true,
                  "description": "csv: the same page as CSV (createdAt, id, actor, keyPrefix, action), with the next page in a Link header (rel=\"next\")."
                }
              ]
            },
            "description": "What changed on your account and who changed it, newest first: your keys, your dashboard members and SET's operator. Codes and times only, never a body."
          }
        },
        {
          "name": "List events",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/events",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "events"
              ],
              "variable": [],
              "query": [
                {
                  "key": "after",
                  "value": "",
                  "disabled": true,
                  "description": "Only events after this one."
                },
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "1–100, default 50."
                },
                {
                  "key": "type",
                  "value": "",
                  "disabled": true,
                  "description": "An event type (payout.paid), or a prefix ending in a dot (payout.)."
                },
                {
                  "key": "createdAfter",
                  "value": "",
                  "disabled": true,
                  "description": "Only events created after this time."
                }
              ]
            },
            "description": "Every event for you, oldest first by seq. Poll with the id of the last event you processed; narrow with type and createdAfter."
          }
        },
        {
          "name": "One event",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/events/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "events",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "description": "The event and its webhook delivery record."
          }
        },
        {
          "name": "Redeliver an event",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/events/:id/redeliver",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "events",
                ":id",
                "redeliver"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sends the event to your webhook again."
          }
        }
      ]
    },
    {
      "name": "Keys",
      "item": [
        {
          "name": "Your keys",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/keys",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "keys"
              ],
              "variable": [],
              "query": []
            },
            "description": "The current key's prefix and issue time, and the previous key's prefix and expiry while it still works. Never a key itself."
          }
        },
        {
          "name": "Rotate your key",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/keys/rotate",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "keys",
                "rotate"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "A new key, shown once in this answer. The old key keeps working for overlapHours (default 24, at most 72, 0 stops it now) so you can deploy without downtime. Only the current key can rotate."
          }
        },
        {
          "name": "End the overlap",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/keys/previous/revoke",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "keys",
                "previous",
                "revoke"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "The previous key stops working now."
          }
        },
        {
          "name": "Pin your partner key to your servers' addresses",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/keys/allowed_cidrs",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "keys",
                "allowed_cidrs"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "allowedCidrs: up to 20 IPv4 or IPv6 addresses or CIDR ranges; [] for any address. A request with the key from anywhere else is 403 ip_not_allowed. The current key cannot shut itself out (409 would_lock_out)."
          }
        }
      ]
    },
    {
      "name": "Payable Email",
      "item": [
        {
          "name": "Resolve an email",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Where to pay this person now: their Cash-Out Address if they allowed you (direct), a wallet SET created for them (claimable, Base only), or not yet (setup_required, invited). The email goes to SET's wallet provider only and is not stored."
          }
        },
        {
          "name": "Payee status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees/:payeeId",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees",
                ":payeeId"
              ],
              "variable": [
                {
                  "key": "payeeId",
                  "value": ""
                }
              ],
              "query": [
                {
                  "key": "chain",
                  "value": "",
                  "disabled": true,
                  "description": "Defaults to base."
                },
                {
                  "key": "amountUsdc",
                  "value": "",
                  "disabled": true,
                  "description": "Optional, as on POST /api/partner/payees."
                }
              ]
            },
            "description": "The payee's status now. Re-resolve before every payment and never cache an address."
          }
        },
        {
          "name": "Resolve a list of emails",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees",
                "batch"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Up to 20 emails in one call, each resolved as POST /api/partner/payees (with its amount). Add more, 20 at a time, with POST /api/partner/payees/batch/{id}/items: up to 5,000 in one batch. payTo is the list for one multisend."
          }
        },
        {
          "name": "A batch",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees/batch/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees",
                "batch",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": [
                {
                  "key": "format",
                  "value": "",
                  "disabled": true,
                  "description": "Leave out for JSON."
                }
              ]
            },
            "description": "The batch, with each item's reported payments. format=csv gives the multisend list as CSV; format=safe, a Safe Transaction Builder file of USDC transfers to import and sign once."
          }
        },
        {
          "name": "Add emails to a batch",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payees/batch/:id/items",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payees",
                "batch",
                ":id",
                "items"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Up to 20 more emails, numbered after the batch's own, on the batch's chain; up to 5,000 in one batch. 409 batch_busy: another page was added at the same time, send this one again."
          }
        },
        {
          "name": "Reported payments",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payments"
              ],
              "variable": [],
              "query": [
                {
                  "key": "month",
                  "value": "",
                  "disabled": true,
                  "description": "YYYY-MM."
                },
                {
                  "key": "payeeId",
                  "value": "",
                  "disabled": true,
                  "description": "One payee only."
                }
              ]
            },
            "description": "Your reported payments in a month and where each one is."
          }
        },
        {
          "name": "Report a payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payments"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "A payment into the wallet SET created for a payee, from one of your registered wallets, on Base. The same transaction again returns the same payment."
          }
        },
        {
          "name": "Report a multisend",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payments/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payments",
                "batch"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Every USDC transfer in the transaction from one of your registered wallets to a wallet SET created for one of your payees is recorded once; the rest are listed under skipped."
          }
        }
      ]
    },
    {
      "name": "Payouts",
      "item": [
        {
          "name": "Monthly statement",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/statement",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "statement"
              ],
              "variable": [],
              "query": [
                {
                  "key": "month",
                  "value": "",
                  "disabled": true,
                  "description": "YYYY-MM; defaults to this month."
                }
              ]
            },
            "description": "Payouts you sent in a month and your revenue share: basis points of each payout the provider reports paid, capped at SET's fee on it, in whole cents."
          }
        },
        {
          "name": "Does this address take payouts?",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/address",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "address"
              ],
              "variable": [],
              "query": [
                {
                  "key": "chain",
                  "value": "",
                  "disabled": false,
                  "description": "base or ethereum."
                },
                {
                  "key": "address",
                  "value": "",
                  "disabled": false,
                  "description": "The address the payee gave you."
                },
                {
                  "key": "amountUsdc",
                  "value": "",
                  "disabled": true,
                  "description": "Optional: an amount you mean to pay. acceptsPayouts is then false for a Cash-Out Address when the provider would not credit it after SET's fee (belowMinimum)."
                }
              ]
            },
            "description": "Whether an address is a payee's Cash-Out Address (or Threshold Address) that takes Direct Deposit payouts. Asking links the address to you: a payout into it from a wallet nobody registered is told to you as payout.unknown_sender."
          }
        },
        {
          "name": "Fee preview",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/quote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "quote"
              ],
              "variable": [],
              "query": [
                {
                  "key": "amountUsdc",
                  "value": "",
                  "disabled": true,
                  "description": "The USDC you mean to pay. Send this or netUsd."
                },
                {
                  "key": "netUsd",
                  "value": "",
                  "disabled": true,
                  "description": "What the payee's bank should receive, in whole cents. Each line then gives amountUsdc: the least amount to send for it, SET's fee included. Send this or amountUsdc."
                },
                {
                  "key": "chain",
                  "value": "",
                  "disabled": true,
                  "description": "With address."
                },
                {
                  "key": "address",
                  "value": "",
                  "disabled": true,
                  "description": "A payee's Cash-Out Address or Threshold Address."
                }
              ]
            },
            "description": "What the payee's bank receives for an amount after SET's fee, and your share. Without an address, SET's Direct Deposit fee of 3%; with one, that address's own fee. An estimate: the provider's receipt is final."
          }
        },
        {
          "name": "References on a transaction",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/references",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "references"
              ],
              "variable": [],
              "query": [
                {
                  "key": "chain",
                  "value": "",
                  "disabled": true,
                  "description": "Defaults to base."
                },
                {
                  "key": "txHash",
                  "value": "",
                  "disabled": false,
                  "description": "The payment transaction."
                }
              ]
            },
            "description": "Your own references set on one payment transaction, per recipient."
          }
        },
        {
          "name": "Set a reference",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/references",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "references"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Tags a payment with your own id (a bounty, contest or invoice id). It comes back on every event, statement row, payment list and 1099 line about that payment. Without `to` it covers every recipient in the transaction. May be set before SET has seen the payment. reference null removes it. Stored encrypted; do not put a person's name or email in it."
          }
        },
        {
          "name": "Reserve one payout for a reference",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payout_intents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payout_intents"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Answers where to pay this amount, once per reference: a second intent for the same reference is 409 already_intended (or already_paid) with the first one, so a retry never pays twice. Set the reference on the payment (POST /api/partner/references) and the intent is paid (payout_intent.paid)."
          }
        },
        {
          "name": "The intent for a reference",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payout_intents",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payout_intents"
              ],
              "variable": [],
              "query": [
                {
                  "key": "reference",
                  "value": "",
                  "disabled": false,
                  "description": "The reference you gave it."
                }
              ]
            },
            "description": ""
          }
        },
        {
          "name": "One payout intent",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payout_intents/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payout_intents",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "description": ""
          }
        },
        {
          "name": "Cancel an open intent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/payout_intents/:id/cancel",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "payout_intents",
                ":id",
                "cancel"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Its reference can then be used again."
          }
        }
      ]
    },
    {
      "name": "Sandbox",
      "item": [
        {
          "name": "Simulate a payout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payouts",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payouts"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "A simulated payout from you to a staging payee's Cash-Out Address: funds_received."
          }
        },
        {
          "name": "Next step of a simulated payout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payouts/:id/advance",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payouts",
                ":id",
                "advance"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "payment_submitted, then payment_processed."
          }
        },
        {
          "name": "Return a simulated payout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payouts/:id/return",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payouts",
                ":id",
                "return"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "The bank returns it before paying: returned."
          }
        },
        {
          "name": "Simulate a payout from an unknown wallet",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/unknown_sender",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "unknown_sender"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "payout.unknown_sender to you; registering senderAddress then credits it."
          }
        },
        {
          "name": "Simulate an address being deactivated",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/address_deactivated",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "address_deactivated"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "address.deactivated to you, for an address you checked. The address itself is not changed."
          }
        },
        {
          "name": "Create a stand-in payee's Cash-Out Address",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/cash_out_addresses",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "cash_out_addresses"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "A sandbox payee's Cash-Out Address that takes your payouts, with no bank behind it, so quotes, address checks, payout intents and simulated payouts can be tried. Up to 25 per sandbox."
          }
        },
        {
          "name": "Simulate a payment into a payee's created wallet",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payments"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "A payment from you into the wallet SET created for a payee (status claimable), in_wallet at once, under a simulated txHash. Reporting that txHash (POST /api/partner/payments) answers the same payment."
          }
        },
        {
          "name": "Simulate a batch's multisend",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/sandbox/payments/batch",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "sandbox",
                "payments",
                "batch"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "One simulated transaction paying every payable item of a batch: claimable items become payments in_wallet, direct items at a stand-in Cash-Out Address become simulated payouts, each with its reference. Reporting the txHash (POST /api/partner/payments/batch) answers the payments."
          }
        }
      ]
    },
    {
      "name": "Senders",
      "item": [
        {
          "name": "Your sender wallets",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/senders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "senders"
              ],
              "variable": [],
              "query": [
                {
                  "key": "limit",
                  "value": "",
                  "disabled": true,
                  "description": "1 to 100; 50 by default."
                },
                {
                  "key": "createdBefore",
                  "value": "",
                  "disabled": true,
                  "description": "The last answer's nextCreatedBefore, passed back unchanged; or an ISO 8601 time (wallets added before it)."
                }
              ]
            },
            "description": "Every wallet you pay from, registered by SET or by you, newest first."
          }
        },
        {
          "name": "Register a sender wallet",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/senders",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "senders"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Sign the text from GET /api/partner/senders/message with the wallet (personal_sign), or have a contract wallet approve it (EIP-1271), within an hour. Unknown payouts from this wallet in the last 30 days are then credited to you."
          }
        },
        {
          "name": "The text to sign",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/senders/message",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "senders",
                "message"
              ],
              "variable": [],
              "query": [
                {
                  "key": "chain",
                  "value": "",
                  "disabled": false,
                  "description": "base or ethereum."
                },
                {
                  "key": "address",
                  "value": "",
                  "disabled": false,
                  "description": "The wallet."
                }
              ]
            },
            "description": "The exact message for a wallet, with its issuedAt."
          }
        },
        {
          "name": "Remove a sender wallet",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/senders/:chain/:address",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "senders",
                ":chain",
                ":address"
              ],
              "variable": [
                {
                  "key": "chain",
                  "value": ""
                },
                {
                  "key": "address",
                  "value": ""
                }
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Payouts already credited stay credited."
          }
        }
      ]
    },
    {
      "name": "Tax",
      "item": [
        {
          "name": "Year-end 1099 data, per payee",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/tax/1099",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "tax",
                "1099"
              ],
              "variable": [],
              "query": [
                {
                  "key": "year",
                  "value": "",
                  "disabled": true,
                  "description": "Calendar year, for example 2026. Defaults to last year."
                },
                {
                  "key": "format",
                  "value": "",
                  "disabled": true,
                  "description": "json (default) or csv."
                }
              ]
            },
            "description": "Every payment you made through SET in the year, per payee, with the year's threshold ($2,000 from 2026, $600 before). SET does not decide reportability or file."
          }
        },
        {
          "name": "Year-end payments, one per row",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/tax/payments",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "tax",
                "payments"
              ],
              "variable": [],
              "query": [
                {
                  "key": "year",
                  "value": "",
                  "disabled": true,
                  "description": "Calendar year, for example 2026. Defaults to last year."
                },
                {
                  "key": "format",
                  "value": "",
                  "disabled": true,
                  "description": "json (default) or csv."
                }
              ]
            },
            "description": "Every payment counted in /api/partner/tax/1099."
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "Set your webhook URL and which events it gets",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/webhook_endpoint",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "webhook_endpoint"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "url: an https URL on your own server; null stops pushing. events: which events are pushed, such as \"payout.returned\" or \"payout.*\" (up to 50; [] for every event). Send url, events, or both. Events stay listed either way."
          }
        },
        {
          "name": "Your webhook endpoints",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/webhook_endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "webhook_endpoints"
              ],
              "variable": [],
              "query": []
            },
            "description": "Your first endpoint (id \"primary\", set with POST /api/partner/webhook_endpoint) and up to 10 more, each with its own URL, event filter and signing secret."
          }
        },
        {
          "name": "Add a webhook endpoint",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/webhook_endpoints",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "webhook_endpoints"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "It receives events recorded from now on, signed with its own secret (in this answer; also GET /api/partner/webhook_endpoints/{id}). Each delivery carries SET-Webhook-Endpoint with the endpoint's id."
          }
        },
        {
          "name": "One webhook endpoint, with its secret",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/webhook_endpoints/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "webhook_endpoints",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "description": ""
          }
        },
        {
          "name": "Change a webhook endpoint",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/webhook_endpoints/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "webhook_endpoints",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "url, events, or both."
          }
        },
        {
          "name": "Delete a webhook endpoint",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/webhook_endpoints/:id",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "webhook_endpoints",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Its undelivered events are dropped; they stay listed."
          }
        },
        {
          "name": "Rotate an endpoint's secret",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/webhook_endpoints/:id/rotate_secret",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "webhook_endpoints",
                ":id",
                "rotate_secret"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "The previous secret also signs deliveries for 24 hours."
          }
        },
        {
          "name": "Webhook URL and signing secret",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/webhook_secret",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "webhook_secret"
              ],
              "variable": [],
              "query": []
            },
            "description": "Verify each delivery: SET-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\" with this secret>."
          }
        },
        {
          "name": "Send a test ping",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Authorization",
                "value": "Bearer {{setPartnerKey}}"
              },
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/api/partner/webhook_test",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "api",
                "partner",
                "webhook_test"
              ],
              "variable": [],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Records a signed ping event and pushes it to your webhook."
          }
        }
      ]
    }
  ]
}
