Skip to main content
WEBHOOK
payment.created
{
  "id": "msg_xxxxxxxxxxxxxxxxxxxxxxxx",
  "api_version": "v1",
  "timestamp": "2025-01-01T00:00:00.000Z",
  "type": "payment.created",
  "data": {
    "id": "pay_xxxxxxxxxxxxxx",
    "status": "draft",
    "substatus": "succeeded",
    "refundable": true,
    "retryable": true,
    "voidable": true,
    "created_at": "2023-12-01T05:00:00.401Z",
    "paid_at": "2023-12-01T05:00:00.401Z",
    "last_payment_attempt": "2023-12-01T05:00:00.401Z",
    "next_payment_attempt": "2023-12-01T05:00:00.401Z",
    "dispute_alerted_at": "2023-12-01T05:00:00.401Z",
    "refunded_at": "2023-12-01T05:00:00.401Z",
    "plan": {
      "id": "plan_xxxxxxxxxxxxx"
    },
    "product": {
      "id": "prod_xxxxxxxxxxxxx",
      "title": "Pickaxe Analytics",
      "route": "pickaxe-analytics"
    },
    "user": {
      "id": "user_xxxxxxxxxxxxx",
      "name": "John Doe",
      "username": "johndoe42",
      "email": "john.doe@example.com"
    },
    "membership": {
      "id": "mem_xxxxxxxxxxxxxx",
      "status": "trialing"
    },
    "member": {
      "id": "<string>",
      "phone": "<string>"
    },
    "payment_method": {
      "id": "payt_xxxxxxxxxxxxx",
      "created_at": "2023-12-01T05:00:00.401Z",
      "payment_method_type": "acss_debit",
      "card": {
        "brand": "mastercard",
        "last4": "4242",
        "exp_month": 42,
        "exp_year": 42
      }
    },
    "company": {
      "id": "biz_xxxxxxxxxxxxxx",
      "title": "<string>",
      "route": "<string>"
    },
    "promo_code": {
      "id": "promo_xxxxxxxxxxxx",
      "code": "<string>",
      "amount_off": 6.9,
      "base_currency": "usd",
      "promo_type": "percentage",
      "number_of_intervals": 42
    },
    "currency": "usd",
    "total": 6.9,
    "subtotal": 6.9,
    "usd_total": 6.9,
    "refunded_amount": 6.9,
    "auto_refunded": true,
    "amount_after_fees": 6.9,
    "application_fee": {
      "id": "apfee_xxxxxxxxxxxx",
      "amount": 6.9,
      "amount_captured": 6.9,
      "amount_refunded": 6.9,
      "currency": "usd",
      "created_at": "2023-12-01T05:00:00.401Z"
    },
    "card_brand": "mastercard",
    "card_last4": "4242",
    "billing_address": {
      "name": "<string>",
      "line1": "<string>",
      "line2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal_code": "<string>",
      "country": "<string>"
    },
    "payment_method_type": "acss_debit",
    "billing_reason": "subscription_create",
    "payments_failed": 42,
    "failure_message": "<string>",
    "metadata": {},
    "financing_installments_count": 42,
    "financing_transactions": [
      {
        "id": "ptx_xxxxxxxxxxxxxx",
        "amount": 6.9,
        "status": "succeeded",
        "created_at": "2023-12-01T05:00:00.401Z",
        "transaction_type": "purchase"
      }
    ],
    "disputes": [
      {
        "id": "dspt_xxxxxxxxxxxxx",
        "amount": 6.9,
        "currency": "usd",
        "status": "warning_needs_response",
        "editable": true,
        "needs_response_by": "2023-12-01T05:00:00.401Z",
        "reason": "Product Not Received",
        "notes": "Customer used the product for 3 months before disputing."
      }
    ],
    "resolutions": [
      {
        "id": "reso_xxxxxxxxxxxxx",
        "status": "merchant_response_needed",
        "due_date": "2023-12-01T05:00:00.401Z",
        "issue": "forgot_to_cancel",
        "customer_appealed": true,
        "merchant_appealed": true,
        "customer_response_actions": [
          "respond"
        ],
        "merchant_response_actions": [
          "accept"
        ],
        "platform_response_actions": [
          "request_buyer_info"
        ]
      }
    ]
  },
  "company_id": "biz_xxxxxxxxxxxxxx"
}

Headers

webhook-id
string
required

A unique identifier for this webhook request

Example:

"msg_xxxxxxxxxxxxxxxxxxxxxxxx"

webhook-signature
string
required

The signature of the webhook request with the webhook version prepended

Example:

"v1,BASE64ENCODEDSIGNATURE"

webhook-timestamp
string
required

The timestamp in seconds since the Unix epoch that the webhook was sent at on the server

Example:

"1727606400"

Body

application/json
id
string
required

A unique ID for every single webhook request

Example:

"msg_xxxxxxxxxxxxxxxxxxxxxxxx"

api_version
string
required

The API version for this webhook

Allowed value: "v1"
Example:

"v1"

timestamp
string<date-time>
required

The timestamp in ISO 8601 format that the webhook was sent at on the server

Example:

"2025-01-01T00:00:00.000Z"

type
string
required

The webhook event type

Allowed value: "payment.created"
Example:

"payment.created"

data
object
required

A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.

company_id
string | null

The company ID that this webhook event is associated with

Example:

"biz_xxxxxxxxxxxxxx"

Response

200

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