How it works
At Safefy, there is no separate URL for Sandbox and Production. The environment is determined by the API credential type you use.| Credential type | Environment | Behavior |
|---|---|---|
| Sandbox | Testing | Simulated payments, fictitious balance |
| Production | Live | Real PIX transactions |
https://api-payment.safefypay.com.br
The same URL is used for both environments. What changes is the credential used for authentication.
Creating credentials
In the Safefy dashboard, you can create credentials for each environment:1
Access the dashboard
Go to app.safefypay.com.br and select your organization.
2
Go to Credentials
In the side menu, open the API credentials section.
3
Create the credential
Choose Sandbox for tests or Production for live transactions.
4
Save the Client Secret
The Client Secret is shown only once. Store it safely.
Simulating payments
In Sandbox, you can simulate different transaction statuses using the simulation endpoint:Available actions
| Action | Current status | New status | Description |
|---|---|---|---|
complete | Pending | Completed | Simulates a confirmed payment |
expire | Pending | Expired | Simulates expiration |
fail | Pending | Failed | Simulates failure |
refund | Completed | Refunded | Simulates a refund |
Full test flow
1
Create a transaction
Use Sandbox credentials to create a PIX transaction.
2
Show the QR Code
Display the qrCode or copyAndPaste in your interface.
3
Simulate the payment
Use the /simulate endpoint with action: complete.
4
Receive the webhook
Your callbackUrl will receive the transaction.completed event.
5
Validate the flow
Check that your application released the product/service correctly.
Simulating cashouts
You can also simulate cashout processing:| Action | Description |
|---|---|
Complete | Simulates a completed cashout |
Fail | Simulates a cashout failure |
Reject | Simulates a rejected cashout |
Test data
In Sandbox, you can use any valid data to create transactions and customers:Going to Production
When your integration is ready:- Create a Production credential in the dashboard
- Replace the Client ID and Client Secret in your system
- Remove calls to the /simulate endpoint
- Test with low-value transactions first
Create a test transaction
Try creating a transaction in the playground.