Quick Start
Test the full payment flow with a single API call. You need two things from your TurnStay Dashboard:
| Item | Where to find it |
|---|---|
| API Key | Dashboard > Settings > API Keys — starts with sk_test_ |
| Account ID | Dashboard > Settings > Account — an integer like 123 |
Create a test payment
Section titled “Create a test payment”curl -X POST "https://staging.turnstay.com/api/v1/payments/intent" \ -H "Authorization: Bearer sk_test_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "account_id": YOUR_ACCOUNT_ID, "billing_amount": 100000, "billing_currency": "ZAR", "checkin_date": "2026-07-15", "merchant_reference": "TEST-001", "success_redirect_url": "https://example.com/success", "failed_redirect_url": "https://example.com/failed" }'This creates a R1,000.00 ZAR test payment. Open the turnstay_payment_url from the response in your browser to see the hosted payment page.
Amounts are always in cents. R1,000 =
100000· €50 =5000· $49.99 =4999. Formula:billing_amount = display_amount × 100
Test card numbers
Section titled “Test card numbers”Use these card details in the staging environment:
| Card number | Result |
|---|---|
4242 4242 4242 4242 | Successful payment |
Use any future expiry date, any 3-digit CVC, and any cardholder name.
What happens next
Section titled “What happens next”- Open the
turnstay_payment_url— you’ll see the hosted payment page. - Enter the test card details above and complete the payment.
- Your
success_redirect_urlreceives the customer after payment. - If you set a
callback_url, your server receives a POST notification.
Ready for production?
Section titled “Ready for production?”Swap staging.turnstay.com → prod.turnstay.com and sk_test_ → sk_live_. That’s it.