API Reference
Complete reference documentation for the Yassir Payment API
Overview#
The Yassir Payment 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 Bearer Authentication using your Client ID and Client Secret encoded in Base64. See the Authentication Guide for details.
Endpoints#
Customers#
POST
/api/v1/customersBearer Token
Register a new customer by phone number (required before creating payment intents).
GET
/api/v1/customers/:idBearer Token
Retrieve customer details by ID.
GET
/api/v1/customers/search/:phoneBearer Token
Search for a customer by phone number.
Payment Methods#
GET
/api/v1/payment-methodsBearer Token
List available payment methods for a given country and amount.
Payment Intents#
POST
/api/v1/payments/intentsBearer Token
Create a new payment intent to begin the payment process.
POST
/api/v1/payments/intents/:id/proceedBearer Token
Proceed with a payment using the selected payment method.
GET
/api/v1/payments/intents/:id/checkBearer Token
Check the current status of a payment intent.
POST
/api/v1/payments/:paymentId/refundBearer Token
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.