1
+ const on_reconSchema = {
2
+ type : "object" ,
3
+ required : [ "context" , "message" ] ,
4
+ properties : {
5
+ context : {
6
+ type : "object" ,
7
+ required : [
8
+ "domain" ,
9
+ "location" ,
10
+ "version" ,
11
+ "action" ,
12
+ "bap_id" ,
13
+ "bap_uri" ,
14
+ "bpp_id" ,
15
+ "bpp_uri" ,
16
+ "transaction_id" ,
17
+ "message_id" ,
18
+ "timestamp" ,
19
+ "ttl"
20
+ ] ,
21
+ properties : {
22
+ domain : { type : "string" , const : "ONDC:NTS10" } ,
23
+ location : {
24
+ type : "object" ,
25
+ required : [ "country" , "city" ] ,
26
+ properties : {
27
+ country : {
28
+ type : "object" ,
29
+ required : [ "code" ] ,
30
+ properties : {
31
+ code : { type : "string" , const : "IND" }
32
+ }
33
+ } ,
34
+ city : {
35
+ type : "object" ,
36
+ required : [ "code" ] ,
37
+ properties : {
38
+ code : { type : "string" , const : "*" }
39
+ }
40
+ }
41
+ }
42
+ } ,
43
+ version : { type : "string" , const : "2.0.0" } ,
44
+ action : { type : "string" , const : "on_recon" } ,
45
+ bap_id : { type : "string" } ,
46
+ bap_uri : { type : "string" , format : "uri" } ,
47
+ bpp_id : { type : "string" } ,
48
+ bpp_uri : { type : "string" , format : "uri" } ,
49
+ transaction_id : { type : "string" } ,
50
+ message_id : { type : "string" } ,
51
+ timestamp : { type : "string" , format : "date-time" } ,
52
+ ttl : { type : "string" }
53
+ }
54
+ } ,
55
+ message : {
56
+ type : "object" ,
57
+ required : [ "orders" ] ,
58
+ properties : {
59
+ orders : {
60
+ type : "array" ,
61
+ items : {
62
+ type : "object" ,
63
+ required : [ "id" , "amount" , "recon_accord" , "settlements" ] ,
64
+ properties : {
65
+ id : { type : "string" } ,
66
+ amount : {
67
+ type : "object" ,
68
+ required : [ "currency" , "value" ] ,
69
+ properties : {
70
+ currency : { type : "string" , const : "INR" } ,
71
+ value : { type : "string" }
72
+ }
73
+ } ,
74
+ recon_accord : { type : "boolean" } ,
75
+ settlements : {
76
+ type : "array" ,
77
+ items : {
78
+ type : "object" ,
79
+ required : [ "id" , "payment_id" , "status" , "amount" , "commission" , "withholding_amount" , "tcs" , "tds" , "updated_at" ] ,
80
+ properties : {
81
+ id : { type : "string" } ,
82
+ payment_id : { type : "string" } ,
83
+ status : { type : "string" , enum : [ "PENDING" , "SETTLED" , "TO-BE-INITIATED" ] } ,
84
+ settlement_ref_no : { type : "string" } ,
85
+ amount : {
86
+ type : "object" ,
87
+ required : [ "currency" , "value" ] ,
88
+ properties : {
89
+ currency : { type : "string" , const : "INR" } ,
90
+ value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" } ,
91
+ diff_value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" }
92
+ }
93
+ } ,
94
+ commission : {
95
+ type : "object" ,
96
+ required : [ "currency" , "value" ] ,
97
+ properties : {
98
+ currency : { type : "string" , const : "INR" } ,
99
+ value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" } ,
100
+ diff_value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" }
101
+ }
102
+ } ,
103
+ withholding_amount : {
104
+ type : "object" ,
105
+ required : [ "currency" , "value" ] ,
106
+ properties : {
107
+ currency : { type : "string" , const : "INR" } ,
108
+ value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" } ,
109
+ diff_value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" }
110
+ }
111
+ } ,
112
+ tcs : {
113
+ type : "object" ,
114
+ required : [ "currency" , "value" ] ,
115
+ properties : {
116
+ currency : { type : "string" , const : "INR" } ,
117
+ value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" } ,
118
+ diff_value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" }
119
+ }
120
+ } ,
121
+ tds : {
122
+ type : "object" ,
123
+ required : [ "currency" , "value" ] ,
124
+ properties : {
125
+ currency : { type : "string" , const : "INR" } ,
126
+ value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" } ,
127
+ diff_value : { type : "string" , pattern : "^\\d+\\.\\d{2}$" }
128
+ }
129
+ } ,
130
+ updated_at : { type : "string" , format : "date-time" }
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ } ;
141
+
142
+ export default on_reconSchema ;
0 commit comments