json icon

Payment Failed

v0.0.1events
schema.json
1{
2  "$schema": "http://json-schema.org/draft-07/schema#",
3  "type": "object",
4  "properties": {
5    "paymentId": {
6      "type": "string",
7      "description": "Unique identifier for the failed payment"
8    },
9    "amount": {
10      "type": "number",
11      "description": "Payment amount that failed"
12    },
13    "currency": {
14      "type": "string",
15      "description": "Currency code (ISO 4217)"
16    },
17    "failureReason": {
18      "type": "string",
19      "enum": [
20        "insufficient_funds",
21        "card_declined",
22        "expired_card",
23        "fraud_suspected",
24        "network_error",
25        "invalid_payment_method",
26        "authentication_required",
27        "other"
28      ],
29      "description": "Reason for payment failure"
30    },
31    "failureMessage": {
32      "type": "string",
33      "description": "Human-readable failure message"
34    },
35    "metadata": {
36      "type": "object",
37      "properties": {
38        "subscriptionId": {
39          "type": "string"
40        },
41        "invoiceId": {
42          "type": "string"
43        },
44        "customerId": {
45          "type": "string"
46        },
47        "orderId": {
48          "type": "string"
49        }
50      }
51    },
52    "canRetry": {
53      "type": "boolean",
54      "description": "Whether this payment can be retried"
55    },
56    "nextRetryAt": {
57      "type": "string",
58      "format": "date-time",
59      "description": "Suggested time for next retry attempt"
60    },
61    "timestamp": {
62      "type": "string",
63      "format": "date-time",
64      "description": "When the failure occurred"
65    }
66  },
67  "required": ["paymentId", "amount", "currency", "failureReason", "timestamp"]
68}

Details

Format
JSON Schema
Resource
events
Summary
Emitted when a payment attempt fails

Versions

Downloads