Simulate the customer's wallet result (test keys only)
POST
/v1/payments/{id}/simulate
const url = 'http://localhost:4000/v1/payments/example/simulate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"outcome":"succeeded"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:4000/v1/payments/example/simulate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "outcome": "succeeded" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
outcome
required
string
Responses
Section titled “ Responses ”Updated payment
Media typeapplication/json
object
id
required
string
object
required
string
livemode
required
boolean
amount
required
integer
currency
required
string
fee
required
integer
net
required
integer
status
required
string
provider
required
string | null
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
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" }}Validation error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Authentication error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}Not found
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
Examplegenerated
{ "error": { "code": "example", "message": "example", "details": "example" }}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" }}