Skip to main content

Sandbox vs Production Mode

Yabetoo provides two distinct environments for safe development and testing.

Sandbox (Test)

Test environment for development. No real transactions are made.Key prefix: sk_test_

Production (Live)

Production environment for real transactions.Key prefix: sk_live_

API Keys Configuration

Never share your secret API keys. Use environment variables to store them securely.
Create a .env file at the root of your project:
.env

Usage in Your Code

Test Phone Numbers

In sandbox mode, use these phone numbers to simulate different scenarios:
Test mode transactions don’t involve real money. You can test as much as needed.

Testing Webhooks Locally

To receive webhooks locally, use a tunneling tool like ngrok:
1

Install ngrok

2

Expose your local server

You’ll get a URL like https://abc123.ngrok.io
3

Configure the webhook in the Dashboard

Go to Settings > Webhooks and add your ngrok URL:

Verify Webhook Signatures

Always verify webhook signatures to ensure they come from Yabetoo:

Best Practices

Always implement robust error handling:
Use idempotency keys to avoid duplicates on retry:
Log all transactions for debugging:

Pre-Production Checklist

Before going live, verify:
1

Complete Testing

  • Test all payment scenarios (success, failure, pending)
  • Test webhook reception and processing
  • Test refunds and cancellations
2

Security

  • API keys stored in environment variables
  • Webhook signature verification implemented
  • HTTPS enabled on all endpoints
3

Configuration

  • Production callback URLs configured
  • Webhooks pointing to production server
  • Production keys (sk_live_) in place

Useful Resources

Postman Collection

Quickly test the API with our Postman collection

API Reference

Complete API documentation

Error Handling

List of error codes and solutions

Webhooks

Webhook configuration and management