1. Dispute Management
TrustPay
en
  • en
  • zh
  • Integration Guide
  • Signature Calculation
  • Payment Gateway
    • Risk Control – Merchant Integration
    • Enums
    • Payment Callback Specification
    • C21 Suport Regions
      • TrustPay Supported Billing Countries and US/Canada Regions
    • Whitelist Management
      • Add Card Whitelists
      • Query Card Whitelists
      • Query Card Whitelists Task
    • Card Direct Payin
      POST
    • Cashier Payin
      POST
    • Order Refund
      POST
    • Payment Callback
      POST
    • Balance
      POST
    • Order Query
      POST
    • Fee Query
      POST
    • Refund Query
      POST
  • Dispute Management
    • Dispute Enums
    • Dispute Alert
    • Dispute Alert Callback
    • Dispute Prevention (RDR)
    • Dispute Management(Chargeback)
    • Chargeback Callback
  • Credit Card Issuer
    • Available Card
      POST
    • Open Card
      POST
    • Open/Recharge Card Callback
      POST
    • Get Card Detail
      POST
    • Card Recharge
      POST
    • Order List
      POST
    • Card List
      POST
    • Transaction List
      POST
    • Fee Query
      POST
  • Physical Card Issuer
    • Create Cardholder
    • List Cardholders
    • Assign Physical Cards
    • List Assigned Physical Cards
    • Query Card Balance
    • Query Card Transactions
    • Query Account
    • Card Charge
  • Schemas
    • VCardDetail
    • VOrderDetail
  1. Dispute Management

Dispute Alert Callback

Purpose#

After a Dispute Alert is uniquely matched to a merchant order and the merchant alert fee is recorded successfully, TrustPay sends a signed JSON callback to the original order notify_url.
A Dispute Alert is a pre-dispute notification. It is not a formal dispute, does not change the payment order status, and does not mean that a refund or formal dispute action has been completed.

Request#

Method: POST
Content-Type: application/json
URL: the notify_url submitted with the original order
Notification type: type = 7

Delivery Semantics#

Delivery is asynchronous and at least once.
TrustPay treats only HTTP 200 as successful delivery.
Network errors, timeouts, and non-200 responses may be retried.
The merchant must process duplicate callbacks idempotently by alert_id.
Return HTTP 200 only after the payload has been verified and durably accepted.
A failed callback does not reverse an alert fee that was already recorded successfully.

Wire Compatibility#

The customer-facing name is Dispute Alert. The current implementation retains these legacy JSON identifiers:
event_type = chargeback_alert.created
chargeback_alert_fee
Receivers must not rename them. Changing these identifiers requires a versioned API and code change.

Fields#

FieldTypeRequiredDescription
typeintegerYesAlways 7
merchant_idintegerYesTrustPay merchant ID
order_nostringYesOriginal merchant order number
order_amountnumberYesOriginal order amount
paid_amountnumberYesOriginal paid amount
reasonstringYesProvider reason code when supplied; may be empty
event_typestringYesCurrent compatibility value: chargeback_alert.created
alert_idstringYesTrustPay Dispute Alert ID and merchant idempotency key
provider_alert_idstringYesAlert identifier supplied by the provider
platform_order_nostringNoTrustPay platform order number
warning_typestringYesethoca, rdr, or cdrn
alert_typestringYesfraud or dispute
match_methodstringYesarn or card_amount_time
currencystringYesOriginal order currency, uppercase ISO 4217 code
chargeback_amountnumberYesProvider dispute amount; falls back to paid_amount when missing or zero
chargeback_currencystringYesProvider dispute currency; falls back to order currency
chargeback_alert_feenumberYesCompatibility field containing the merchant Dispute Alert fee
masked_card_numberstringNoMasked card number; full PAN is never included
arnstringNoAcquirer Reference Number
chargeback_reason_codestringNoProvider dispute reason code
sourcestringNoProvider event source
alert_timestampstringNoAlert time in UTC RFC 3339 format
transaction_timestampstringNoOriginal transaction time in UTC RFC 3339 format
received_atstringYesTime TrustPay received the alert, in UTC RFC 3339 format
signstringYesLowercase hexadecimal MD5 signature
Optional fields may be omitted when unavailable. Amounts are JSON numbers and may contain up to four decimal places. Do not assume fixed trailing zeros.
The callback does not include:
full PAN or CVV;
provider account credentials;
raw provider payloads;
channel cost or platform profit;
internal errors or retry counters.

Example#

{
  "type": 7,
  "merchant_id": 1001,
  "order_no": "ORDER_123456",
  "order_amount": 352.99,
  "paid_amount": 352.99,
  "reason": "10.4",
  "event_type": "chargeback_alert.created",
  "alert_id": "cba_example_001",
  "provider_alert_id": "2L07DBRFGBDLIW7SH59V969JG",
  "platform_order_no": "TP202607270001",
  "warning_type": "ethoca",
  "alert_type": "fraud",
  "match_method": "arn",
  "currency": "USD",
  "chargeback_amount": 352.99,
  "chargeback_currency": "USD",
  "chargeback_alert_fee": 4.5299,
  "masked_card_number": "800012******6824",
  "arn": "12345678901234567890123",
  "chargeback_reason_code": "10.4",
  "source": "ethoca",
  "alert_timestamp": "2026-07-27T12:00:00Z",
  "transaction_timestamp": "2026-07-26T12:00:00Z",
  "received_at": "2026-07-27T12:00:01Z",
  "sign": "SIGNATURE_VALUE"
}

Signature Verification#

All non-empty fields in the actual callback participate in the signature, excluding sign.
1.
Remove sign.
2.
Remove fields with empty values.
3.
Sort field names lexicographically.
4.
Join as key1=value1&key2=value2.
5.
Append &secret=YOUR_SECRET.
6.
Calculate lowercase hexadecimal MD5.
Do not round or reformat numeric values before verification. See Signature Calculation for reference implementations.

Recommended Processing#

1.
Parse the JSON body.
2.
Verify sign.
3.
Validate type = 7, event_type, merchant_id, and the expected currency.
4.
Insert the event using alert_id as a unique key.
5.
Apply internal alert handling in an idempotent transaction.
6.
Return HTTP 200.
Do not treat this callback as automatic permission to refund the payment.

Related Documents#

Dispute Alert
Dispute Prevention (RDR)
Dispute Enums
Signature Calculation
Modified at 2026-07-30 04:20:15
Previous
Dispute Alert
Next
Dispute Prevention (RDR)
Built with