Skip to main content
POST
Callback Charge
Endpoint: POST https://your.endpoint.to.notifyThis is your endpoint where WEpayments will send notifications about payin status changes.

Response

You should respond with 200 OK to acknowledge receipt of the webhook.

Body

The webhook payload contains the following fields:
integer
Payin IDExample: 49339
string
Payin invoiceExample: eb21ce52-2897-475b-85af-a5201f4035bf
string
Payin end-to-endExample: END-TO-END-ID
object
Object that contains the current status of your payin.
object
This object will only be returned if the payin is rejected/canceled and the merchant is using the “Account Mismatch” functionality. It provides more details on the reason for the rejection.
string
Last update of your payin.Format: <date-time>Example: 2024-09-09T20:55:56.000000Z
object
Additional metadata about the payment.

Webhook Payload Example

Status Codes

Common payin status codes: See Payin Status Flow for detailed status information.

Status Detail Codes

When a PIX transaction is rejected/canceled, the status_detail.code field provides specific information about the rejection reason:
These codes are only returned when the payin status is Rejected/Canceled and the merchant has the “Account Mismatch” functionality enabled.

Best Practices

Always Respond 200 OK: Your endpoint must respond with HTTP 200 to acknowledge receipt.
Validate Webhook Signature: Always validate the webhook signature to ensure it’s from WEpayments. See Webhook Signature Documentation for details.
Verify paid_amount: The paid_amount field represents the actual amount paid by the customer and is important to consider for reconciliation.

Create Charge

Create PIX or Boleto charges

Status Flow

Understand payin status lifecycle

Rejection Reasons

Learn about rejection codes

Get Charge

Query charge details

Webhook Signature

Validate webhook signatures