-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d5edaed
commit fd84433
Showing
43 changed files
with
4,033 additions
and
872 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,364 @@ | ||
openapi: 3.0.1 | ||
info: | ||
title: Create a wallet app | ||
description: The OpenAPI specification for creating a wallet application using the Paystack API | ||
version: 1.0.0 | ||
servers: | ||
- url: 'https://api.paystack.co' | ||
description: Base API endpoint | ||
paths: | ||
/customer: | ||
post: | ||
tags: | ||
- Customer | ||
summary: Create Customer | ||
operationId: customer_create | ||
requestBody: | ||
content: | ||
application/x-www-form-urlencoded: | ||
schema: | ||
allOf: | ||
- $ref: '#/components/schemas/Customer/allOf/0' | ||
- $ref: '#/components/schemas/Customer/allOf/1' | ||
application/json: | ||
schema: | ||
allOf: | ||
- $ref: '#/components/schemas/Customer/allOf/0' | ||
- $ref: '#/components/schemas/Customer/allOf/1' | ||
responses: | ||
'200': | ||
description: Request successful | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/responses/Ok/content/application~1json/schema' | ||
'401': | ||
description: Unauthorized operation | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: boolean | ||
message: | ||
type: string | ||
default: | ||
description: Server error | ||
'/customer/{code}/identification': | ||
parameters: | ||
- name: code | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
post: | ||
tags: | ||
- Customer | ||
summary: Validate Customer | ||
operationId: customer_validatte | ||
description: Validate a customer's identity | ||
requestBody: | ||
content: | ||
application/x-www-form-urlencoded: | ||
schema: | ||
$ref: '#/components/schemas/Customer/allOf/4' | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/Customer/allOf/4' | ||
responses: | ||
'202': | ||
description: Request accepted for processing | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
status: | ||
type: boolean | ||
message: | ||
type: string | ||
'401': | ||
$ref: '#/paths/~1customer/post/responses/401' | ||
default: | ||
description: Server error | ||
/dedicated_account: | ||
post: | ||
tags: | ||
- Dedicated Virtual Account | ||
summary: Create Dedicated Account | ||
operationId: dedicatedAccount_create | ||
requestBody: | ||
content: | ||
application/x-www-form-urlencoded: | ||
schema: | ||
$ref: '#/paths/~1dedicated_account/post/requestBody/content/application~1json/schema' | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- customer | ||
properties: | ||
customer: | ||
description: Customer ID or code | ||
type: string | ||
preferred_bank: | ||
description: 'The bank slug for preferred bank. To get a list of available banks, use the List Providers endpoint' | ||
type: string | ||
subaccount: | ||
description: Subaccount code of the account you want to split the transaction with | ||
type: string | ||
split_code: | ||
description: Split code consisting of the lists of accounts you want to split the transaction with | ||
type: string | ||
responses: | ||
'200': | ||
$ref: '#/paths/~1customer/post/responses/200' | ||
'401': | ||
$ref: '#/paths/~1customer/post/responses/401' | ||
default: | ||
description: Server error | ||
/transferrecipient: | ||
post: | ||
tags: | ||
- Transfer Recipient | ||
summary: Create Transfer Recipient | ||
operationId: transferrecipient_create | ||
requestBody: | ||
content: | ||
application/x-www-form-urlencoded: | ||
schema: | ||
$ref: '#/paths/~1transferrecipient/post/requestBody/content/application~1json/schema' | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- type | ||
- name | ||
- account_number | ||
- bank_code | ||
properties: | ||
type: | ||
description: Recipient Type (Only nuban at this time) | ||
type: string | ||
name: | ||
description: Recipient's name | ||
type: string | ||
account_number: | ||
description: Recipient's bank account number | ||
type: string | ||
bank_code: | ||
description: Recipient's bank code. You can get the list of Bank Codes by calling the List Banks endpoint | ||
type: string | ||
description: | ||
description: A description for this recipient | ||
type: string | ||
currency: | ||
description: Currency for the account receiving the transfer | ||
type: string | ||
authorization_code: | ||
description: An authorization code from a previous transaction | ||
type: string | ||
metadata: | ||
description: Stringified JSON object of custom data | ||
type: string | ||
responses: | ||
'201': | ||
description: Resource created | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/responses/Ok/content/application~1json/schema' | ||
'401': | ||
$ref: '#/paths/~1customer/post/responses/401' | ||
default: | ||
description: Server error | ||
/transfer: | ||
post: | ||
tags: | ||
- Transfer | ||
summary: Initiate Transfer | ||
operationId: transfer_initiate | ||
requestBody: | ||
content: | ||
application/x-www-form-urlencoded: | ||
schema: | ||
$ref: '#/paths/~1transfer/post/requestBody/content/application~1json/schema' | ||
application/json: | ||
schema: | ||
type: object | ||
required: | ||
- source | ||
- amount | ||
- recipient | ||
properties: | ||
source: | ||
description: Where should we transfer from? Only balance is allowed for now | ||
type: string | ||
amount: | ||
description: Amount to transfer in kobo if currency is NGN and pesewas if currency is GHS. | ||
type: string | ||
recipient: | ||
description: The transfer recipient's code | ||
type: string | ||
reason: | ||
description: The reason or narration for the transfer. | ||
type: string | ||
currency: | ||
description: Specify the currency of the transfer. Defaults to NGN. | ||
type: string | ||
reference: | ||
description: |- | ||
If specified, the field should be a unique identifier (in lowercase) for the object. | ||
Only -,_ and alphanumeric characters are allowed. | ||
type: string | ||
responses: | ||
'200': | ||
$ref: '#/paths/~1customer/post/responses/200' | ||
'401': | ||
$ref: '#/paths/~1customer/post/responses/401' | ||
default: | ||
description: Server error | ||
components: | ||
securitySchemes: | ||
bearerAuth: | ||
type: http | ||
scheme: bearer | ||
schemas: | ||
Customer: | ||
allOf: | ||
- type: object | ||
required: | ||
properties: | ||
email: | ||
description: Customer's email address | ||
type: string | ||
- type: object | ||
properties: | ||
first_name: | ||
description: Customer's first name | ||
type: string | ||
last_name: | ||
description: Customer's last name | ||
type: string | ||
phone: | ||
description: Customer's phone number | ||
type: string | ||
metadata: | ||
description: Stringified JSON object of custom data | ||
type: string | ||
- type: object | ||
required: | ||
- authorization_code | ||
properties: | ||
authorization_code: | ||
description: Customer's authorization code to be deactivated | ||
type: string | ||
- type: object | ||
required: | ||
- customer | ||
properties: | ||
customer: | ||
description: 'Customer''s code, or email address' | ||
type: string | ||
risk_action: | ||
description: | | ||
One of the possible risk actions [ default, allow, deny ]. allow to whitelist. | ||
deny to blacklist. Customers start with a default risk action. | ||
type: string | ||
enum: | ||
- default | ||
- allow | ||
- deny | ||
- type: object | ||
required: | ||
- type | ||
- country | ||
- bvn | ||
- bank_code | ||
- account_number | ||
properties: | ||
type: | ||
description: Predefined types of identification. | ||
type: string | ||
enum: | ||
- bvn | ||
- bank_account | ||
country: | ||
description: Two-letter country code of identification issuer | ||
type: string | ||
bvn: | ||
description: Customer's Bank Verification Number | ||
type: string | ||
bank_code: | ||
description: 'You can get the list of bank codes by calling the List Banks endpoint (https://api.paystack.co/bank).' | ||
type: string | ||
account_number: | ||
description: Customer's bank account number. | ||
type: string | ||
value: | ||
description: Customer's identification number. Required if type is bvn | ||
type: string | ||
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: | ||
type: object | ||
properties: | ||
status: | ||
type: boolean | ||
message: | ||
type: string | ||
data: | ||
type: object | ||
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: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
tags: | ||
- Customer | ||
summary: Create Customer | ||
operationId: customer_create | ||
requestBody: | ||
content: | ||
application/x-www-form-urlencoded: | ||
schema: | ||
allOf: | ||
- $ref: '../../schemas/customer/CustomerRequired.yaml' | ||
- $ref: '../../schemas/customer/CustomerBase.yaml' | ||
application/json: | ||
schema: | ||
allOf: | ||
- $ref: '../../schemas/customer/CustomerRequired.yaml' | ||
- $ref: '../../schemas/customer/CustomerBase.yaml' | ||
responses: | ||
200: | ||
$ref: '../../responses/ok.yaml' | ||
401: | ||
$ref: '../../responses/unauthorized.yaml' | ||
default: | ||
description: Server error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
parameters: | ||
- name: code | ||
in: path | ||
required: true | ||
schema: | ||
type: string | ||
post: | ||
tags: | ||
- Customer | ||
|
Oops, something went wrong.