Associate a payment’s post-transaction events, such as refunds and disputes, or pre-transaction events, such as user interventions, with the payment evaluation.
Parameters
- eventsarray of objectsRequired
Event information to associate with the payment evaluation such as refunds, dispute, early fraud warnings, or user interventions.
- events.
occurred_ attimestampRequired Timestamp when the event occurred.
- events.
typeenumRequired Indicates the type of event attached to the payment evaluation.
Possible enum valuesdispute_opened Event type for when a dispute is opened.
early_fraud_ warning_ received Event type for when an early fraud warning is received.
refundedEvent type for when a payment is refunded.
user_intervention_ raised Event type for when a user intervention is raised.
user_intervention_ resolved Event type for when a user intervention is resolved.
- events.
dispute_ openedobject Details about the dispute opened event.
- events.
dispute_opened. amountintegerRequired Amount to dispute for this payment. A positive integer representing how much to charge in the smallest currency unit (for example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency).
- events.
dispute_opened. currencyenumRequired Three-letter ISO currency code, in lowercase. Must be a supported currency.
- events.
dispute_opened. reasonenumRequired Reason given by cardholder for dispute.
Possible enum valuesaccount_not_ available The account isn’t available.
credit_not_ processed The cardholder claims they should have received a refund or credit but haven’t.
customer_initiated The cardholder disputed the transaction.
duplicateThe cardholder claims they were incorrectly charged multiple times for the same products or services.
fraudulentThe cardholder claims that a payment was unauthorized and that they didn’t initiate it or give permission for it to happen.
generalThe reason doesn’t match any of the other dispute reasons.
noncompliantThe transaction is noncompliant.
product_not_ received The cardholder claims they didn’t receive the products or services they purchased.
product_unacceptable The cardholder claims a product they received is defective, damaged, or not as described. This includes issues with the product itself or how it was represented on the seller’s site.
subscription_canceled The cardholder claims that a business continued to charge them after their subscription was canceled.
Show 1 more
- events.
early_ fraud_ warning_ receivedobject Details about the early fraud warning received event.
- events.
early_fraud_warning_received. fraud_ typeenumRequired The type of fraud labeled by the issuer.
Possible enum valuesmade_with_ lost_ card The payment might be fraudulent because the card was reported lost.
made_with_ stolen_ card The payment might be fraudulent because the card was reported stolen.
otherThe reason doesn’t match any of the other reasons.
unauthorized_use_ of_ card The payment might be fraudulent because the card was used without the cardholder’s permission.
- events.
refundedobject Details about the refunded event.
- events.
refunded. amountintegerRequired Amount refunded for this payment. A positive integer representing how much to charge in the smallest currency unit (for example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency).
- events.
refunded. currencyenumRequired Three-letter ISO currency code, in lowercase. Must be a supported currency.
- events.
refunded. reasonenumRequired Indicates the reason for the refund.
Possible enum valuesduplicateThe merchant has indicated the refund is because of a duplicate payment.
fraudulentThe merchant has indicated the refund is because of fraud.
otherThe reason doesn’t match any of the other refund reasons.
requested_by_ customer The merchant has indicated the refund was requested by the customer.
- events.
user_ intervention_ raisedobject Details about the user intervention raised event.
- events.
user_intervention_raised. typeenumRequired Type of user intervention raised.
Possible enum values3ds3DS Authentication
captchaCAPTCHA Security Test
customCustom Intervention
- events.
user_intervention_raised. customobject Details for custom interventions.
- events.
user_intervention_raised. custom. typestringRequired Custom type of user intervention raised. The string must use a snake case description for the type of intervention performed.
- events.
user_ intervention_ resolvedobject Details about the user intervention resolved event.
- events.
user_intervention_resolved. keystringRequired Unique ID of the intervention.
- events.
user_intervention_resolved. outcomeenumRequired Result of the intervention.
Possible enum valuesabandonedThe customer abandoned the user intervention.
failedThe customer failed the user intervention.
passedThe customer passed the user intervention.
- payment_
evaluationstringRequired Unique identifier for the payment evaluation to attach the events to.
- metadataobject
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.
Returns
Returns the payment evaluation object.
{ "id": "peval_123456789", "object": "payment_evaluation", "created_at": 123456789, "events": [ { "occurred_at": 123456789, "type": "user_intervention_raised", "user_intervention_raised": { "key": "1234567-12345567-123445677", "type": "captcha" } } ], "livemode": true, "metadata": {}, "status": "pending_outcome"}