TigerPayDevelopers API v1 tigerpay.app

Guides

Testing

Test mode lets you build and check your whole integration without moving real money. It works the same way as live mode, with separate keys and separate data.

How test mode works#

Test modeLive mode
API keysk_test_…sk_live_…
Real moneyNoYes
AvailableAs soon as you have an accountAfter TigerPay has verified your business and website and enabled live payments
Payment pagesTigerPay's sandbox. The checkout_url can be on a test host.pay.tigerpay.app
livemode fieldfalsetrue
Webhook endpointsTest endpoints, with their own whsec_ secretLive endpoints, with their own whsec_ secret
DataTest payments and refunds onlyLive payments and refunds only
  • The API, the rules for each field, the errors and the rate limit are the same in both modes.
  • A test key never sees live payments, and a live key never sees test payments. Looking up a test payment with a live key gives resource_missing.
  • Never hard-code the host of checkout_url. Redirect to whatever string the API returns.

Test cards#

To pay a test payment you need test card details. They are not published in these docs. You can find them in your TigerPay dashboard, or ask TigerPay support. Do not use a real card in test mode.

What to test#

Go through this list in test mode before you go live.

CaseHowWhat you should see
Successful paymentCreate a payment and pay on the test checkout page.A payment.succeeded webhook. Your order is marked paid once.
Customer leaves without payingCreate a payment and close the page.The payment stays pending. Your order must not be marked paid. Later it becomes expired.
Return pageOpen the checkout page and come back without paying.Your success_url page shows the real status, not "thank you".
CancelCall POST /v1/payments/{id}/cancel on a pending payment.A payment.cancelled webhook.
Declined paymentAsk support for a card that fails.A payment.failed webhook. The customer can try again.
Partial and full refundRefund part of a succeeded payment, then the rest.refund.succeeded webhooks and amount_refunded going up.
Too much refundedRefund more than was paid.Error refund_exceeds_remaining.
Webhook retriesMake your endpoint answer 500 once.The same event comes again after about a minute.
Duplicate eventsReplay the same webhook body twice.Your order is only updated once.
Bad signatureSend a webhook with a wrong signature.Your endpoint answers 400 and changes nothing.
Amount checkChange the order total after you created the payment.Your code spots the mismatch and does not fulfil the order.

Testing webhooks on your own computer#

TigerPay only calls public https addresses, so localhost will not work. Use a tunnelling tool that gives your local server a public https address, and add that address as a test webhook endpoint. The dashboard can also send a test event (webhook.test) to an endpoint so you can check your signature code.

Going live#

  1. Ask TigerPay to enable live payments. We check your business details and your website first. Live keys do not work until this is done and return live_mode_not_enabled.
  2. Create a live key (sk_live_…) and put it in your production settings. Keep it out of your code.
  3. Add a live webhook endpoint in the dashboard and save its whsec_ secret in production.
  4. Check that your site uses https, including your success_url.
  5. Make one small real payment and refund it to check the whole flow.
  6. Switch off or remove the test keys from production.