Void Session
The void_payment_session endpoint should be called after
create_payment_session
has been called with kind of authorization as outlined in Create Payment Session
(Manual Capture).
On a multi-capture
session that is partially_captured, a void keeps the amount already captured and releases the
uncaptured remainder. The session then reports captured, and you can refund its captures.
A void is rejected while a capture on the session is still processing. Retry after that capture completes.
The failure or success status is communicated to the partner via a
payment_session_complete webhook as before.
Response Notes
Success Case
HTTP Status: 200
id- the unique ID for this void session. This same ID will be returned if the endpoint is called with the sameidempotency_key- Associate this id with your internal representation of a checkout session, if applicable
Failure Case:
HTTP Status: 400
If a field is missing or the request is otherwise can’t be processed, we’ll return a 400
with the following fields:
error- can be one of:MissingField: one of the required fields is not present in the requestPaymentSessionDoesNotExist- thepayment_session_iddoes not exist.ServerError: There was an internal server error.- Requests can be retried as long as the
idempotency-keyis the same.
- Requests can be retried as long as the
SessionCaptured- The session has already received a final capture via a call to/payment_session/{payment_session_id}/captureand can no longer be voided.- In this case, to return funds to the customer, you’ll need to issue a refund.
SessionPending- The survey hasn’t been completed by the customer, and no auth hold has been placed, so there is no auth hold to void yet.ImmediateCapture- The caller is attempting to void a payment_session that wasn’t created withkind=authorizationValidationError- A capture on the session is still processing. Retry the void after that capture completes.
message:- Indication of one of the following:
- Which field was missing
- Details on how the total amount was invalid
- Details on captured sessions.
- Indication of one of the following:
Authentication
Sales channel API key for merchant server-to-server authentication
Path parameters
The UUID of the payment session returned by create_payment_session.
Request
Response
The unique ID for this void session. This same ID will be returned if the endpoint is called with the same idempotency_key. Associate this id with your internal representation of a checkout session, if applicable.