Skip to content

Disputes ​

Dispute operations.

Use it as client.disputes. Every method takes keyword arguments, returns a PaystackSdk::Response, and raises a PaystackSdk::Error if a parameter is invalid before anything is sent. An unsuccessful result from Paystack (a 400 or 404) comes back as a Response with success? false.

Methods ​

list ​

ruby
disputes.list(per_page: nil, page: nil, status: nil, transaction: nil, from: nil, to: nil)

List Disputes.

List transaction disputes filed by customers

ParameterTypeRequiredDescription
per_pageIntegerNumber of records to fetch per page
pageIntegerThe section to retrieve
statusStringDispute status One of: awaiting-merchant-feedback, awaiting-bank-feedback, pending, resolved.
transactionStringTransaction ID
fromStringThe start date
toStringThe end date

Paystack docs: https://paystack.com/docs/api/dispute/#list

fetch ​

ruby
disputes.fetch(id:)

Fetch Dispute.

Fetch a transaction dispute

ParameterTypeRequiredDescription
idIntegeryesThe unique identifier of the dispute

Paystack docs: https://paystack.com/docs/api/dispute/#fetch

update ​

ruby
disputes.update(id:, refund_amount:, uploaded_filename: nil)

Update Dispute.

Update a transaction dispute

ParameterTypeRequiredDescription
idIntegeryesThe unique identifier of the dispute
refund_amountIntegeryesThe amount to refund, in the subunit of your currency
uploaded_filenameStringFilename of attachment returned via response from the Dispute upload URL

Paystack docs: https://paystack.com/docs/api/dispute/#update

fetch_upload_url ​

ruby
disputes.fetch_upload_url(id:, upload_filename: nil)

Fetch Upload URL.

Get the URL to upload a dispute evidence

ParameterTypeRequiredDescription
idIntegeryesThe unique identifier of the dispute
upload_filenameStringThe file name, with its extension, that you want to upload (for example filename.pdf).

Paystack docs: https://paystack.com/docs/api/dispute/#upload-url

export ​

ruby
disputes.export(per_page: nil, page: nil, status: nil, from: nil, to: nil)

Export Disputes.

Export the disputes available on your integration

ParameterTypeRequiredDescription
per_pageIntegerNumber of records to fetch per page
pageIntegerThe section to retrieve
statusStringOne of: awaiting-merchant-feedback, awaiting-bank-feedback, pending, resolved.
fromStringThe start date
toStringThe end date

Paystack docs: https://paystack.com/docs/api/dispute/#export

list_transaction ​

ruby
disputes.list_transaction(id:)

List Transaction Disputes.

List all disputes filed for a transaction

ParameterTypeRequiredDescription
idIntegeryesThe unique identifier of the transaction

Paystack docs: https://paystack.com/docs/api/dispute/#transaction

resolve ​

ruby
disputes.resolve(id:, resolution:, message:, refund_amount:, uploaded_filename:, evidence: nil)

Resolve Dispute.

Resolve a transaction dispute

ParameterTypeRequiredDescription
idIntegeryesThe unique identifier of the dispute
resolutionStringyesDispute resolution.
messageStringyesReason for resolving
refund_amountIntegeryesThe amount to refund, in the subunit of your integration currency
uploaded_filenameStringyesFilename of attachment returned via response from the Dispute upload URL
evidenceIntegerEvidence Id for fraud claims

Paystack docs: https://paystack.com/docs/api/dispute/#resolve

add_evidence ​

ruby
disputes.add_evidence(
  id:,
  customer_email:,
  customer_name:,
  customer_phone:,
  service_details:,
  delivery_address: nil,
  delivery_date: nil
)

Add Evidence.

Provide evidence for a dispute

ParameterTypeRequiredDescription
idIntegeryesThe unique identifier of the dispute
customer_emailStringyesCustomer email
customer_nameStringyesCustomer name
customer_phoneStringyesCustomer mobile number
service_detailsStringyesDetails of service offered
delivery_addressStringDelivery address
delivery_dateStringISO 8601 representation of delivery date (YYYY-MM-DD)

Paystack docs: https://paystack.com/docs/api/dispute/#evidence

Unofficial community SDK. Not affiliated with or endorsed by Paystack. · MIT License · rubygems.org/gems/paystack_sdk