This guide takes a test payment end to end. Nothing here moves real money.
Get a test secret key
In the Dashboard, switch to test mode and open Developers › API keys. Create a secret key, or a restricted key with Checkout sessions on Write, and keep it in your server's environment. It starts with sov_sk_test_ or sov_rk_test_.
Open a checkout session
When your customer clicks to pay, your server opens a session with what it sells. Read the prices from your own records, never from the browser.
Send your customer to pay
Redirect the customer's browser to the session's url. In test mode, pay with the test card 4242 4242 4242 4242, any future expiry date and any security code.
Get told it was paid
Add a webhook endpoint for checkout.session.completed in Developers › Webhooks. Sovgate sends the event to your server once the customer has paid.
Confirm, then fulfil
Check the event's signature, read the session back, check that payment_status is paid, then fulfil the order by its client_reference_id, once.
Open the session
The answer holds the session, with its url:
Read it back
When status is complete and payment_status is paid, the money is yours. The same event can arrive more than once, so fulfil each order once.
Go live
Verify your business in the Dashboard, put your live key in your server's environment in place of the test one, add a live webhook endpoint, and add your success page's domain to your allowed return addresses. Live and test mode keep their own keys, endpoints and sessions.