Appearance
Introduction
The Spayon Payment Gateway API enables vendors to accept payments securely and efficiently. This guide covers everything a full-stack developer needs: authentication, session creation, callback handling, signature verification, and admin panel configuration.
Environments
Spayon provides two completely isolated environments. Use Sandbox for development and testing — credentials and data are never shared with Production. Sandbox runs on the same host as Production, under the /api/sandbox path; see Sandbox Overview.
| Component | Production | Sandbox |
|---|---|---|
| Admin Panel | admin.spayon.io | admin.spayon.io in Sandbox mode |
| API Base URL | api.spayon.io/api | api.spayon.io/api/sandbox/vendor |
| Protocol | HTTPS only | HTTPS only |
| Data Format | JSON | JSON |
| API Version | Unversioned | Unversioned |
Sandbox is isolated
Sandbox credentials are completely separate from Production. They cannot be used interchangeably. Do not use the Sandbox environment for live transactions.
How It Works
The integration follows a straightforward flow:
- Your server authenticates and receives a Bearer token
- Your server creates a payment session for a specific product and customer
- You redirect the user to the hosted Spayon payment page
- After payment, Spayon calls back your server with the result (signed with HMAC-SHA256)
- The user is redirected to your Return URL
See Integration Flow for the full step-by-step breakdown.