Skip to content
Gurdx

Docs / API reference

Payment Outcome Feedback

Reports what really happened to a payment you scored, so your account's payment model, rule weights and reputation memory learn from it.

Overview#

feedback/payment is a POST method with a JSON body. Send the transaction_id you used with Payment Fraud Detection and the outcome: approved, declined, chargeback, refunded, fraud_confirmed or legit_confirmed. Add a reason (decline code, chargeback reason) and occurred_at when you have them. See Feedback and learning for how the outcomes are used.

When to call it#

  • When an order is delivered (approved), declined, refunded or charged back.
  • When your risk team confirms fraud on an order, or clears an order that was held (fraud_confirmed / legit_confirmed).

How it works#

  • The outcome is written onto every scoring of that transaction_id in your account and data.status is applied.
  • If Gurdx has not scored that transaction yet, the outcome is kept and data.status is pending: it is applied automatically when the transaction is scored. For orders that were never scored by Gurdx (history from before your integration), add customer_id, customer_email, customer_phone, customer_ip or customer_device_id so the outcome still feeds reputation.
  • Sending the same outcome again returns label: "unchanged", so retries are safe. A chargeback or fraud_confirmed is never replaced by a later approved, declined or refunded; only legit_confirmed overrides it.

Notes#

  • Free: not counted against your quota, available on every plan.
  • Test mode validates and returns a sample result without storing anything.
  • Missing or invalid fields return error 131 (invalid_feedback) with HTTP 200.

Request#

POST https://gurdx.cretip.com/api/feedback/payment
  • Authenticate with the key parameter or an Authorization: Bearer header.
  • Free — not counted against your quota.
  • Available on: Free trial Standard Premium Pay-as-you-go

Parameters#

NameTypeDescription
transaction_id
required body
string The transaction_id you sent to Payment Fraud Detection (your order or payment id).
outcome
required body
string What really happened: approved, declined, chargeback, refunded, fraud_confirmed or legit_confirmed.
reason
optional body
string Free text, e.g. the gateway decline code or the chargeback reason. A declined outcome whose reason mentions fraud (for example fraud, stolen_card, suspected_fraud) counts as fraud for learning.
occurred_at
optional body
string|integer When the outcome happened: ISO-8601 date or UNIX timestamp. Defaults to now.
customer_id
optional body
string Optional. The customer of this payment, for transactions that were never scored by Gurdx (historical backfill).
customer_email
optional body
string Optional, as above.
customer_phone
optional body
string Optional, as above.
customer_ip
optional body
string Optional, as above.
customer_device_id
optional body
string Optional, as above.

Every method also accepts format, lang, mode, userID. See Options.

Code samples#

curl -X POST "https://gurdx.cretip.com/api/feedback/payment" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "ORD-10492",
    "outcome": "chargeback",
    "reason": "fraudulent",
    "occurred_at": "2026-10-20T14:05:00Z"
}'

Response#

Success#

{
    "data": {
        "transaction_id": "ORD-10492",
        "outcome": "chargeback",
        "status": "applied",
        "matched": 1,
        "label": "created"
    },
    "status": "success",
    "executionTime": 4
}

Error#

Errors are delivered with HTTP 200 — always check the status field.

{
    "status": "error",
    "code": 101,
    "type": "invalid_key",
    "description": "The API Key is missing or invalid."
}

Response fields#

NameTypeDescription
data.transaction_id string The transaction id, as received.
data.outcome string The outcome, as recorded.
data.status string applied when the transaction was found and updated, pending when no scored transaction has this id yet: the outcome is kept and applied automatically when it is scored.
data.matched integer How many scorings of this transaction were updated.
data.label string created, updated or unchanged (sending the same feedback again is a no-op).

Found a mistake? Tell us on the contact page. Contact