Contents
On this page

Stripe Webhook - Plugixa Stream

POST /plugixa-stream/v1/webhooks/stripe

Called by Stripe, not by your code. Add this URL as a webhook endpoint in your Stripe account and paste its signing secret under Payments: see Stripe.

Public, and the signature is the permission: each delivery is checked against the raw body with the signing secret before anything is read. An unsigned or wrongly signed delivery changes nothing.

Note. Every event is safe to receive twice. Coins are credited only by the event that moves an order from pending to paid, and an event must name the checkout the plugin opened for that order, so another site sharing the Stripe account cannot pay this site’s orders.

Request

POST https://your-site.example/wp-json/plugixa-stream/v1/webhooks/stripe

Request body

Content type: application/json

The Stripe event, as Stripe sends it, with its Stripe-Signature header. The plugin acts on checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed, customer.subscription.created, customer.subscription.updated, customer.subscription.deleted, invoice.paid, invoice.payment_failed, charge.refunded and charge.dispute.created. A refund or dispute takes the coins back, relocking episodes bought with them when they were already spent.

Responses

200 OK.

The answer is not wrapped in success and data. A verified event the plugin does not act on is answered 200 too, so Stripe stops retrying it.

{
  "received": true
}

Errors

Status Code When
400 plugixa_stream_webhook Stripe is not configured, or the signature is missing or wrong.

Plus the errors every endpoint can return.

The Payments screen shows when the last accepted and the last rejected delivery arrived.

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/stripe" \
  -H "Content-Type: application/json" \
  -H "Stripe-Signature: t=1763370000,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd" \
  --data-binary @event.json

Quick Links

Share