Contents
PayPal Webhook - Plugixa Stream
POST /plugixa-stream/v1/webhooks/paypal
Called by PayPal, not by your code. Add this URL as a webhook in your PayPal app and paste the webhook ID under Payments: see PayPal.
Public, and the signature is the permission: each delivery is checked with PayPal’s own verify-webhook-signature API before anything is read. An unverified delivery changes nothing.
Note. Every event is safe to receive twice, and the PayPal return and this webhook can both report one capture: coins are credited once.
Request
POST https://your-site.example/wp-json/plugixa-stream/v1/webhooks/paypal
Request body
Content type: application/json
The PayPal event, as PayPal sends it, with its PAYPAL-* signature headers. The plugin acts on PAYMENT.CAPTURE.COMPLETED, PAYMENT.CAPTURE.DENIED, PAYMENT.CAPTURE.REFUNDED, PAYMENT.CAPTURE.REVERSED, BILLING.SUBSCRIPTION.ACTIVATED, BILLING.SUBSCRIPTION.UPDATED, BILLING.SUBSCRIPTION.CANCELLED, BILLING.SUBSCRIPTION.SUSPENDED, BILLING.SUBSCRIPTION.EXPIRED and PAYMENT.SALE.COMPLETED.
Responses
200 OK.
The answer is not wrapped in success and data.
{
"received": true
}
Errors
| Status | Code | When |
|---|---|---|
400 |
plugixa_stream_webhook |
PayPal is not configured, or PayPal did not verify the delivery. |
Plus the errors every endpoint can return.
Examples
# What the gateway sends. Without a valid signature the answer is 400.
curl -s -X POST "https://your-site.example/wp-json/plugixa-stream/v1/webhooks/paypal" \
-H "Content-Type: application/json" \
-H "PAYPAL-TRANSMISSION-ID: 8e1a3c40-c3f5-11f0-9f1b-1b2f2a1e7c11" \
--data-binary @event.json
Quick Links
Share