API Reference
Complete reference documentation for the Yassir Payment Gateway API
Overview
The Yassir Payment Gateway API is organized around REST principles. It accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes and authentication.
Base URLs
| Environment | URL |
|---|---|
| Sandbox | https://stg-api.payment.yassir.io |
| Production | https://api.payment.yassir.io |
Authentication
All API requests require Basic Authentication using your Client ID and Client Secret. See the Authentication Guide for details.
Endpoints
Payment Methods
GET
/payment-methodsBasic Auth
List available payment methods for a given country and amount.
Payment Intents
POST
/payments/intentsBasic Auth
Create a new payment intent to begin the payment process.
POST
/payments/intents/:id/proceedBasic Auth
Proceed with a payment using the selected payment method.
GET
/payments/intents/:id/checkBasic Auth
Check the current status of a payment intent.
POST
/payments/:paymentId/refundBasic Auth
Refund a completed payment, either fully or partially.
Errors
The API uses standard HTTP response codes to indicate the success or failure of requests.
| Code | Description |
|---|---|
200 | Success |
201 | Resource created |
400 | Bad request - invalid parameters |
401 | Unauthorized - invalid or missing credentials |
404 | Resource not found |
429 | Too many requests - rate limit exceeded |
500 | Internal server error |
See the Error Codes page for a complete list of application-specific error codes.