{
  "info": {
    "_postman_id": "8f3b201a-9f44-42b7-a3d2-7c858e2bf101",
    "name": "Payeny Payment Orchestration API v1",
    "description": "Production REST API for Payeny Payment Orchestration Platform, powering Nexovex SaaS apps.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://payeny.com/api/v1",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "payeny_test_your_key_here",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "System & Health",
      "item": [
        {
          "name": "Health Check",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/health",
              "host": ["{{baseUrl}}"],
              "path": ["health"]
            },
            "description": "Checks system operational status and database connection."
          }
        }
      ]
    },
    {
      "name": "Platform Profiles",
      "item": [
        {
          "name": "List Platform Profiles",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/platform-profiles",
              "host": ["{{baseUrl}}"],
              "path": ["platform-profiles"]
            }
          }
        },
        {
          "name": "Retrieve Platform Profile",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/platform-profiles/:id",
              "host": ["{{baseUrl}}"],
              "path": ["platform-profiles", ":id"],
              "variable": [
                {
                  "key": "id",
                  "value": "plt_default"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Merchants",
      "item": [
        {
          "name": "List Merchants",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/merchants?limit=20",
              "host": ["{{baseUrl}}"],
              "path": ["merchants"],
              "query": [
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            }
          }
        },
        {
          "name": "Create Merchant",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"legal_name\": \"Acme SaaS Corp\",\n  \"display_name\": \"Acme Software\",\n  \"email\": \"billing@acmesoftware.io\",\n  \"country\": \"US\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/merchants",
              "host": ["{{baseUrl}}"],
              "path": ["merchants"]
            }
          }
        },
        {
          "name": "Retrieve Merchant",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/merchants/:id",
              "host": ["{{baseUrl}}"],
              "path": ["merchants", ":id"],
              "variable": [
                {
                  "key": "id",
                  "value": "mer_sample"
                }
              ]
            }
          }
        },
        {
          "name": "Create Onboarding Link",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"return_url\": \"https://example.com/onboard/success\",\n  \"refresh_url\": \"https://example.com/onboard/refresh\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/merchants/:id/onboarding-link",
              "host": ["{{baseUrl}}"],
              "path": ["merchants", ":id", "onboarding-link"],
              "variable": [
                {
                  "key": "id",
                  "value": "mer_sample"
                }
              ]
            }
          }
        },
        {
          "name": "Create Dashboard Login Link",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/merchants/:id/login-link",
              "host": ["{{baseUrl}}"],
              "path": ["merchants", ":id", "login-link"],
              "variable": [
                {
                  "key": "id",
                  "value": "mer_sample"
                }
              ]
            }
          }
        },
        {
          "name": "Retrieve Merchant Balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/merchants/:id/balance",
              "host": ["{{baseUrl}}"],
              "path": ["merchants", ":id", "balance"],
              "variable": [
                {
                  "key": "id",
                  "value": "mer_sample"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Customers",
      "item": [
        {
          "name": "List Customers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/customers?limit=20",
              "host": ["{{baseUrl}}"],
              "path": ["customers"],
              "query": [
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            }
          }
        },
        {
          "name": "Create Customer",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"sarah.connor@example.com\",\n  \"name\": \"Sarah Connor\",\n  \"phone\": \"+15551234567\",\n  \"metadata\": {\n    \"tenant_id\": \"org_456\"\n  }\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/customers",
              "host": ["{{baseUrl}}"],
              "path": ["customers"]
            }
          }
        },
        {
          "name": "Retrieve Customer",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/customers/:id",
              "host": ["{{baseUrl}}"],
              "path": ["customers", ":id"],
              "variable": [
                {
                  "key": "id",
                  "value": "cus_sample"
                }
              ]
            }
          }
        },
        {
          "name": "Create Customer Setup Intent",
          "request": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/customers/:id/setup-intents",
              "host": ["{{baseUrl}}"],
              "path": ["customers", ":id", "setup-intents"],
              "variable": [
                {
                  "key": "id",
                  "value": "cus_sample"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Payments & Charges",
      "item": [
        {
          "name": "List Payments",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/payments?limit=20",
              "host": ["{{baseUrl}}"],
              "path": ["payments"],
              "query": [
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            }
          }
        },
        {
          "name": "Create Payment Intent",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "idemp_{{$randomUUID}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 4900,\n  \"currency\": \"usd\",\n  \"customer_id\": \"cus_sample\",\n  \"description\": \"Standard SaaS Monthly License\",\n  \"metadata\": {\n    \"invoice_number\": \"INV-2026-001\"\n  }\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/payments",
              "host": ["{{baseUrl}}"],
              "path": ["payments"]
            }
          }
        },
        {
          "name": "Retrieve Payment",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/payments/:id",
              "host": ["{{baseUrl}}"],
              "path": ["payments", ":id"],
              "variable": [
                {
                  "key": "id",
                  "value": "pay_sample"
                }
              ]
            }
          }
        },
        {
          "name": "Capture Payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount_to_capture\": 4900\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/payments/:id/capture",
              "host": ["{{baseUrl}}"],
              "path": ["payments", ":id", "capture"],
              "variable": [
                {
                  "key": "id",
                  "value": "pay_sample"
                }
              ]
            }
          }
        },
        {
          "name": "Cancel Payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"cancellation_reason\": \"requested_by_customer\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/payments/:id/cancel",
              "host": ["{{baseUrl}}"],
              "path": ["payments", ":id", "cancel"],
              "variable": [
                {
                  "key": "id",
                  "value": "pay_sample"
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Hosted Checkout & Links",
      "item": [
        {
          "name": "Create Checkout Session",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 3500,\n  \"currency\": \"usd\",\n  \"success_url\": \"https://example.com/checkout/success?session_id={CHECKOUT_SESSION_ID}\",\n  \"cancel_url\": \"https://example.com/checkout/cancel\",\n  \"line_items\": [\n    {\n      \"name\": \"Starter Plan\",\n      \"amount\": 3500,\n      \"quantity\": 1\n    }\n  ]\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/checkout-sessions",
              "host": ["{{baseUrl}}"],
              "path": ["checkout-sessions"]
            }
          }
        },
        {
          "name": "Retrieve Checkout Session",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/checkout-sessions/:id",
              "host": ["{{baseUrl}}"],
              "path": ["checkout-sessions", ":id"],
              "variable": [
                {
                  "key": "id",
                  "value": "cs_sample"
                }
              ]
            }
          }
        },
        {
          "name": "Create Payment Link",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"title\": \"Enterprise Consulting Deposit\",\n  \"amount\": 150000,\n  \"currency\": \"usd\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/payment-links",
              "host": ["{{baseUrl}}"],
              "path": ["payment-links"]
            }
          }
        }
      ]
    },
    {
      "name": "Refunds & Disputes",
      "item": [
        {
          "name": "Create Refund",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"payment_id\": \"pay_sample\",\n  \"amount\": 1500,\n  \"reason\": \"requested_by_customer\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/refunds",
              "host": ["{{baseUrl}}"],
              "path": ["refunds"]
            }
          }
        },
        {
          "name": "List Refunds",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/refunds",
              "host": ["{{baseUrl}}"],
              "path": ["refunds"]
            }
          }
        },
        {
          "name": "List Disputes",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/disputes",
              "host": ["{{baseUrl}}"],
              "path": ["disputes"]
            }
          }
        }
      ]
    },
    {
      "name": "Subscriptions",
      "item": [
        {
          "name": "List Subscriptions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/subscriptions",
              "host": ["{{baseUrl}}"],
              "path": ["subscriptions"]
            }
          }
        },
        {
          "name": "Create Subscription",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_id\": \"cus_sample\",\n  \"plan_id\": \"plan_pro_monthly\",\n  \"amount\": 4900,\n  \"currency\": \"usd\",\n  \"interval\": \"month\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/subscriptions",
              "host": ["{{baseUrl}}"],
              "path": ["subscriptions"]
            }
          }
        }
      ]
    },
    {
      "name": "Transfers & Payouts",
      "item": [
        {
          "name": "List Transfers",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/transfers",
              "host": ["{{baseUrl}}"],
              "path": ["transfers"]
            }
          }
        },
        {
          "name": "Create Transfer",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"destination_merchant_id\": \"mer_sample\",\n  \"amount\": 10000,\n  \"currency\": \"usd\",\n  \"description\": \"Marketplace partner disbursement\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/transfers",
              "host": ["{{baseUrl}}"],
              "path": ["transfers"]
            }
          }
        },
        {
          "name": "Create Payout",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 50000,\n  \"currency\": \"usd\",\n  \"merchant_id\": \"mer_sample\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/payouts",
              "host": ["{{baseUrl}}"],
              "path": ["payouts"]
            }
          }
        }
      ]
    },
    {
      "name": "Fee Engine & Rules",
      "item": [
        {
          "name": "List Fee Rules",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/fee-rules",
              "host": ["{{baseUrl}}"],
              "path": ["fee-rules"]
            }
          }
        },
        {
          "name": "Preview Fee Calculation",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 10000,\n  \"currency\": \"usd\",\n  \"merchant_id\": \"mer_sample\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/fee-rules/preview",
              "host": ["{{baseUrl}}"],
              "path": ["fee-rules", "preview"]
            }
          }
        }
      ]
    },
    {
      "name": "Ledger & Balances",
      "item": [
        {
          "name": "Query Ledger Entries",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/ledger?limit=50",
              "host": ["{{baseUrl}}"],
              "path": ["ledger"],
              "query": [
                {
                  "key": "limit",
                  "value": "50"
                }
              ]
            }
          }
        },
        {
          "name": "Get Account Balances",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/ledger/balance",
              "host": ["{{baseUrl}}"],
              "path": ["ledger", "balance"]
            }
          }
        }
      ]
    },
    {
      "name": "Reconciliation",
      "item": [
        {
          "name": "List Reconciliation Batches",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/reconciliation",
              "host": ["{{baseUrl}}"],
              "path": ["reconciliation"]
            }
          }
        },
        {
          "name": "Trigger Reconciliation Run",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"profile_id\": \"plt_default\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/reconciliation/run",
              "host": ["{{baseUrl}}"],
              "path": ["reconciliation", "run"]
            }
          }
        }
      ]
    },
    {
      "name": "Events & Webhooks",
      "item": [
        {
          "name": "List Events",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/events?limit=25",
              "host": ["{{baseUrl}}"],
              "path": ["events"],
              "query": [
                {
                  "key": "limit",
                  "value": "25"
                }
              ]
            }
          }
        },
        {
          "name": "List Webhook Endpoints",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints",
              "host": ["{{baseUrl}}"],
              "path": ["webhook-endpoints"]
            }
          }
        },
        {
          "name": "Register Webhook Endpoint",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://mysaas.com/api/webhooks/payeny\",\n  \"events\": [\"payment.succeeded\", \"payment.failed\", \"merchant.onboarded\"],\n  \"description\": \"Production SaaS Webhook Listener\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/webhook-endpoints",
              "host": ["{{baseUrl}}"],
              "path": ["webhook-endpoints"]
            }
          }
        }
      ]
    }
  ]
}
