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#

EnvironmentURL
Sandboxhttps://stg-api.payment.yassir.io
Productionhttps://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#

View full Customers API reference

POST/api/v1/customers
Bearer Token
Register a new customer by phone number (required before creating payment intents).
GET/api/v1/customers/:id
Bearer Token
Retrieve customer details by ID.
GET/api/v1/customers/search/:phone
Bearer Token
Search for a customer by phone number.

Payment Methods#

View full Payment Methods API reference

GET/api/v1/payment-methods
Bearer Token
List available payment methods for a given country and amount.

Payment Intents#

View full Payment Intents API reference

POST/api/v1/payments/intents
Bearer Token
Create a new payment intent to begin the payment process.
POST/api/v1/payments/intents/:id/proceed
Bearer Token
Proceed with a payment using the selected payment method.
GET/api/v1/payments/intents/:id/check
Bearer Token
Check the current status of a payment intent.
POST/api/v1/payments/:paymentId/refund
Bearer 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.

CodeDescription
200Success
201Resource created
400Bad request - invalid parameters
401Unauthorized - invalid or missing credentials
404Resource not found
429Too many requests - rate limit exceeded
500Internal server error

See the Error Codes page for a complete list of application-specific error codes.