Skip to content

Webhook payload does not include status field, unlike GET /payments/{id} response #368

Description

@Masumrahmanhasan

Description

Webhook events do not include the payment status field in their payload, whereas the GET /payments/{id} (getPaymentDetails) API response includes status for the same payment. This makes it impossible to determine the payment's state from the webhook alone and forces an extra API call for reconciliation.

Expected behavior

The webhook payload should include the payment status field, consistent with the GET /payments/{id} response (e.g. Authorized, Captured, Refunded), or its omission should be explicitly documented.

Current behavior

Example webhook payload:

{
  "id": "pay_...",
  "type": "payment_captured",
  "source": { "id": "src_...", "type": "card", "last_4": "0018" }
}

Note: no status field at the top level.

Example GET /payments/{id} response for the same payment:

{
  "id": "pay_...",
  "status": "Captured",
  "source": { "id": "src_...", "type": "card", "last4": "0018" }
}

Note: status is present.

Steps to reproduce

  1. Create a card payment.
  2. Receive the webhook event for that payment.
  3. Call GET /payments/{id} for the same payment.
  4. Compare the two payloads — the webhook lacks status.

Additional information

Related: #297 (also reports the last_4 vs last4 field naming inconsistency between webhooks and API responses).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions