Skip to main content
The Safefy API uses the same base URL for both Sandbox and Production environments. The active environment is determined automatically based on the type of credentials used. API URL: https://api-payment.safefypay.com.br

Creating credentials

  1. Access the Safefy panel
  2. Go to Settings API Credentials
  3. Choose the environment (Sandbox or Production) and click Generate
  4. Copy the clientSecret immediately it will not be shown again

Simulating transactions

In Sandbox, you can simulate status changes using the simulate endpoint:
Transaction simulation only works with Sandbox credentials. Using Production credentials will return an error.

Complete test flow

  1. Create a transaction POST /v1/transactions with method: "pix" and an amount
  2. Display the QR Code use the pix.copyAndPaste field to render a QR Code in your app
  3. Simulate payment call POST /v1/transactions/{id}/simulate with action: "pay"
  4. Receive the webhook your callbackUrl will receive a payment.completed event
  5. Validate confirm the transaction status is Completed

Simulating cashouts