Skip to content

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

  1. Create a payment. Your server calls POST /v1/payments with its secret API key. Wegopay returns a payment ID and a checkoutUrl.
  2. 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.
  3. Wegopay verifies the result. The outcome is confirmed server-side with the payment network.
  4. 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

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.

Base URL
https://api.wegopay.tech

Successful 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.

Next steps