Skip to main content
POST
/
v1
/
transactions
/
{transactionId}
/
simulate
Simular transacao (Sandbox)
curl --request POST \
  --url https://api-payment.safefypay.com.br/v1/transactions/{transactionId}/simulate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "action": "complete"
}
'
{
  "data": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "status": "Completed",
    "simulatedAction": "complete",
    "completedAt": "2025-01-15T15:10:00Z",
    "refundedAt": null,
    "pix": {
      "txId": "SAFEFY2025011512345678901234",
      "qrCode": null,
      "copyAndPaste": null,
      "expiresAt": null
    }
  },
  "message": "Transacao simulada com sucesso.",
  "error": null
}
This endpoint is only available in the Sandbox environment. It does not work with Production credentials.
Simulates a status change for a transaction, allowing you to test your integration without real payments.
Simulating a status change triggers webhooks normally. If the transaction has a callbackUrl, the corresponding webhook will be delivered.

Authorizations

Authorization
string
header
required

Token JWT obtido via /v1/auth/token

Path Parameters

transactionId
string<uuid>
required

ID da transacao

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

Body

application/json
action
enum<string>
required

Acao a simular

Available options:
complete,
expire,
fail,
refund
Example:

"complete"

Response

Simulacao realizada

data
object
message
string | null
error
object