Capturing a transaction
About late capture#
By default, a charge created with auto_capture: true is authorized and captured automatically. When created with auto_capture: false, the amount is only reserved in the customer's wallet (authorization without capture) and must be captured in a second call.
Use this flow when you need to confirm the exact purchase amount after authorization — for example, in cases with variable shipping costs.
Attention
Transactions in authorized state (awaiting capture) must be captured within 6 days. After this period, the transaction automatically moves to EXPIRED and the reservation is released.
Endpoint#
Request example#
Body parameters#
| Field | Type | Required | Description |
|---|---|---|---|
transaction_id | string | Yes* | Transaction identifier generated by PicPay at the time of the charge |
reference_id | string | Yes* | Unique transaction identifier generated by the partner |
value | number | Yes | Amount in BRL to be captured. Can be less than or equal to the authorized amount |
*At least one of the identifiers (transaction_id or reference_id) must be provided.
Successful response#
HTTP 204 No Content indicates the capture was successful. The response body is empty. The transaction moves from AUTHORIZED to PAID.
Possible errors#
business_code | HTTP | Description |
|---|---|---|
TRANSACTION_CANT_BE_CAPTURED | 409 | Current status does not allow capture (already captured, canceled, or expired) |
CAPTURED_INVALID_VALUE | 422 | Invalid amount (e.g., greater than the authorized amount) |
TRANSACTION_NOT_FOUND | 404 | Transaction not found |