Overview
Use the Payment Gateway API when you build your own checkout or backend.
1. Get your API key
Sign in to your PlasBit Merchant account and copy your API key. See Create an API Key.
2. Pick an environment
| Environment | Base URL |
|---|---|
| Sandbox | https://api-test.plasbit.com |
| Production | https://api.plasbit.com |
Start in sandbox. See Environments for details.
3. Authenticate
Send the API key on every request:
Authorization: Bearer YOUR_API_KEY
Full details: Authentication.
4. Create a payment
POST /v1/payments
You receive a checkout URL for the customer. Details: Create Payment.
5. Handle the return and status
- Customer pays, then returns to your redirect URL.
- PlasBit notifies your callback URL (server-to-server).
- Optionally poll Payment Status with the payment ID.
6. Handle errors
Use standard HTTP status codes and the JSON error body. See Errors.
tip
Test the full loop in sandbox before switching your base URL to production.