Net::API::Stripe::Dispute - A Stripe Dispute Object
my $dispute = $stripe->dispute({ amount => 2000, # could also use a Net::API::Stripe::Charge object charge => 'ch_fake124567890', currency => 'jpy', # Or a Stripe transaction id such as trn_fake1234567890 disputed_transaction => $transaction_object, evidence => $dispute_evidence_object, is_charge_refundable => $stripe->true, metadata => { transaction_id => 123, customer_id => 456 }, reason => 'insufficient_funds', status => 'warning_needs_response', });
See documentation in Net::API::Stripe for example to make api calls to Stripe to create those objects.
v0.100.0
From the documentation:
A dispute occurs when a customer questions your charge with their card issuer. When this happens, you're given the opportunity to respond to the dispute with evidence that shows that the charge is legitimate. You can find more information about the dispute process in Stripe Disputes and Fraud documentation.
Creates a new Net::API::Stripe::Dispute object.
Unique identifier for the object.
String representing the object’s type. Objects of the same type share the same value.
Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed).
It seems this property is removed from the API documentation or maybe an omission?
This is an id or a Net::API::Stripe::Balance::Transaction object.
List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
This is an array of Net::API::Stripe::Balance::Transaction objects.
ID of the charge that was disputed or an Net::API::Stripe::Charge object.
Time at which the object was created. Measured in seconds since the Unix epoch.
Three-letter ISO currency code, in lowercase. Must be a supported currency.
When expanded, this is a Net::API::Stripe::Balance::Transaction object.
Evidence provided to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review.
Information about the evidence submission. This is a Net::API::Stripe::Dispute::EvidenceDetails object.
If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute.
Has the value true if the object exists in live mode or the value false if the object exists in test mode.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Read more about dispute reasons.
Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, charge_refunded, won, or lost.
{ "id": "dp_fake123456789", "object": "dispute", "amount": 1000, "balance_transactions": [], "charge": "ch_fake123456789", "created": 1571197169, "currency": "jpy", "evidence": { "access_activity_log": null, "billing_address": null, "cancellation_policy": null, "cancellation_policy_disclosure": null, "cancellation_rebuttal": null, "customer_communication": null, "customer_email_address": null, "customer_name": null, "customer_purchase_ip": null, "customer_signature": null, "duplicate_charge_documentation": null, "duplicate_charge_explanation": null, "duplicate_charge_id": null, "product_description": null, "receipt": null, "refund_policy": null, "refund_policy_disclosure": null, "refund_refusal_explanation": null, "service_date": null, "service_documentation": null, "shipping_address": null, "shipping_carrier": null, "shipping_date": null, "shipping_documentation": null, "shipping_tracking_number": null, "uncategorized_file": null, "uncategorized_text": null }, "evidence_details": { "due_by": 1572911999, "has_evidence": false, "past_due": false, "submission_count": 0 }, "is_charge_refundable": true, "livemode": false, "metadata": {}, "reason": "general", "status": "warning_needs_response" }
Initial version
Jacques Deguest <jack@deguest.jp>
Stripe API documentation:
https://stripe.com/docs/api/disputes, https://stripe.com/docs/disputes
Copyright (c) 2019-2020 DEGUEST Pte. Ltd.
You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.
To install Net::API::Stripe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::API::Stripe
CPAN shell
perl -MCPAN -e shell install Net::API::Stripe
For more information on module installation, please visit the detailed CPAN module installation guide.