Skip to main content
WEBHOOK
payment_session.completed
{
  "id": "wh_e5cf73f1b3e4451c8c474fe56bfc688d",
  "type": "payment_session.completed",
  "data": {
    "id": "ps_VA89irX3GdualA",
    "type": "one_time",
    "amount": 100,
    "currency": "usd",
    "customer_id": "cus4VQUfZlXuO8Xpt",
    "payment_method_id": "pmtizWG6Vcvy4VYiU",
    "payment_id": "pay_87C7PAP35KcdpzAgckBvB",
    "payment_status": "paid",
    "status": "completed",
    "session_url": "https://merchant.com/payment",
    "metadata": {
      "subscription_plan": "premium"
    },
    "external_reference": "ext_xyz789",
    "created_at": "2025-01-05T12:00:00Z",
    "updated_at": "2025-01-05T12:05:00Z"
  }
}

Body

application/json

Represents an occurrence in the system that triggers the webhook, containing an identifier, event type, and relevant data.

id
string
required

A unique identifier for the event.

type
string
required

The type of event that triggered the webhook, for example, 'payment_session.created'.

Example:

"payment_session.updated"

data
object
required

Contains the actual payload. The payload can be a different object depending on the event type. For example, for payment_session.* events, the payload will always be the payment_session object.

Response

200

Return a 200 status to indicate that the data was received successfully