Create a payment
const url = 'https://api.xaalis.org/v1/payments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"amount":15000,"currency":"XOF","provider":"wave","description":"example","client_reference":"example","customer":{"phone":"+221771234567","name":"example"},"success_url":"https://example.com","cancel_url":"https://example.com","metadata":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.xaalis.org/v1/payments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "amount": 15000, "currency": "XOF", "provider": "wave", "description": "example", "client_reference": "example", "customer": { "phone": "+221771234567", "name": "example" }, "success_url": "https://example.com", "cancel_url": "https://example.com", "metadata": { "additionalProperty": "example" } }'Returns a hosted checkout_url. If provider is set, next_action is ready immediately. Live Wave payments require an aggregated merchant identity when aggregator mode is enabled.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters”Retry-safe key; reuse it when retrying the same request
Retry-safe key; reuse it when retrying the same request
Request Bodyrequired
Section titled “Request Bodyrequired”object
Integer XOF
Example
15000Skip the hosted method picker and start this provider immediately
Your order id
object
Example
+221771234567object
Responses
Section titled “ Responses ”Payment created
object
object
Hosted checkout page — redirect your customer here
object
Example
{ "id": "pay_3k9x0c1v2b3n4m5l6k7j", "object": "payment", "status": "requires_payment_method", "provider": "wave", "next_action": { "type": "redirect" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Validation error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Authentication error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Not found
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Merchant needs a Wave aggregated identity
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Rate limited; see Retry-After response header
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Headers
Section titled “Headers”Present after quota evaluation: structured list of policy labels with q=request allowance and w=rolling-window seconds (IETF draft-ietf-httpapi-ratelimit-headers-11).
Present after quota evaluation: matching policy labels with r=remaining requests and t=effective-window seconds. Snapshot, not a guarantee; omitted when no quota was evaluated.
Minimum seconds to wait before retrying. Takes precedence over the quota snapshot.