Skip to main content
POST
Simulate a payment

Authorizations

Authorization
string
header
required

YuvexPay API key. Include as Authorization: Bearer ypk_<env>_<kid>_<secret> where <env> is test (sandbox) or live (production). Create and manage keys in the dashboard under Settings > API Keys.

Headers

X-Idempotency-Key
string

Optional for this endpoint. Honoured when sent — replay and payload check apply — but omitting it is not rejected.

Maximum string length: 100

Path Parameters

paymentId
string<uuid>
required

The sandbox payment ID to simulate.

Body

application/json
status
enum<string>
default:PAID

Terminal outcome to apply. Defaults to PAID when the body is empty or omitted.

Available options:
PAID,
CANCELLED,
EXPIRED,
REFUNDED,
DISPUTED

Response

The payment after the simulated transition.

payment
object