-
Notifications
You must be signed in to change notification settings - Fork 0
/
PaymentEndpoints.proto
195 lines (170 loc) · 5.67 KB
/
PaymentEndpoints.proto
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
option java_package = "com.idamobile.instabank.dto.protobuf";
option java_outer_classname = "PaymentEndpoints";
import "Commons.proto";
import "Entities.proto";
import "Events.proto";
import "Wallets.proto";
import "Social.proto";
import "Locations.proto";
import "Forms.proto";
// endpoint URL: "/createTransferMoney"
// returns TransactionProtobufDTO
message CreateTransferMoneyRequestProtobufDTO {
required EnvelopeProtobufDTO envelope = 1;
required int64 amount = 2;
required string recipientId = 3;
required bool existingUser = 4;
optional string fbAccessToken = 5;
optional string requestId = 6;
// if populated new template will be created
optional string templateName = 7;
// if populated template will be attached to order
optional string templateId = 8;
/*
{templateName, templateId} are exclusive parameters,
i.e. only one should be populated or none of them,
otherwise it will call an IllegalArgumentException
*/
}
// endpoint URL: "/fulfillMoneyRequest"
// returns MoneyRequestProtobufDTO
message FulfillMoneyRequestRequestProtobufDTO {
required string orderId = 1;
required int64 amount = 2;
optional string message = 3;
optional string requestId = 4;
}
// endpoint URL: "/withdraw"
// 412 {message} transfer forbidden by FL-110
// HTTP 422 on negative amount
message WithdrawRequestProtobufDTO {
required int64 amount = 1;
//payment's details
optional string message = 2;
/* keys:
* "CUSTOMER_NAME"
* "INN"
* "ACCOUNT_NUMBER"
* "BANK_NAME"
* "BIK"
* "CORRESPONDENT_ACCOUNT"
* "PAYMENT_PURPOSE"
* "PAYMENT_ACCOUNT" - should not be displayed on client; used as a source account for payments
*/
repeated FieldValueProtobufDTO requisites = 3;
// if populated new template will be created
optional string templateName = 4;
// if populated template will be attached to order
optional string templateId = 5;
/*
{templateName, templateId} are exclusive parameters,
i.e. only one should be populated or none of them,
otherwise it will call an IllegalArgumentException
*/
}
// endpoint URL "/getExternalTransferCommission"
// returns GetExternalTransferCommissionResponseProtobufDTO
// 422 on wrong requisites
message GetExternalTransferCommissionRequestProtobufDTO {
required int64 amount = 1;
/* keys:
* "CUSTOMER_NAME"
* "BIK"
* "ACCOUNT_NUMBER"
* TODO: consider creating separate DTO for requisites
*/
repeated FieldValueProtobufDTO requisites = 2;
}
message GetExternalTransferCommissionResponseProtobufDTO {
required int64 commissionAmount = 1;
}
//endpoint URL: "/getBeneficiaryCategories"
//return: GetBeneficiaryCategoriesResponseProtobufDTO
message GetBeneficiaryCategoriesRequestProtobufDTO {
optional string dataHash = 1;
}
message GetBeneficiaryCategoriesResponseProtobufDTO {
optional string dataHash = 1;
repeated BeneficiaryCategory beneficiaryCategories = 2;
}
//endpoint URL: "/getPaymentCommission"
//return: GetPaymentCommissionResponseProtobufDTO
message GetPaymentCommissionRequestProtobufDTO {
required FilledForm filledForm = 1;
}
message GetPaymentCommissionResponseProtobufDTO {
required int64 amount = 1;
}
// endpoint URL: "/performBeneficiaryPayment"
// returns TransactionProtobufDTO
// 422 on wrong requisites or invalid amount
message PerformPaymentProtobufRequestDTO {
required FilledForm filledFormDTO = 1;
required int64 amount = 2;
optional int64 commission = 3;
optional string requestId = 4;
// if populated new template will be created
optional string templateName = 5;
// if populated template will be attached to order
optional string templateId = 6;
/*
{templateName, templateId} are exclusive parameters,
i.e. only one should be populated or none of them,
otherwise it will call an IllegalArgumentException
*/
}
//endpoint URL: "/getNextPaymentForm"
//return: GetNextFormProtobufResponseDTO
// 422 on wrong requisites or invalid amount
message GetNextFormProtobufRequestDTO {
required FilledForm filledFormDTO = 1;
}
message GetNextFormProtobufResponseDTO {
required FilledForm filledFormDTO = 1;
required Form formDTO = 2;
}
//endpoint URL: "/getStandardForms"
message GetStandardFormsRequestProtobufDTO {
optional int32 dataHash = 1;
}
//empty response if there is no changes
//filled dataHash & standardForms otherwise
message GetStandardFormsResponseProtobufDTO {
optional int32 dataHash = 1;
optional BeneficiaryCategory standardForms = 2;
}
//endpoint URL: GET "/getRefillTrackerStatus"
message GetRefillTrackerStatusResponseProtobufDTO {
required int32 currentMonth = 1;
required int32 currentYear = 2;
/*
* In case of VC contains number of overall transfers.
* In case of Plastic contains number of transfers during current month.
*/
required int32 completedTransfersCount = 3;
/*
* Number of free transfers left
*/
required int32 remainingFreeTransfersCount = 4;
/*
* Count of free transfers according to conditions
*/
required int32 maxFreeTransfersCount = 5;
/*
* 30-days free-refill term termination date
*/
optional int64 termTerminationDate = 6;
}
//endpoint URL: GET "/getRefillCommission"
message GetRefillCommissionRequestProtobufDTO {
required int64 amount = 1;
}
message GetRefillCommissionResponseProtobufDTO {
required int64 commissionAmount = 1;
}
//endpoint URL: GET "/getC2CLimits"
// Accept-Language header param should be set
message GetC2CLimitsProtobufResponseDTO {
required int64 allowedAmount = 1;
repeated string possibleErrorMessages = 2;
}