Kepper Developers

Accept payments

Testing

Test keys give you a full sandbox. Payments behave like live ones, but no money moves and nothing reaches a bank.

Test mode (sk_test_)Live mode (sk_live_)
Card paymentscheckoutUrl opens the Kepper sandbox checkoutcheckoutUrl opens the secure card checkout
Bank transfersReturns a sandbox account (Kepper Sandbox Bank). Don't send money to it.Returns a real one-time account
Completing a paymentSandbox checkout page, or the simulate endpointThe customer pays
WebhooksSent to your test webhook URL, with livemode: falseSent to your live webhook URL
Your walletNever creditedCredited with the net amount

Card payments in the sandbox

Open the checkoutUrl and choose Simulate successful payment or Simulate expiry. You're then sent back to your callbackUrl, the same as in live mode.

Simulate a payment from code

This is useful for automated tests and for bank transfers. It works only with test keys.

cURL
curl https://api.kepperhq.com/v2/gateway/payments/order_1001/simulate \
  -H "Authorization: Bearer $KEPPER_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "successful" }'

status is successful or expired. The matching webhook is sent straight away.

Before you go live

  • You fulfil orders only from a verified webhook, or from a server-side fetch showing successful.
  • Your webhook handler rejects bad signatures and old timestamps, and ignores duplicate event.ids.
  • You check that amount and reference match your order before fulfilling it.
  • You handle payment.expired by releasing stock or cancelling the order.
  • Retrying a create with the same reference doesn't create a second order on your side.
  • Your live key is in a secrets store and restricted to your servers' IP addresses.

When you're ready, contact Kepper support to enable live payments for your business.

Testing | Kepper Developers