Payment Processed
v1.0.0eventsschema.json
1{
2 "$schema": "http://json-schema.org/draft-07/schema#",
3 "type": "object",
4 "title": "PaymentProcessed",
5 "description": "Event triggered after a payment has been successfully processed",
6 "properties": {
7 "transactionId": {
8 "type": "string",
9 "format": "uuid",
10 "description": "Unique identifier for the payment transaction"
11 },
12 "userId": {
13 "type": "string",
14 "format": "uuid",
15 "description": "Unique identifier of the user who made the payment"
16 },
17 "orderId": {
18 "type": "string",
19 "format": "uuid",
20 "description": "Unique identifier of the associated order"
21 },
22 "amount": {
23 "type": "number",
24 "description": "The payment amount"
25 },
26 "currency": {
27 "type": "string",
28 "description": "Currency code (ISO 4217)",
29 "default": "USD"
30 },
31 "paymentMethod": {
32 "type": "string",
33 "enum": ["CreditCard", "DebitCard", "BankTransfer", "PayPal", "Crypto"],
34 "description": "The payment method used"
35 },
36 "status": {
37 "type": "string",
38 "enum": ["confirmed", "pending", "failed"],
39 "description": "The outcome status of the payment"
40 },
41 "subscriptionId": {
42 "type": "string",
43 "description": "Subscription identifier, if payment is subscription-related"
44 },
45 "paymentId": {
46 "type": "string",
47 "format": "uuid",
48 "description": "Unique identifier for the payment record"
49 },
50 "confirmationDetails": {
51 "type": "object",
52 "description": "Details from the payment gateway",
53 "properties": {
54 "gatewayResponse": {
55 "type": "string",
56 "description": "Response from the payment gateway"
57 },
58 "transactionId": {
59 "type": "string",
60 "description": "Gateway-specific transaction identifier"
61 }
62 },
63 "required": ["gatewayResponse", "transactionId"]
64 },
65 "timestamp": {
66 "type": "string",
67 "format": "date-time",
68 "description": "Timestamp when the payment was processed"
69 }
70 },
71 "required": ["transactionId", "userId", "orderId", "amount", "currency", "paymentMethod", "status", "paymentId", "confirmationDetails", "timestamp"]
72}
73Details
- Format
- JSON Schema
- Resource
- events
- Summary
- Event is triggered after the payment has been successfully processed