Build against one payments API
Create a merchant, save its gateway credentials and send a test charge. The same calls work whichever gateway sits behind the merchant.
Two ideas to know
Provider. You: the software company integrating with PayMidWare. Every call carries your key in an X-Api-Key header.
Merchant account. One of your own customers' businesses. Each has its own gateway credentials, and payment calls name the merchant with an X-Merchant-Reference header.
Quick start
Get a sandbox key. Sign up for the sandbox and the team will set up your access.
-
Create a merchant account.
POST /api/merchant-accounts X-Api-Key: <your key> { "externalReference": "store-001", "displayName": "My First Store" } -
Save that merchant's gateway credentials (write-only; use the gateway's own sandbox keys).
PUT /api/merchant-accounts/store-001/credentials/Stripe X-Api-Key: <your key> { "apiSecret": "sk_test_...", "environment": "Sandbox", "enabled": true } -
Send a test charge.
POST /api/payments/charge X-Api-Key: <your key> X-Merchant-Reference: store-001 { "amount": { "value": 12.00, "currency": "USD" }, "gatewayName": "Stripe" }
Card numbers never go through your server or ours. Collect card and bank details with the gateway's own hosted fields and send PayMidWare the token you get back. How that works.
What the API covers
| Area | Endpoints |
|---|---|
| Payments | POST /api/payments/charge, capture, refund, void and status under /api/payments/{gateway}/... |
| Merchants | /api/merchant-accounts and each merchant's gateway credentials |
| Customers and saved methods | /api/merchant-accounts/{ref}/customers and their payment methods |
| Invoices | /api/merchant-accounts/{ref}/invoices: create, send, embed, void |
| Scheduled payments | /api/merchant-accounts/{ref}/scheduled-payments: create, pause, resume, cancel, run now |
| Gateways | GET /api/gateways lists every supported gateway |
This is an overview. The full, current reference with request and response shapes is the interactive API reference above. Add-on endpoints (accounting, CRM, ecommerce, point of sale, e-signature) are covered there too.
Sandbox and production
The sandbox is a separate environment with its own keys, free to use, that only accepts the gateways' sandbox credentials. Production keys start with a different prefix, and sandbox and production credentials cannot be mixed.
To go live, each of your merchants needs its own merchant account and gateway account. Tell us where you are and we will help with whichever is missing.