added api docs
This commit is contained in:
29
interface/api/payments/bodies/payment.yaml
Normal file
29
interface/api/payments/bodies/payment.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
components:
|
||||
requestBodies:
|
||||
QuotePaymentBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../request/payment.yaml#/components/schemas/QuotePaymentRequest
|
||||
|
||||
QuotePaymentsBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../request/payment.yaml#/components/schemas/QuotePaymentsRequest
|
||||
|
||||
InitiatePaymentBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../request/payment.yaml#/components/schemas/InitiatePaymentRequest
|
||||
|
||||
InitiatePaymentsBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../request/payment.yaml#/components/schemas/InitiatePaymentsRequest
|
||||
30
interface/api/payments/by_multiquote.yaml
Normal file
30
interface/api/payments/by_multiquote.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
post:
|
||||
tags: [Payments]
|
||||
summary: Initiate payment batch by quote reference
|
||||
operationId: paymentsInitiateBatchByQuote
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
requestBody:
|
||||
$ref: ./bodies/payment.yaml#/components/requestBodies/InitiatePaymentsBody
|
||||
responses:
|
||||
'200':
|
||||
description: Payment batch initiated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment.yaml#/components/schemas/PaymentsData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
41
interface/api/payments/by_quote.yaml
Normal file
41
interface/api/payments/by_quote.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
post:
|
||||
tags: [Payments]
|
||||
summary: Initiate payment using quote reference
|
||||
operationId: paymentsInitiateByQuote
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ./request/payment.yaml#/components/schemas/InitiatePaymentRequest
|
||||
- type: object
|
||||
required:
|
||||
- quoteRef
|
||||
not:
|
||||
required:
|
||||
- intent
|
||||
responses:
|
||||
'200':
|
||||
description: Payment initiated by quote
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment.yaml#/components/schemas/PaymentData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
41
interface/api/payments/immediate.yaml
Normal file
41
interface/api/payments/immediate.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
post:
|
||||
tags: [Payments]
|
||||
summary: Initiate payment from immediate intent
|
||||
operationId: paymentsInitiateImmediate
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ./request/payment.yaml#/components/schemas/InitiatePaymentRequest
|
||||
- type: object
|
||||
required:
|
||||
- intent
|
||||
not:
|
||||
required:
|
||||
- quoteRef
|
||||
responses:
|
||||
'200':
|
||||
description: Payment initiated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment.yaml#/components/schemas/PaymentData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
50
interface/api/payments/list.yaml
Normal file
50
interface/api/payments/list.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
get:
|
||||
tags: [Payments]
|
||||
summary: List payments in organization
|
||||
operationId: paymentsList
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
- $ref: ../parameters/cursor.yaml#/components/parameters/Cursor
|
||||
- $ref: ../parameters/limit.yaml#/components/parameters/Limit
|
||||
- name: quotation_ref
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
- name: created_from
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
- name: created_to
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
format: date-time
|
||||
- $ref: ../parameters/state.yaml#/components/parameters/State
|
||||
- $ref: ../parameters/states.yaml#/components/parameters/States
|
||||
- $ref: ../parameters/filter_states.yaml#/components/parameters/FilterStates
|
||||
responses:
|
||||
'200':
|
||||
description: Payments list
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment.yaml#/components/schemas/PaymentsData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
30
interface/api/payments/multiquote.yaml
Normal file
30
interface/api/payments/multiquote.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
post:
|
||||
tags: [Payments]
|
||||
summary: Quote multiple payment intents
|
||||
operationId: paymentsMultiQuote
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
requestBody:
|
||||
$ref: ./bodies/payment.yaml#/components/requestBodies/QuotePaymentsBody
|
||||
responses:
|
||||
'200':
|
||||
description: Quotes generated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment.yaml#/components/schemas/PaymentQuotesData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
30
interface/api/payments/quote.yaml
Normal file
30
interface/api/payments/quote.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
post:
|
||||
tags: [Payments]
|
||||
summary: Quote single payment intent
|
||||
operationId: paymentsQuote
|
||||
security:
|
||||
- bearerAuth: []
|
||||
parameters:
|
||||
- $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef
|
||||
requestBody:
|
||||
$ref: ./bodies/payment.yaml#/components/requestBodies/QuotePaymentBody
|
||||
responses:
|
||||
'200':
|
||||
description: Quote generated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
allOf:
|
||||
- $ref: ../response/response.yaml#/components/schemas/BaseResponse
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
$ref: ./response/payment.yaml#/components/schemas/PaymentQuoteData
|
||||
'400':
|
||||
$ref: ../response/operation.yaml#/components/responses/BadRequest
|
||||
'401':
|
||||
$ref: ../response/operation.yaml#/components/responses/Unauthorized
|
||||
'403':
|
||||
$ref: ../response/operation.yaml#/components/responses/Forbidden
|
||||
'500':
|
||||
$ref: ../response/operation.yaml#/components/responses/InternalServerError
|
||||
104
interface/api/payments/request/payment.yaml
Normal file
104
interface/api/payments/request/payment.yaml
Normal file
@@ -0,0 +1,104 @@
|
||||
components:
|
||||
schemas:
|
||||
PaymentBase:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- idempotencyKey
|
||||
properties:
|
||||
idempotencyKey:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
|
||||
QuotePaymentRequest:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- intent
|
||||
properties:
|
||||
idempotencyKey:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
intent:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentIntent
|
||||
previewOnly:
|
||||
type: boolean
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
previewOnly:
|
||||
const: true
|
||||
required:
|
||||
- previewOnly
|
||||
then:
|
||||
not:
|
||||
required:
|
||||
- idempotencyKey
|
||||
else:
|
||||
required:
|
||||
- idempotencyKey
|
||||
|
||||
QuotePaymentsRequest:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- intents
|
||||
properties:
|
||||
idempotencyKey:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
additionalProperties:
|
||||
type: string
|
||||
intents:
|
||||
type: array
|
||||
minItems: 1
|
||||
items:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentIntent
|
||||
previewOnly:
|
||||
type: boolean
|
||||
allOf:
|
||||
- if:
|
||||
properties:
|
||||
previewOnly:
|
||||
const: true
|
||||
required:
|
||||
- previewOnly
|
||||
then:
|
||||
not:
|
||||
required:
|
||||
- idempotencyKey
|
||||
else:
|
||||
required:
|
||||
- idempotencyKey
|
||||
|
||||
InitiatePaymentRequest:
|
||||
allOf:
|
||||
- $ref: ./payment.yaml#/components/schemas/PaymentBase
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
oneOf:
|
||||
- required: [intent]
|
||||
- required: [quoteRef]
|
||||
properties:
|
||||
intent:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentIntent
|
||||
quoteRef:
|
||||
type: string
|
||||
|
||||
InitiatePaymentsRequest:
|
||||
allOf:
|
||||
- $ref: ./payment.yaml#/components/schemas/PaymentBase
|
||||
- type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- quoteRef
|
||||
properties:
|
||||
quoteRef:
|
||||
type: string
|
||||
66
interface/api/payments/response/payment.yaml
Normal file
66
interface/api/payments/response/payment.yaml
Normal file
@@ -0,0 +1,66 @@
|
||||
components:
|
||||
schemas:
|
||||
PaymentQuoteData:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- accessToken
|
||||
- quote
|
||||
properties:
|
||||
accessToken:
|
||||
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
|
||||
idempotencyKey:
|
||||
type: string
|
||||
quote:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentQuote
|
||||
|
||||
PaymentQuotesData:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- accessToken
|
||||
- quote
|
||||
properties:
|
||||
accessToken:
|
||||
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
|
||||
quote:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
properties:
|
||||
idempotencyKey:
|
||||
type: string
|
||||
quoteRef:
|
||||
type: string
|
||||
aggregate:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentQuoteAggregate
|
||||
quotes:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/PaymentQuote
|
||||
|
||||
PaymentsData:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- accessToken
|
||||
properties:
|
||||
accessToken:
|
||||
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
|
||||
payments:
|
||||
type: array
|
||||
items:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/Payment
|
||||
page:
|
||||
$ref: ../../../models/common/pagination.yaml#/components/schemas/CursorPageResponse
|
||||
|
||||
PaymentData:
|
||||
type: object
|
||||
additionalProperties: false
|
||||
required:
|
||||
- accessToken
|
||||
- payment
|
||||
properties:
|
||||
accessToken:
|
||||
$ref: ../../../models/auth/token_data.yaml#/components/schemas/TokenData
|
||||
payment:
|
||||
$ref: ../../../models/payment/payment.yaml#/components/schemas/Payment
|
||||
Reference in New Issue
Block a user