Skip to main content

defend Method

Overview​

The defend method submits your formal argument against the customer's chargeback claim. This presents your case to the bank with a reason code and supporting evidence.

Business Use Case: After submitting delivery proof, you now submit your formal defense stating the chargeback is illegitimate because the customer received and signed for the package.

Purpose​

Why use defend?

Reason CodeUse When
product_or_service_providedCustomer received what they paid for
customer_withdrew_disputeCustomer contacted bank to withdraw
duplicate_charge_docCharge is legitimate and not duplicated
cancellation_policy_disclosedCustomer agreed to terms

Request Fields​

FieldTypeRequiredDescription
dispute_idstringYesThe connector's dispute ID
reason_codestringYesDefense reason code
explanationstringYesDetailed explanation of defense
submit_evidenceboolNoWhether to submit attached evidence

Response Fields​

FieldTypeDescription
dispute_idstringConnector's dispute ID
defense_submittedboolWhether defense was accepted
statusDisputeStatusUpdated status: UNDER_REVIEW
status_codeintHTTP-style status code

Example​

SDK Setup​

from orchestratorx_prism import DisputeClient

dispute_client = DisputeClient(
connector='stripe',
api_key='YOUR_API_KEY',
environment='SANDBOX'
)

Request​

request = {
"dispute_id": "dp_xxx",
"reason_code": "product_or_service_provided",
"explanation": "Customer ordered product on 2024-01-10. Package was delivered on 2024-01-15 to the customer's verified billing address. Customer signed for delivery. Delivery confirmation and signature captured. Customer never contacted support about issues.",
"submit_evidence": True
}

response = await dispute_client.defend(request)

Response​

{
"dispute_id": "dp_xxx",
"defense_submitted": True,
"status": "UNDER_REVIEW",
"status_code": 200
}

Defense Reason Codes​

CodeDescription
product_or_service_providedProduct/service was delivered as described
customer_withdrew_disputeCustomer withdrew with their bank
duplicate_charge_docCharge is not a duplicate
cancellation_policy_disclosedCustomer accepted terms at purchase
merchandise_or_service_not_as_describedProduct matched description
credit_not_processedRefund was already provided

Next Steps​

  • get - Check dispute status after submission
  • accept - Consider conceding if defense is weak
  • Wait for bank decision (typically takes 60-75 days)