-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoken-io-payment-schema.json
More file actions
118 lines (118 loc) · 4.17 KB
/
Copy pathtoken-io-payment-schema.json
File metadata and controls
118 lines (118 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://api-evangelist.com/schemas/token-io/token-io-payment-schema.json",
"title": "Token.io Payment",
"description": "Schema for a Token.io Payments v2 single immediate or future-dated payment initiation request and the resulting payment resource returned by POST /payments and GET /payments/{paymentId}.",
"type": "object",
"definitions": {
"PaymentInitiationRequest": {
"type": "object",
"description": "Request body for initiating a Token.io payment via Payments v2.",
"required": ["amount", "currency", "creditor"],
"properties": {
"amount": {
"type": "string",
"description": "Payment amount as a decimal string (e.g. '100.00')."
},
"currency": {
"type": "string",
"description": "ISO 4217 three-letter currency code (e.g. GBP, EUR).",
"pattern": "^[A-Z]{3}$"
},
"remittanceInformation": {
"type": "string",
"description": "Free-text payment reference shown to the payer / payee."
},
"endToEndId": {
"type": "string",
"description": "Unique end-to-end identifier propagated through the payment rail."
},
"creditor": {
"$ref": "#/definitions/Party"
},
"debtor": {
"$ref": "#/definitions/Party"
},
"executionDate": {
"type": "string",
"format": "date",
"description": "Future-dated payment execution date (omit for immediate)."
},
"paymentRail": {
"type": "string",
"description": "Preferred payment rail.",
"enum": ["FASTER_PAYMENTS", "SEPA", "SEPA_INSTANT", "CHAPS", "BACS"]
}
}
},
"Payment": {
"type": "object",
"description": "Token.io payment resource.",
"required": ["paymentId", "status", "amount", "currency"],
"properties": {
"paymentId": {
"type": "string",
"description": "Token.io-assigned payment identifier."
},
"status": {
"type": "string",
"description": "Payment lifecycle status.",
"enum": [
"INITIATION_PENDING",
"INITIATION_PROCESSING",
"INITIATION_COMPLETED",
"INITIATION_REJECTED",
"SETTLEMENT_PROCESSING",
"SETTLEMENT_COMPLETED",
"SETTLEMENT_INCOMPLETE",
"FAILED"
]
},
"amount": {"type": "string"},
"currency": {"type": "string", "pattern": "^[A-Z]{3}$"},
"createdAtMs": {"type": "string", "description": "Creation timestamp in milliseconds since epoch."},
"executedAtMs": {"type": "string", "description": "Execution timestamp in milliseconds since epoch."},
"endToEndId": {"type": "string"},
"creditor": {"$ref": "#/definitions/Party"},
"debtor": {"$ref": "#/definitions/Party"},
"bankId": {"type": "string", "description": "Bank identifier from the Banks v2 catalog."}
}
},
"Party": {
"type": "object",
"description": "Creditor or debtor party with account details.",
"required": ["name"],
"properties": {
"name": {"type": "string"},
"accountIdentifier": {
"type": "object",
"description": "Account identifier — IBAN, sort-code+account-number, or BBAN.",
"properties": {
"iban": {"type": "string"},
"bban": {"type": "string"},
"sortCodeAccountNumber": {
"type": "object",
"properties": {
"sortCode": {"type": "string"},
"accountNumber": {"type": "string"}
}
}
}
},
"address": {
"type": "object",
"properties": {
"addressLine": {"type": "array", "items": {"type": "string"}},
"country": {"type": "string", "pattern": "^[A-Z]{2}$"},
"postCode": {"type": "string"},
"city": {"type": "string"}
}
}
}
}
},
"oneOf": [
{"$ref": "#/definitions/PaymentInitiationRequest"},
{"$ref": "#/definitions/Payment"}
]
}