Skip to main content
POST
/
v1
/
cashouts
/
{id}
/
simulate
Simular saque (Sandbox)
curl --request POST \
  --url https://api-payment.safefypay.com.br/v1/cashouts/{id}/simulate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "action": 1
}'
{
  "data": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
    "externalId": "saque_001",
    "amount": 50000,
    "fee": 200,
    "netAmount": 49800,
    "currency": "BRL",
    "status": "Completed",
    "environment": "Sandbox",
    "pix": {
      "pixKeyType": "CPF",
      "pixKey": "***456789**",
      "endToEndId": "E12345678202501151600xyz789abc012",
      "acquirerTransactionId": "SANDBOX_TXN_001"
    },
    "requestedAt": "2025-01-15T16:00:00Z",
    "processedAt": "2025-01-15T16:02:00Z",
    "completedAt": "2025-01-15T16:05:00Z",
    "failureReason": null,
    "createdAt": "2025-01-15T16:00:00Z"
  },
  "message": "Saque simulado 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 cashout, allowing you to test your integration without a real bank transfer.
Simulating a status change triggers webhooks normally. If the cashout has a callbackUrl, the corresponding webhook will be delivered.

Authorizations

Authorization
string
header
required

Token JWT obtido via /v1/auth/token

Path Parameters

id
string<uuid>
required

ID do saque

Example:

"b2c3d4e5-f6a7-8901-bcde-f23456789012"

Body

application/json
action
enum<integer>
required

Acao: 1=Complete, 2=Fail, 3=Reject

Available options:
1,
2,
3
Example:

1

Response

Simulacao realizada

data
object
message
string | null
error
object