PayPal Capture payment
Last updated: 13-Mar-2024
Overview
To successfully capture a payment for an already created transaction, the buyer must first approve the order.
Note: Valid JWT Token is required to make the API call.
Required fields
There are no required fields for the Capture API.
Optional fields
- agreementId - Billing Agreement ID. Used only for reference transactions.
- description - An informational note about the capture. Appears in both the payer's transaction history and the emails that the payer receives.
- amount - The
amount
object tells the amount to capture. If not provided, full capture will be performed. In this object, the fields are:
- amount.value - Amount to capture. Always expects integer (112 will be 1.12 for USD/ EUR. For most currencies, 1000 is equal to 10; it depends on the number of digits after the decimal separator. You can see the list of all currencies here).
- amount.currencyCode - Currency code (ISO-4217)
Here is an example POST /transactions/{id}/capture request that can be used for capturing a transaction payment:
POST /transactions/{id}/capture
{
"amount" : {
"value": 52,
"currencyCode": "USD"
}
}
Note: You can make the request with an empty body. In that case, full amount will be captured.
The response for capturing transaction payment will look like this:
{
"id": "08d7c6da-f49e-41e8-bc7b-1faed116bc42",
"captureId": "7GC71528R83703259",
"createdAt": "2021-02-01T11:16:07Z",
"isFinalCapture": true,
"status": "AUTHORISED"
}
Rate this article: