-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathsavings.yaml
94 lines (89 loc) · 2.61 KB
/
savings.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
openapi: 3.0.1
info:
title: Create a savings application
description: >-
The OpenAPI specification for creating a savings application using the [Paystack API](https://paystack.com/docs/api/).
### Prerequisites
1. Sign up on [Paystack](https://paystack.com/signup) to get your secret API key
2. Set your API key as an environment variable on [Postman](https://learning.postman.com/docs/sending-requests/variables/)
Once setup, start with the [Initialize Transaction endpoint](https://paystack.com/docs/api/#transaction-initialize), where you'll open the `authorization_url` to load the Paystack Checkout and complete the transaction.
version: 1.0.0
servers:
- url: https://api.paystack.co
description: Base API endpoint
paths:
/transaction/initialize:
$ref: '../main/resources/transaction/initialize.yaml'
/transaction/charge_authorization:
$ref: '../main/resources/transaction/charge-authorization.yaml'
/bank/resolve:
$ref: '../main/resources/verification/resolve-bank.yaml'
/transferrecipient:
post:
$ref: '../main/resources/transfer-recipient/create.yaml'
/transfer:
post:
$ref: '../main/resources/transfer/initiate.yaml'
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
schemas:
Customer:
$ref: '../main/schemas/customer/Customer.yaml'
Error:
type: object
properties:
status:
type: boolean
message:
type: string
Response:
type: object
properties:
status:
type: boolean
message:
type: string
data:
type: object
responses:
Ok:
description: Successful operation
content:
application/json:
schema:
$ref: '../main/responses/response.yaml'
Created:
description: Resource created
content:
application/json:
schema:
$ref: '#/components/schemas/Response'
NotFound:
description: Entity not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
status: false
message: Entity not found
Unauthorized:
description: Unauthorized operation
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
status: false
message: Invalid key
GeneralError:
description: General Error
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
security:
- bearerAuth: []