Skip to main content
POST
/
public
/
webhooks
Register webhook
curl --request POST \
  --url https://api.pcxpay.com/v1/public/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "endpoint_url": "https://yourapp.com/webhooks/pcx"
}
'
{
  "status": "success",
  "message": "Operation completed successfully",
  "data": {
    "webhook_id": "<string>",
    "org_id": "<string>",
    "endpoint_url": "https://yourapp.com/webhooks/pcx",
    "status": "active",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

API key issued by PCX. Pass the full key string in the X-API-Key request header. The key encodes your organisation and user identity and is verified on every request.

Body

application/json
endpoint_url
string<uri>
required

The HTTPS URL that PCX will POST transaction events to. Must be publicly reachable and return a 2xx response to acknowledge receipt.

Example:

"https://yourapp.com/webhooks/pcx"

Response

Webhook registered successfully

status
enum<string>
Available options:
success,
error
Example:

"success"

message
string
Example:

"Operation completed successfully"

data
object