Skip to content

Simulate the customer's wallet result (test keys only)

POST
/v1/payments/{id}/simulate
curl --request POST \
--url https://api.xaalis.org/v1/payments/example/simulate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "outcome": "succeeded" }'
id
required
string
Media typeapplication/json
object
outcome
required
string
Allowed values: succeeded failed

Updated payment

Media typeapplication/json
object
id
required
string
object
required
string
Allowed values: payment
livemode
required
boolean
amount
required
integer
currency
required
string
fee
required
integer
net
required
integer
status
required
string
Allowed values: requires_payment_method processing succeeded failed expired refunded
provider
required
string | null
Allowed values: wave orange_money mock stripe
client_reference
required
string | null
description
required
string | null
customer
required
object
phone
required
string | null
name
required
string | null
checkout_url
required

Hosted checkout page — redirect your customer here

string
next_action
required
Any of:
object
type
required
string
Allowed values: redirect
url
required
string
metadata
required
object
key
additional properties
string
failure_reason
required
string | null
provider_transaction_id
required
string | null
expires_at
required
string
succeeded_at
required
string | null
created_at
required
string
Example
{
"id": "pay_3k9x0c1v2b3n4m5l6k7j",
"object": "payment",
"status": "requires_payment_method",
"provider": "wave",
"next_action": {
"type": "redirect"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": "example"
}
}
RateLimit-Policy
string

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).

RateLimit
string

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.

Retry-After
string

Minimum seconds to wait before retrying. Takes precedence over the quota snapshot.