v1
latestOpenAPI 3.0.02026-07-26168846732.2 KBPayments
Payments - Cancel Post Capture
A Payment could can be cancelled when it is in one of these statuses: succeeded, partially_captured, partially_captured_and_capturable.
post/payments/{payment_id}/cancel_post_capture
Path parameters
payment_idstring required
The identifier for payment
Request body
Response
Payment canceled post capture
Example response
{
"payment_id": "pay_mbabizu24mvu3mela5njyhpit4",
"merchant_id": "merchant_1668273825",
"amount": 6540,
"net_amount": 6540,
"shipping_cost": 6540,
"amount_capturable": 6540,
"amount_received": 6540,
"processor_merchant_id": "merchant_1689512302",
"sdk_authorization": "cHJvZmlsZV9pZD1wcm9mXzEyMyxwdWJsaXNoYWJsZV9rZXk9cGtfbGl2ZV8xMjM=",
"connector": "stripe",
"client_secret": "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo",
"created": "2022-09-10T10:11:12Z",
"modified_at": "2022-09-10T10:11:12Z",
"connector_customer_id": "cus_Rnm2pDKGyQi506",
"customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"customer": {
"id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
"name": "John Doe",
"email": "johntest@test.com",
"phone": "9123456789",
"phone_country_code": "+1",
"customer_document_details": {
"document_number": "12345678911"
}
},
"description": "It's my first payment request",
"refunds": [
{
"amount": 6540,
"connector": "stripe",
"split_refunds": {
"adyen_split_refund": {
"split_items": [
{
"amount": 6540
}
]
}
}
}
],
"attempts": [
{
"amount": 6540,
"order_tax_amount": 6540,
"created_at": "2022-09-10T10:11:12Z",
"modified_at": "2022-09-10T10:11:12Z",
"reference_id": "993672945374576J"
}
],
"captures": [
{
"amount": 6540
}
],
"mandate_id": "mandate_iwer89rnjef349dni3",
"mandate_data": {
"customer_acceptance": {
"accepted_at": "2022-09-10T10:11:12Z",
"online": {
"ip_address": "123.32.25.123"
}
},
"mandate_type": {
"single_use": {
"amount": 6540,
"start_date": "2022-09-10T00:00:00Z",
"end_date": "2023-09-10T23:59:59Z"
}
}
},
"off_session": true,
"capture_on": "2022-09-10T10:11:12Z",
"payment_method_data": {
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
}
}
},
"payment_token": "187282ab-40ef-47a9-9206-5099ba31e432",
"shipping": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
}
},
"billing": {
"address": {
"city": "New York",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
}
},
"order_details": [
{
"product_name": "shirt",
"quantity": 1
}
],
"email": "johntest@test.com",
"name": "John Test",
"phone": "9123456789",
"return_url": "https://hyperswitch.io",
"statement_descriptor_name": "Hyperswitch Router",
"statement_descriptor_suffix": "Payment for shoes purchase",
"next_action": {
"redirect_to_url": "https://example.com/redirect"
},
"error_code": "E0001",
"error_message": "Failed while verifying the card",
"connector_label": "stripe_US_food",
"connector_transaction_id": "993672945374576J",
"connector_metadata": {
"santander": {
"boleto": {
"discount_rules": {
"tiers": [
{
"amount": "5.50",
"end_date": "2027-12-31"
}
]
},
"penalties": {
"fixed_penalty": {
"value": "2.00",
"grace_period_days": 1
},
"interest": {
"interest_percentage": "5.00",
"iof_percentage": "32.45325"
}
},
"collection_actions": {
"legal_protest": {
"days_after_due_date": 30
},
"auto_write_off_days": 60
},
"payment_constraints": {
"details": {
"min_value": "38.02",
"max_value": "38.02"
}
},
"beneficiary": {
"name": "João da Silva",
"document_number": "9615865832"
}
}
}
},
"feature_metadata": {
"apple_pay_recurring_details": {
"regular_billing": {
"recurring_payment_start_date": "2023-09-10T23:59:59Z",
"recurring_payment_end_date": "2023-09-10T23:59:59Z"
},
"management_url": "https://hyperswitch.io"
},
"pix_additional_details": {
"scheduled": {
"date": "2026-07-08",
"validity_after_expiration": 10
}
},
"boleto_additional_details": {
"due_date": "2026-12-31",
"covenant_code": "3568253",
"discount_rules": {
"tiers": [
{
"amount": "5.50",
"end_date": "2027-12-31"
}
]
},
"penalties": {
"fixed_penalty": {
"value": "2.00",
"grace_period_days": 1
},
"interest": {
"interest_percentage": "5.00",
"iof_percentage": "32.45325"
}
},
"collection_actions": {
"legal_protest": {
"days_after_due_date": 30
},
"auto_write_off_days": 60
},
"payment_constraints": {
"details": {
"min_value": "38.02",
"max_value": "38.02"
}
},
"beneficiary": {
"name": "João da Silva",
"document_number": "9615865832"
}
},
"pix_automatico_additional_details": {
"time": 3600,
"retry_policy": true,
"mandate_details": {
"fixed_recurring_amount": 6540,
"min_recurring_amount": 6540,
"start_date": "2026-12-31",
"end_date": "2026-12-31"
}
},
"finix_additional_details": {
"fraud_session_id": "1234567890abcdef"
}
},
"reference_id": "993672945374576J",
"surcharge_details": {
"surcharge_amount": 6540
},
"incremental_authorizations": [
{
"amount": 6540
}
],
"expires_on": "2022-09-10T10:11:12Z",
"browser_info": {
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
},
"updated": "2022-09-10T10:11:12Z",
"split_payments": {
"stripe_split_payment": {
"application_fees": 6540,
"on_behalf_of": "acct_1234567890"
}
},
"extended_authorization_last_applied_at": "2022-09-10T10:11:12Z",
"merchant_order_reference_id": "Custom_Order_id_123",
"is_stored_credential": true,
"billing_descriptor": {
"name": "The Online Retailer",
"city": "San Francisco",
"phone": "9123456789"
},
"partner_merchant_identifier_details": {
"partner_details": {
"version": "1.0.0"
}
}
}