Skip to content

Commit

Permalink
Merge pull request #101 from Open-Pix/fix/apis
Browse files Browse the repository at this point in the history
fix(apis): apis
  • Loading branch information
daniloab authored Nov 4, 2022
2 parents 45007dd + 5bbe07c commit fbe9d54
Show file tree
Hide file tree
Showing 4 changed files with 313 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/swaggers/openpix.json

Large diffs are not rendered by default.

310 changes: 310 additions & 0 deletions src/swaggers/openpix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,179 @@ paths:
properties:
error:
type: string
/api/openpix/v1/pay/confirm:
post:
tags:
- payment
summary: Confirm a Payment
description: Endpoint to confirm a payment
requestBody:
description: Data to confirm a pending payment
required: true
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/PayConfirmPayload"
example:
correlationID: pay1
responses:
"200":
description: Payment destination account information
content:
application/json:
schema:
type: object
properties:
payment:
$ref: "#/components/schemas/PayConfirmPayment"
example:
payment:
correlationID: 9134e286-6f71-427a-bf00-241681624586
destination:
value: 100
status: CONFIRMED
pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
pixKeyType: RANDOM
account:
branch: "1234"
account: "12345"
accountType: ContaCorrente
psp:
id: "1234"
name: Banco de Exemplo
code: "555"
holder:
name: Pessoa Juridica
taxID:
taxID: "1234567890"
type: CNPJ
"400":
description: An error message
content:
application/json:
schema:
type: object
properties:
error:
type: string
/api/openpix/v1/pay/pix-key:
post:
tags:
- payment
summary: Init a payment using a Pix Key
description: Endpoint to init a payment using a Pix Key
requestBody:
description: Data to create new payment
required: true
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/PayPixKeyPayload"
example:
pixKey: c4249323-b4ca-43f2-8139-784baab09b93
pixKeyType: RANDOM
value: 1
correlationID: pay1
responses:
"200":
description: Payment destination account information
content:
application/json:
schema:
type: object
properties:
payment:
$ref: "#/components/schemas/PaymentPixKey"
example:
payment:
correlationID: 9134e286-6f71-427a-bf00-241681624586
value: 100
status: PENDING
destination:
pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
pixKeyType: RANDOM
account:
branch: "1234"
account: "12345"
accountType: ContaCorrente
psp:
id: "1234"
name: Banco de Exemplo
code: "555"
holder:
name: Pessoa Juridica
taxID:
taxID: "1234567890"
type: CNPJ
"400":
description: An error message
content:
application/json:
schema:
type: object
properties:
error:
type: string
/api/openpix/v1/pay/qrcode:
post:
tags:
- payment
summary: Init a payment using a QRCode
description: Endpoint to init a payment using a QRCode
requestBody:
description: Data to create new payment
required: true
content:
application/json:
schema:
type: object
$ref: "#/components/schemas/PayQRCodeload"
example:
qrcode: 00020126580014br.gov.bcb.pix01365fd0bae1-ccf3-4675-a189-c9eaee189bc65204000053039865406100.005802BR5909LOCALHOST6009Sao
Paulo62100506doe10063042F24
correlationID: pay1
responses:
"200":
description: Payment destination account information
content:
application/json:
schema:
type: object
properties:
payment:
$ref: "#/components/schemas/PaymentPixKey"
example:
payment:
correlationID: 9134e286-6f71-427a-bf00-241681624586
destination:
value: 100
status: PENDING
pixKey: c4249323-b4ca-43f2-8139-8232aab09b93
pixKeyType: RANDOM
account:
branch: "1234"
account: "12345"
accountType: ContaCorrente
psp:
id: "1234"
name: Banco de Exemplo
code: "555"
holder:
name: Pessoa Juridica
taxID:
taxID: "1234567890"
type: CNPJ
"400":
description: An error message
content:
application/json:
schema:
type: object
properties:
error:
type: string
"/api/openpix/v1/giftback/balance/{taxID}":
get:
tags:
Expand Down Expand Up @@ -2479,6 +2652,140 @@ components:
required:
- name
- identifier
PayPixKeyPayload:
type: object
properties:
correlationID:
type: string
description: Your correlation ID to keep track of this payment
pixKey:
type: string
description: Pix Key of destination account
pixKeyType:
description: Pix Key type of destination account
type: string
enum:
- CPF
- CNPJ
- EMAIL
- PHONE
- RANDOM
value:
description: Value of this payment in cents
type: number
PayQRCodeload:
type: object
properties:
correlationID:
type: string
description: Your correlation ID to keep track of this payment
qrcode:
type: string
description: QRCode text content EMV
value:
description: Value of this payment in cents, it won't be used if QRCode has a
predefined value
type: number
PayConfirmPayload:
type: object
properties:
correlationID:
type: string
description: Your correlation ID to keep track of this payment
DestinationAccount:
type: object
properties:
pixKey:
type: string
description: Pix Key of this destination account
pixKeyType:
type: string
description: Pix Key type of this destination account
enum:
- CPF
- CNPJ
- EMAIL
- PHONE
- RANDOM
account:
type: object
properties:
branch:
type: string
description: Branch of destination account
account:
type: string
description: Account number of destination account
accountType:
type: string
description: Account type of destination account
psp:
type: object
properties:
id:
type: string
description: Payment Service Provider id
name:
type: string
description: Payment Service Provider name
code:
type: string
description: Payment Service Provider code
holder:
type: object
properties:
name:
type: string
description: Account holder name
nameFriendly:
type: string
description: Account holder name friendly (Nome Fantasia)
taxID:
type: object
properties:
taxID:
type: string
description: Tax Identifier (CPF/CNPJ) of account holder
type:
type: string
description: Tax Identifier type
enum:
- CPF
- CNPJ
PaymentPixKey:
type: object
properties:
correlationID:
type: string
description: your correlation ID to keep track of this payment
value:
description: Value of this payment in cents
type: number
status:
type: string
description: Payment status
enum:
- PENDING
- CONFIRMED
destination:
type: object
description: account destination info of this pix key
$ref: "#/components/schemas/DestinationAccount"
PayConfirmPayment:
type: object
properties:
correlationID:
type: string
description: your correlation ID to keep track of this payment
value:
description: Value of this payment in cents
type: number
status:
type: string
description: Payment status
enum:
- PENDING
- CONFIRMED
User:
type: object
properties:
Expand Down Expand Up @@ -2732,6 +3039,9 @@ tags:
- name: customer
description: |
Endpoint to manage Customer
- name: payment
description: |
Endpoint to init a payment using a Pix Key or QRCode.<br />
- name: partner (request access)
description: |
Partners integrate affiliated companies.<br/>
Expand Down
2 changes: 1 addition & 1 deletion src/swaggers/openpixPostman.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion static/openpixPostman.json

Large diffs are not rendered by default.

0 comments on commit fbe9d54

Please sign in to comment.