cancel
Showing results for 
Search instead for 
Did you mean: 

PAYMENT.CAPTURE.COMPLETED webhook received, but capture is actually PENDING

Options
gtg2
Contributor
Posted on

Hello,
I have a backend integration with paypal for my shop and I've started receiving those types of webhook events:

 

 

{
  "event_version": "1.0",
  "summary": "Payment completed for $ 36.0 USD",
  "event_type": "PAYMENT.CAPTURE.COMPLETED",
  "create_time": "XXXXXXXXXXXXXXXXXXXX",
  "resource": {
    "amount": {
      "value": "36.00",
      "currency_code": "USD"
    },
    "seller_protection": {
      "dispute_categories": [
        "ITEM_NOT_RECEIVED",
        "UNAUTHORIZED_TRANSACTION"
      ],
      "status": "ELIGIBLE"
    },
    "supplementary_data": {
      "related_ids": {
        "order_id": "XXXXXXXXXXXXXXXXX"
      }
    },
    "update_time": "XXXXXXXXXXXXXXXXXXXX",
    "create_time": "XXXXXXXXXXXXXXXXXXXX",
    "final_capture": true,
    "custom_id": "XXXXXXXXXXX",
    "links": [
      {
        "rel": "self",
        "method": "GET",
        "href": "https://api.paypal.com/v2/payments/captures/XXXXXXXXXXXXXXXXX"
      },
      {
        "rel": "refund",
        "method": "POST",
        "href": "https://api.paypal.com/v2/payments/captures/XXXXXXXXXXXXXXXXX/refund"
      },
      {
        "rel": "up",
        "method": "GET",
        "href": "https://api.paypal.com/v2/checkout/orders/XXXXXXXXXXXXXXXXX"
      }
    ],
    "id": "XXXXXXXXXXXXXXXXX",
    "status": "PENDING",
    "status_details": {
      "reason": "PENDING_REVIEW"
    },
  },
  "resource_type": "capture",
  "links": [
    {
      "rel": "self",
      "method": "GET",
      "href": "https://api.paypal.com/v1/notifications/webhooks-events/WH-XXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXX"
    },
    {
      "rel": "resend",
      "method": "POST",
      "href": "https://api.paypal.com/v1/notifications/webhooks-events/WH-XXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXX/resend"
    }
  ],
  "id": "WH-XXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXX",
  "resource_version": "2.0",
  "transaction": {
    "id": "WH-XXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXX"
  }
}

 

 

Note that even though the webhook event is PAYMENT.CAPTURE.COMPLETED, the actual capture status is PENDING, with reason PENDING_REVIEW.
My expectation is that when PAYMENT.CAPTURE.COMPLETED webhook is received the capture is completed and the money are in the payee's account, but looks like that's not the case.

Is that behaviour expected and what do I miss?

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.