Disputes

Manage payment disputes and chargebacks.

Disputes API

The Disputes API allows you to view and respond to payment disputes (chargebacks).

The Dispute Object

{
  "id": "dp_abc123def456",
  "object": "dispute",
  "amount": 50,
  "currency": "GHS",
  "status": "needs_response",
  "reason": "fraudulent",
  "payment": "pay_xyz789",
  "evidence": {
    "customer_name": null,
    "customer_email_address": null,
    "product_description": null,
    "uncategorized_text": null
  },
  "evidence_due_by": "2024-02-15T00:00:00Z",
  "metadata": {},
  "created_at": "2024-01-15T10:00:00Z"
}

Attributes

AttributeTypeDescription
idstringUnique identifier
objectstringAlways "dispute"
amountnumberDisputed amount in GHS
currencystringCurrency code
statusstringCurrent dispute status
reasonstringReason for the dispute
paymentstringPayment ID
evidenceobjectEvidence submitted
evidence_due_bystringDeadline for evidence submission
metadataobjectCustom metadata
created_atstringCreation timestamp

Dispute Statuses

StatusDescription
warning_needs_responseEarly warning, response recommended
warning_under_reviewEarly warning, under review
warning_closedEarly warning closed
needs_responseDispute requires your response
under_reviewEvidence submitted, under review
charge_refundedCharge was refunded
wonDispute was decided in your favor
lostDispute was decided against you

List Disputes

GET /v1/disputes

Query Parameters

ParameterTypeDescription
limitintegerNumber of results (1-100, default 10)
starting_afterstringCursor for pagination
paymentstringFilter by payment ID
statusstringFilter by status

Retrieve a Dispute

GET /v1/disputes/:id

Submit Evidence

Updates a dispute with evidence. Set submit: true to submit the evidence for review.

POST /v1/disputes/:id

Request Body

ParameterTypeRequiredDescription
evidenceobjectNoEvidence fields (see below)
metadataobjectNoCustom metadata
submitbooleanNoSubmit evidence for review

Evidence Fields

FieldTypeDescription
access_activity_logstringActivity log showing customer access
billing_addressstringCustomer billing address
cancellation_policystringYour cancellation policy
cancellation_policy_disclosurestringHow the policy was disclosed
cancellation_rebuttalstringRebuttal to cancellation claim
customer_communicationstringCommunication with customer
customer_email_addressstringCustomer email
customer_namestringCustomer name
customer_purchase_ipstringCustomer's IP at purchase
customer_signaturestringCustomer signature
duplicate_charge_documentationstringDocumentation for duplicate charge
duplicate_charge_explanationstringExplanation for duplicate charge
duplicate_charge_idstringOriginal charge ID
product_descriptionstringDescription of product/service
receiptstringReceipt or proof of delivery
refund_policystringYour refund policy
refund_policy_disclosurestringHow the refund policy was disclosed
refund_refusal_explanationstringWhy refund was refused
service_datestringDate service was provided
service_documentationstringDocumentation of service
shipping_addressstringShipping address
shipping_carrierstringShipping carrier
shipping_datestringDate shipped
shipping_documentationstringShipping documentation
shipping_tracking_numberstringTracking number
uncategorized_filestringAdditional file evidence
uncategorized_textstringAdditional text evidence
curl -X POST https://api.shikacreators.com/v1/disputes/dp_abc123def456 \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "evidence": {
      "customer_name": "John Doe",
      "customer_email_address": "john@example.com",
      "product_description": "Monthly subscription to Pro plan",
      "uncategorized_text": "Customer accessed the service 15 times after the disputed charge."
    },
    "submit": true
  }'
const dispute = await shikacreators.disputes.update('dp_abc123def456', {
  evidence: {
    customer_name: 'John Doe',
    customer_email_address: 'john@example.com',
    product_description: 'Monthly subscription to Pro plan',
    uncategorized_text: 'Customer accessed the service 15 times after the disputed charge.'
  },
  submit: true
})

Once evidence is submitted (submit: true), it cannot be modified. Make sure all evidence is complete before submitting.


Close a Dispute

Closes a dispute, accepting the chargeback. The dispute status will be set to lost.

POST /v1/disputes/:id/close
curl -X POST https://api.shikacreators.com/v1/disputes/dp_abc123def456/close \
  -H "Authorization: Bearer sk_test_..."
const dispute = await shikacreators.disputes.close('dp_abc123def456')

Closing a dispute means you accept the chargeback. The disputed amount will be deducted from your balance.