Capture a Payment
The capture service enables you to capture the entire authorized amount or part of the
authorized amount. Klarna supports multiple capture requests when the total amount of
all captures is less than the authorized amount.
You can capture an authorization for up to 28 days after a payment is authorized.
Endpoints
Set the
apCaptureService_run
field to
true
, and send the request to one of these
endpoints:Production:
https://ics2ws.ic3.com/commerce/1.x/transactionProcessor
Test:
https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor
Response Statuses
The capture service responds with one of these statuses as the
apCaptureReply_status
response field value:- FAILED: The capture request is not successful. Send a new capture request. A failed request can be due to either Klarna rejecting the transaction or a technical error.
- PENDING: The capture request is accepted but is not captured. Request the check status service to retrieve status updates. For more information, see Check Status.
The capture service also responds with a reason code as the
apCaptureReply_reasonCode
field value. For more
information on reason codes, see the Reason Codes for the Simple Order
API.When you send a check status request for a pending capture, you can receive this
status when the status updates:
- CHARGEBACK: The customer submitted a payment dispute for the purchase, and Klarna reviewed and approved a chargeback to the customer. For more information about chargebacks, see Klarna Chargebacks.
- SETTLED: The capture request is settled for the requested amount.
Required Fields for a Capture
- Set to the request ID included in the authorization response.
- Set totrue.
- Set toKLI.
Optional Fields for a Capture
Choose from these optional fields to include additional information when capturing a
payment.
- Replace the#character with the number0for the first item and consecutive numbers for any additional items.
- Replace the#character with the number0for the first item and consecutive numbers for any additional items.
- Replace the#character with the number0for the first item and consecutive numbers for any additional items.
- Replace the#character with the number0for the first item and consecutive numbers for any additional items.
XML Example: Capture
Request
123456789101112<="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantID>test_merchant</merchantID> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <purchaseTotals> <currency>USD</currency> <grandTotalAmount>154.50</grandTotalAmount> </purchaseTotals> <apPaymentType>KLI</apPaymentType> <apCaptureService run="true"> <authRequestID>6957570615206883603012</authRequestID> </apCaptureService> </>
Response
1234567891011121314151617181920<:c="urn:schemas-cybersource-com:transaction-data-1.213"> <merchantReferenceCode>refnum-1234</merchantReferenceCode> <requestID>6957576170986768803011</requestID> <decision>ACCEPT</decision> <reasonCode>100</reasonCode> <requestToken>AxjnrwSTeSvECLGs0aTD/6IZYjWmrWbZoV7NKCojmjMTOvSB3i0ZiwyaSZejFlof+k3krsEu93k+yRAAAy04</requestToken> <purchaseTotals> <currency>USD</currency> </purchaseTotals> <apCaptureReply> <reasonCode>100</reasonCode> <status>SETTLED</status> <processorResponse>00004</processorResponse> <amount>154.50</amount> <dateTime>2023-09-26T19:46:58Z</dateTime> <reconciliationID>XFZ55MYPWYRA</reconciliationID> <paymentStatus>settled</paymentStatus> <responseCode>00004</responseCode> </apCaptureReply> </>