Node.js
Stable v3.2.1 · TypeScript first · zero runtime deps · works in Edge/Workers runtimes.
DEVELOPERS · REST API · webhooks · 8 SDKs
If you've integrated Stripe, you can integrate Whaliepay in an afternoon — the API shape is intentionally familiar. The difference is what happens after the POST: cascading retries across PSPs, BIN-level routing, FX optimisation, all behind a single endpoint.
Grab a sandbox API key from the console (free, no card required), then run the snippet in your language of choice. The routing engine sandbox replies exactly like production — same fields, same headers, same webhooks.
The sandbox returns the same response shape as production. Test card 4242 4242 4242 4242 always authorises, 4000 0000 0000 0002 always declines, 4000 0000 0000 9995 triggers a 3DS challenge. Full list of triggers in /developers#sandbox.
All endpoints accept and return JSON. Authentication is via bearer token (sk_live_… or sk_test_…). Idempotency is supported on every POST via the Idempotency-Key header. OpenAPI spec at api.whaliepay.com/openapi.json.
Create a routed payment. The engine evaluates rules and signals, forwards to the best rail. Returns the routed_via PSP, the auth status, and a payment.id for subsequent operations.
Retrieve a payment by ID. Returns the latest state, the rail used, attempt history, decline reasons (if any), and the unified ledger entry id.
List payments with cursor-based pagination. Filter by status, customer, date range, currency, or routed_via PSP. Default limit 25, max 100 per page.
Capture a previously authorised payment. Partial capture is supported by passing the amount field — useful for ship-and-bill workflows.
Cancel an uncaptured authorisation. Forwards the void to the routing PSP, releases the hold on the card.
Refund a captured payment. Full or partial. Always routed back through the original PSP — the routing engine does not split refunds.
Retrieve a refund by ID. Returns processing status, expected settlement date, and the associated ledger entry.
Trigger an out-of-cycle payout to your settlement bank. Optional currency and amount; defaults to the full balance.
List payouts. Filter by status (pending, in_transit, paid, failed). Includes ETA per the PSP's settlement window.
Create a customer. Stored once in our vault, addressable across all PSPs — no need to duplicate the record per provider.
Retrieve a customer. Returns payment methods, default method, email, billing details, and the routing history per customer.
Update a customer. Propagates to the relevant PSPs that hold the customer record (Stripe, Adyen, etc.).
Vault a payment method. Returns a pm_… token usable on every connected PSP. Underlying card is never re-collected.
Delete a vaulted method. Revokes the cross-PSP token; the underlying network token is detached on the next sync.
Register a webhook endpoint. Pick the events you care about, set the signing secret in the console.
List webhook deliveries. See every retry, the response code from your endpoint, and the payload that was sent. 30-day retention.
Each SDK is a thin, type-safe wrapper over the REST API. Generated from the OpenAPI spec, idiomatic in each language, semantically versioned. Open-source on GitHub under Apache 2.0.
Stable v3.2.1 · TypeScript first · zero runtime deps · works in Edge/Workers runtimes.
Stable v3.2.0 · sync + async clients · Pydantic-typed responses · Python 3.10+.
Stable v3.1.4 · PSR-7/PSR-18 · works with Symfony 6/7 and Laravel 10/11 out of the box.
Stable v3.1.2 · works with Rails 7+ · ActiveSupport integration for hashes & times.
Stable v3.0.8 · idiomatic · context-aware · Go 1.21+.
Beta v0.9.2 · async via tokio · serde for serialisation · Rust 1.74+.
Stable v3.1.0 · .NET 8+ · System.Text.Json · async-first.
Stable v3.0.6 · Java 17+ · works with Spring 6 · Maven Central + Gradle plugin.
Every state change in the routing engine emits a webhook. Signed with HMAC-SHA-256, with timestamp anti-replay. Retried with exponential back-off for up to 24 hours if your endpoint returns non-2xx.
Every Whaliepay account has a parallel test environment. Sandbox keys start with sk_test_, can never charge a real card, and behave like the live engine — same shape, same routing, same webhook signatures.
If you've integrated one of these PSPs, switching to Whaliepay is mostly a base-URL change + a rename or two. We've built a side-by-side migration guide for each.
payment_intent_id → payment.id. pm_… → pm_… (same shape). webhook signatures are HMAC-SHA-256. Average migration: 1-2 engineer-days, validated in shadow mode for 48h before flipping.
pspReference → routed_via. Adyen webhook XML → JSON. Risk profile mapping → our fraud taxonomy. Average migration: 3-5 engineer-days for full coverage.
cko_… → pay_… IDs. Source vs. instrument → unified payment_method. cko Sessions → our 3DS-via-routing. Average migration: 2-3 engineer-days.
Three policies you'll touch the most. All published and unchanged except via versioned, deprecation-noticed releases.
Every POST accepts the Idempotency-Key header. Re-sending the same key within 24h returns the original response. Use a UUID per logical operation — order id, refund id, payout request.
Each official SDK retries idempotent requests up to 3 times with exponential back-off (200ms, 800ms, 2.4s). On 429, retries respect the Retry-After header. On 5xx, retries respect server hints.
Default 60 req/s per merchant on the production API, 10 req/s on sandbox. Enterprise customers can request a higher tier; we never silently throttle without warning.
Want to skim the API hands-on? Grab our Postman collection or the OpenAPI spec.
Sandbox keys are free. The first 100k routed transactions on a Growth plan are routed for free if you sign at the end of a routing audit.