Skip to main content
POST
https://your.endpoint.to.notify
Callback Payment
curl --request POST \
  --url https://your.endpoint.to.notify/ \
  --header 'Authorization: Bearer <token>'
{
  "id": 123,
  "invoice": "<string>",
  "end_to_end": "<string>",
  "status": {
    "id": 123,
    "name": "<string>"
  },
  "updated_at": "<string>",
  "status_detail": {
    "code": "<string>",
    "detail": "<string>"
  }
}

Callbacks

Receive updates about your payout.

Payout

Endpoint: POST https://your.endpoint.to.notifyThis is your endpoint where WEpayments will send notifications about payout status changes.

Response

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

Body

The webhook payload contains the following fields:
id
integer
Payout IDExample: 2322977
invoice
string
Payout invoiceExample: 575e8327-f145-48ff-b207-737eef2d6f3f
end_to_end
string
Payout end-to-endExample: END-TO-END-ID
status
object
Object that contains the current status of your payout.
updated_at
string
Last update of your payout.Format: <date-time>Example: 2024-09-25 15:55:18
status_detail
object
This object will only be returned if the payout is canceled and the merchant is using the “Account Mismatch” functionality. It provides more details on the reason for the cancellation.

Webhook Payload Example

{
  "id": 2322977,
  "invoice": "575e8327-f145-48ff-b207-737eef2d6f3f",
  "status": {
    "id": 6,
    "name": "Cancelled"
  },
  "updated_at": "2024-09-25 15:55:18",
  "status_detail": {
    "code": "WE0001",
    "detail": "The payment was made to an unregistered account"
  }
}

Status Codes

Common payout status codes:
Status IDStatus NameDescription
1CreatedPayout has been created
2ProcessingPayout is being processed
3PaidPayout has been paid successfully
4FailedPayout failed
5RejectedPayout rejected by compliance
6CancelledPayout was cancelled

Best Practices

Always Respond 200 OK: Your endpoint must respond with HTTP 200 to acknowledge receipt. Otherwise, WEpayments will retry sending the webhook.
Validate Webhook Signature: In production, always validate the webhook signature to ensure it’s from WEpayments. See Webhook Signature Documentation for details.
Process Asynchronously: Handle webhook processing asynchronously to respond quickly and avoid timeouts.
If the API returns a Canceled, Failed, or Rejected status, a new invoice must be generated. These statuses indicate that the record has already been processed and persisted in our database, preventing any modifications or retries using the same identifier.
Re-submission Policy: INVALID_DATA: You may resubmit the same payload in a new request only if the payment status is INVALID_DATA. This status occurs when banking details are incorrect (provided validation is enabled for the merchant). Other Statuses: All other statuses will trigger a duplication block if an invoice with the same data already exists.