Developers
Payments API without the archaeology
Predictable REST resources, idempotency on every write, signed webhooks and a sandbox that fails the way production fails.
Quickstart
Authenticate, create a payment, listen for the webhook.
- Authenticate with a secret key scoped to live or sandbox.
- Create with an Idempotency-Key — never double-charge.
- Listen to signed webhooks retried for 24 hours.
curl https://api.goopay.co.uk/v1/payments \ -H "Authorization: Bearer sk_test_..." \ -H "Idempotency-Key: ord_88421" \ -d amount=4250 \ -d currency=GBP \ -d source=tok_visa \ -d capture=true
import GooPay from '@goopay/node'; const goopay = new GooPay(process.env.GOOPAY_SECRET_KEY); const payment = await goopay.payments.create({ amount: 4250, currency: 'GBP', source: 'tok_visa', capture: true }, { idempotencyKey: 'ord_88421' });
Resources
Consistent list, retrieve, create — update and cancel where it makes sense.
| Resource | What it is | Operations |
|---|---|---|
/v1/payments | Authorisation and capture | create · retrieve · capture · cancel |
/v1/refunds | Full or partial reversal | create · retrieve · list |
/v1/payment_links | Shareable remote payment | create · retrieve · expire |
/v1/checkout_sessions | Hosted checkout | create · retrieve |
/v1/branches | Location with its own balance | list · retrieve · create |
/v1/payouts | Balance to bank | create · retrieve · list |
Webhooks
HMAC-SHA256 over raw body + timestamp. Retried with backoff for 24 hours.
payment.succeeded | Authorised and captured |
payment.failed | Declined with issuer code |
payment.refunded | Fully or partially reversed |
payment_link.paid | Link completed |
payout.paid | Funds reached the bank |
dispute.opened | Chargeback raised |
Sandbox & test cards
Build the decline path before go-live.
| Card | Result | Use for |
|---|---|---|
4242 4242 4242 4242 | Approved | Happy path |
4000 0000 0000 0002 | Declined | Generic decline |
4000 0000 0000 3220 | 3DS challenge | Auth flow |
Ready to get to the good stuff?
Tell us how you take payments. We’ll get SoftPOS, branches and settlement live — fast.