# How to capture a payment

The integration supports "Authorize and Capture Payments", which reserves funds on the user's account. However, to capture them, you have to take additional actions.

# Prerequisites

To capture a payment, you need a PayPal access token. If you don't have it yet, follow the instructions in the Get PayPal access token document.

# Capture payment

# Get Capture URL

  1. Sign in to the commercetools Merchant Center and find the order you want to capture.
  2. Go to the Payments tab and scroll down to the commercetools Paypal integration payment custom type panel.
  3. Copy the value of the Capture URL field.
commercetools paypal integration panel - capture

# Send a request using Postman

Create a new request in Postman:

  1. Set the method to POST.
  2. Set the URL to the Capture URL value from the previous step.
  3. Open the Headers tab add two entries with:
    • key: Content-Type and value application/json,
    • key: Authorization and value: Bearer <TOKEN_FROM_THE_FIRST_STEP>.
  4. Click the Send button.

If you correctly configured the Webhooks, they will:

  • add a new transaction and fill the Refund URL field in the commercetools: Captured payment
  • update the order status to Paid: Paid order