How It Works
- Configure your callback URL when creating the credit card charge using the
callbackUrlparameter - Receive notifications automatically when transaction status changes
- Process the payload containing the complete transaction details
- Return a 200 OK response to acknowledge receipt
Setting Up Webhooks
To receive webhook notifications for credit card transactions, include thecallbackUrl parameter when creating a charge:
Webhook Payload
When a credit card transaction status changes, you’ll receive a POST request with the following data:Response Fields
Unique charge identifier
Unique key for payment page access
Your client ID in the WEpayments system
Your registered company name
Name of the customer making the purchase
Customer’s document number (CPF/CNPJ)
Customer’s email address
Your custom reference number for this transaction
WEpayments internal transaction number
Current transaction status
Payment method type - will be
"credit-card" for credit card transactionsTransaction amount in cents
Amount actually paid in cents (null if not yet paid)
Timestamp when payment was confirmed (ISO 8601 format)
Transaction expiration timestamp (ISO 8601 format)
Transaction creation timestamp (ISO 8601 format)
Array of status changes with timestamps
Refund configuration mode
Total amount refunded in cents
Array of refund records if any refunds were processed
Additional status information if applicable
Example Payload
Webhook Endpoint Requirements
Your webhook endpoint must:- Accept POST requests - All webhook notifications are sent via POST
- Use HTTPS - Only secure HTTPS URLs are accepted
- Return 200 OK - Respond with a 200 status code within 5 seconds
- Be publicly accessible - The endpoint must be reachable from the internet
Common Status Updates
You’ll receive webhook notifications for these status changes:- Created → Transaction initiated
- Paid → Payment successfully processed
- Rejected → Payment declined (see Rejection Status for details)
- Refunded → Payment refunded to customer
- Canceled → Transaction canceled

