Accept a payment
Create a payment on the server, confirm it in the browser, and get notified when the money is on its way.
Before you start
You need a test key from your dashboard and one of our server libraries. All examples use test mode, so nothing is charged.
Create a payment
A payment describes how much you want to charge and in which currency. It is stored on the server so the amount cannot be changed from the browser.
Amount and currency
Amounts are in cents, so 2000 is 20 dollars. The currency must match the account the money is paid out to.
Metadata
Store your own order number in metadata so you can find the payment again when the webhook arrives.
Confirm the payment
Send the payment’s secret to the browser and confirm it there. If the bank requires extra authentication, we show it automatically.
Handle webhooks
When the payment succeeds, we send an event to your endpoint. Reply quickly with 200 and do the heavy work afterwards.
Verify the signature
Every event is signed. Check the signature before you trust the contents.
Test your integration
Use the test cards to try both successful and declined payments, and check that your webhook handles both.
When everything works, swap the test key for your live key. Nothing else needs to change.