forked from infitx-org/cbs-core-connector-test-harness
-
Notifications
You must be signed in to change notification settings - Fork 0
/
payer.yaml
347 lines (334 loc) · 10.3 KB
/
payer.yaml
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
openapi: 3.0.1
info:
title: Core Banking System Core Connector Send Money API
description: >
Specification for Core Banking System Core Connectors Send Money API.
This API is intended to be implemented by the Core Connector. It is used to
initiate transfers from a DFSP Operations application.
**USE CASE AND SCENARIO**
Assuming a customer in your DFSP wants to send money from their account held
in your bank to another customer whose account is in another bank in the Mojaloop
Scheme.
Once the customer has initaited the transfer using your application, to effect the transfer,
a POST send-money api call will be sent to this api. This api is to be implemented by the
core connector such it can receive requests from your Operations application which will then effectively communicate with your DFSP Hosted Mojaloop
connector to be able to effect the transfer in the mojaloop switch.
**Note on terminology:** The term "Switch" is equal to the term "Hub", and
the term "FSP" is equal to the term "DFSP".
license:
name: Apache License Version 2.0, January 2004
url: https://github.com/mojaloop/documentation/blob/main/LICENSE.md
version: 1.0.0
paths:
/:
get:
summary: Health check endpoint
description: >-
This endpoint allows a user of the SDK scheme adapter to check the
outbound transfers service is listening.
tags:
- Health
responses:
'200':
description: >-
Returns empty body if the scheme adapter outbound transfers service
is running.
/send-money:
post:
summary: Send Money endpoint
description: >-
The Endpoint used by the DFSP Operations application to initiate send money
requests to the mojaloop connector
requestBody:
description: Send Money request body
content:
application/json:
schema:
$ref: "#/components/schemas/sendMoneyRequest"
tags:
- Send Money
responses:
'200':
description: >-
Response for send money request. A quote if it is double
integration or a payment status response if it is single
integration
content:
application/json:
schema:
$ref: "#/components/schemas/sendMoneyResponse"
'400':
description: >-
Response for a bad request.
'500':
description: >-
Response for an internal server error
'504':
description: >-
Response for a timed out transfer
/send-money/{id}:
put:
summary: Confirm send money
parameters:
- name: id
in: path
required: true
description: The ID of the transaction
schema:
type: string
example: "HTX987654321"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfirmSendMoney'
tags:
- Send Money
responses:
'200':
description: Send money confirmed successfully
'400':
description: Bad request
/merchant-payment:
post:
summary: Send Money endpoint
description: >-
The Endpoint used by the DFSP Operations application to initiate merchant payment
requests to the mojaloop connector
requestBody:
description: Send Money request body
content:
application/json:
schema:
$ref: "#/components/schemas/merchantPaymentRequest"
tags:
- Merchant Payments
responses:
'200':
description: >-
Response for send money request. A quote if it is double
integration or a payment status response if it is single
integration
content:
application/json:
schema:
$ref: "#/components/schemas/merchantPaymentResponse"
'400':
description: >-
Response for bad request
'500':
description: >-
Internal Server error
'504':
description: >-
Transfer Timeout.
/merchant-payment/{id}:
put:
summary: Confirm send money
parameters:
- name: id
in: path
required: true
description: The ID of the transaction
schema:
type: string
example: "HTX987654321"
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ConfirmSendMoney'
tags:
- Merchant Payments
responses:
'200':
description: Send money confirmed successfully
'400':
description: Bad request
components:
schemas:
merchantPaymentRequest:
type: object
properties:
homeTransactionId:
type: string
example: "HTX123456789"
merchantPaymentId:
type: string
example: "16135551212"
merchantPaymentIdType:
type: string
example: "MSISDN"
receiveAmount:
type: string
example: "150.00"
receiveCurrency:
type: string
example: "UGX"
sendCurrency:
type: string
example: "KES"
transactionDescription:
type: string
example: "Payment for services"
transactionType:
type: string
example: "TRANSFER"
payer:
type: string
example: "John Doe"
payerAccount:
type: string
example: "9876543210"
dateOfBirth:
type: string
format: date
example: "1985-04-12"
geoLocationData:
description: >-
Indicates the geographic location from where the transaction was
initiated.
properties:
latitude:
$ref: '#/components/schemas/latitude'
longitude:
$ref: '#/components/schemas/longitude'
required:
- latitude
- longitude
type: object
latitude:
description: >-
The API data type Latitude is a JSON String in a lexical format that is
restricted by a regular expression for interoperability reasons.
pattern: >-
^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$
type: string
longitude:
description: >-
The API data type Longitude is a JSON String in a lexical format that is
restricted by a regular expression for interoperability reasons.
pattern: >-
^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$
type: string
merchantPaymentResponse:
type: object
properties:
merchantDetails:
type: string
example: "{\"name\":\"Jane Smith\",\"accountNumber\":\"1234567890\",\"bankName\":\"Example Bank\",\"address\":\"456 Elm Street, Somecity, Country\"}"
sendAmount:
type: string
example: "140.00"
sendCurrency:
type: string
example: "EUR"
fees:
type: string
example: "10.00"
feeCurrency:
type: string
example: "USD"
exchangeRate:
type: string
example: "1.10"
expiryDateTime:
type: string
format: date-time
example: "2024-08-01T12:00:00Z"
sendMoneyResponse:
type: object
properties:
payeeDetails:
type: string
example: "{\"name\":\"Jane Smith\",\"accountNumber\":\"1234567890\",\"bankName\":\"Example Bank\",\"address\":\"456 Elm Street, Somecity, Country\"}"
receiveAmount:
type: string
example: "140.00"
receiveCurrency:
type: string
example: "EUR"
fees:
type: string
example: "10.00"
feeCurrency:
type: string
example: "USD"
exchangeRate:
type: string
example: "1.10"
expiryDateTime:
type: string
format: date-time
example: "2024-08-01T12:00:00Z"
sendMoneyRequest:
type: object
properties:
homeTransactionId:
type: string
example: "HTX123456789"
payeeId:
type: string
example: "16135551212"
payeeIdType:
type: string
example: "MSISDN"
sendAmount:
type: string
example: "150.00"
sendCurrency:
type: string
example: "UGX"
receiveCurrency:
type: string
example: "KES"
transactionDescription:
type: string
example: "Payment for services"
transactionType:
type: string
example: "TRANSFER"
payer:
type: string
example: "John Doe"
payerAccount:
type: string
example: "9876543210"
dateOfBirth:
type: string
format: date
example: "1985-04-12"
geoLocationData:
description: >-
Indicates the geographic location from where the transaction was
initiated.
properties:
latitude:
$ref: '#/components/schemas/latitude'
longitude:
$ref: '#/components/schemas/longitude'
required:
- latitude
- longitude
type: object
latitude:
description: >-
The API data type Latitude is a JSON String in a lexical format that is
restricted by a regular expression for interoperability reasons.
pattern: >-
^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$
type: string
longitude:
description: >-
The API data type Longitude is a JSON String in a lexical format that is
restricted by a regular expression for interoperability reasons.
pattern: >-
^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,6})?))$
type: string
ConfirmSendMoney:
type: object
properties:
acceptQuote:
type: boolean