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_idin your account anddata.statusisapplied. - If Gurdx has not scored that transaction yet, the outcome is kept and
data.statusispending: it is applied automatically when the transaction is scored. For orders that were never scored by Gurdx (history from before your integration), addcustomer_id,customer_email,customer_phone,customer_iporcustomer_device_idso the outcome still feeds reputation. - Sending the same outcome again returns
label: "unchanged", so retries are safe. Achargebackorfraud_confirmedis never replaced by a laterapproved,declinedorrefunded; onlylegit_confirmedoverrides 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#
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#
| Name | Type | Description |
|---|---|---|
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"
}'
<?php
$payload = [
'transaction_id' => 'ORD-10492',
'outcome' => 'chargeback',
'reason' => 'fraudulent',
'occurred_at' => '2026-10-20T14:05:00Z',
];
$ch = curl_init('https://gurdx.cretip.com/api/feedback/payment');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode($payload),
]);
$result = json_decode(curl_exec($ch), true);
if ($result['status'] !== 'success') {
error_log($result['code'].': '.$result['description']);
}
const res = await fetch('https://gurdx.cretip.com/api/feedback/payment', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"transaction_id": "ORD-10492",
"outcome": "chargeback",
"reason": "fraudulent",
"occurred_at": "2026-10-20T14:05:00Z"
}),
});
const result = await res.json();
if (result.status !== 'success') {
console.error(result.code, result.description);
}
import requests
res = requests.post(
"https://gurdx.cretip.com/api/feedback/payment",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"transaction_id": "ORD-10492",
"outcome": "chargeback",
"reason": "fraudulent",
"occurred_at": "2026-10-20T14:05:00Z",
},
)
result = res.json()
if result["status"] != "success":
print(result["code"], result["description"])
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#
| Name | Type | Description |
|---|---|---|
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