SANDBOX — test deployment of the website. Nothing here is real.

Developers / Guides / Payments

Saved payment methods

Vault a customer's payment method once and reuse it for later charges, instead of asking them to re-enter card details every time — the same convenience as any "keep this card on file" checkout.

Real tokenization works for 8 gateways: Stripe, PayPal, Braintree, Square, Adyen, Authorize.Net, FluidPay, and NMI. Every other gateway implements the same API surface but returns a clear not-supported result rather than silently failing.

Two ways to save a method

Vault it directly

Call the payment-methods endpoint any time — useful for a "save my card" flow that isn't tied to a purchase.

Save while charging

Set saveForFutureUse: true on a charge (with a customerId) and PayMidWare vaults the method used right after the charge succeeds — best-effort, so a vaulting hiccup never fails a charge that already went through.

Endpoints

EndpointPurpose
POST /api/merchant-accounts/{ref}/customersCreate a customer to attach saved methods to. Returns a customerId; an optional accountNumber (unique per merchant) is your own number for the customer.
POST .../customers/{customerId}/payment-methods/{gateway}Vault a payment method for that customer on a specific gateway.
GET .../customers/{customerId}/payment-methodsList a customer's saved methods (display metadata only — never the raw gateway token).
DELETE .../payment-methods/{id}Remove a saved method. Always removed from PayMidWare's own records, even if the gateway-side delete fails.
POST /api/payments/chargePass savedPaymentMethodId instead of a raw token to charge a saved method.

Manage saved methods for a specific customer from the Portal too: /Merchants → your merchant → Customers → a customer.