Wegopay Docs
Accept payments with one API
Your server creates a payment, the customer pays on a Wegopay checkout, and you fulfill the order once Wegopay reports a verified result. Card data never passes through your servers.
How it works
- Create a payment. Your server calls
POST /v1/paymentswith its secret API key. Wegopay returns a payment ID and acheckoutUrl. - Send the customer to checkout. Redirect the browser to the
checkoutUrl, or embed it in an iframe. The customer pays by card or wallet there. - Wegopay verifies the result. The outcome is confirmed server-side with the payment network.
- Fulfill the order. A signed webhook tells your server that something changed. Read the payment, check that it is
paid, and fulfill once.
A redirect is not a payment
The customer returning to your
successUrl only means they finished on the checkout page. Fulfill only after your server reads status: "paid" from the API or a signed webhook.Choose an integration
Hosted checkoutThe default. Wegopay hosts the payment page, card entry, 3D Secure and wallets. Redirect or embed it.Merchant card captureYour backend collects the card and sends it straight to the card vault. Requires activation.
Base URL and format
All endpoints live under one base URL. Requests and responses are JSON, amounts are integer cents, and times are UTC in RFC 3339 format.
https://api.wegopay.techSuccessful responses wrap the resource in data. Errors use {"error":{"code":"…","message":"…"}}; see errors and idempotency.
Sandbox and live
The same base URL serves both environments. Your API key selects one: wgp_test_… keys work only in sandbox and wgp_live_… keys only in live. Sandbox payments never move money. See API keys and environments.