Skip to content

Quick Start

Test the full payment flow with a single API call. You need two things from your TurnStay Dashboard:

ItemWhere to find it
API KeyDashboard > Settings > API Keys — starts with sk_test_
Account IDDashboard > Settings > Account — an integer like 123
Terminal window
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

Use these card details in the staging environment:

Card numberResult
4242 4242 4242 4242Successful payment

Use any future expiry date, any 3-digit CVC, and any cardholder name.

  1. Open the turnstay_payment_url — you’ll see the hosted payment page.
  2. Enter the test card details above and complete the payment.
  3. Your success_redirect_url receives the customer after payment.
  4. If you set a callback_url, your server receives a POST notification.

Swap staging.turnstay.comprod.turnstay.com and sk_test_sk_live_. That’s it.