Skip to main content
POST
/
s2s
/
webhooks
cURL
curl --request POST \
  --url https://api.xpaycheckout.com/s2s/webhooks \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://yourserver.com/webhook",
  "events": [
    "intent.status_update"
  ],
  "secret": "whsec_abc123def456"
}'
{
  "webhook_id": "wh_6Ns6Mr4wCySm8YkUTZ5u9",
  "url": "https://yourserver.com/webhook",
  "events": [
    "payment.status_update"
  ],
  "status": "ACTIVE",
  "created_at": 1728128700000
}
Configures webhook endpoints to receive payment status updates.

Supported Event Types

Event TypeDescription
payment.status_updatePayment status update (SUCCESS, FAILED, CANCELLED, REFUNDED, PARTIALLY_REFUNDED)

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json

Setup Webhook Request

url
string
required

HTTPS endpoint to receive webhooks

Example:

"https://yourserver.com/webhook"

events
enum<string>[]
required

List of event types to subscribe to

Example:
["intent.status_update"]
secret
string

Webhook signing secret (recommended)

Example:

"whsec_abc123def456"

Response

Webhook configured successfully

webhook_id
string
Example:

"wh_6Ns6Mr4wCySm8YkUTZ5u9"

url
string
Example:

"https://yourserver.com/webhook"

events
string[]
Example:
["payment.status_update"]
status
enum<string>
Available options:
ACTIVE,
INACTIVE
Example:

"ACTIVE"

created_at
integer

Epoch timestamp in milliseconds of when webhook was created

Example:

1728128700000