|
| 1 | +openapi: 3.0.1 |
| 2 | +info: |
| 3 | + description: >- |
| 4 | + A API Evoluservices Orders facilita a criação de links para clientes pagarem |
| 5 | + aos estabelecimentos por serviços ou produtos adquiridos digitalmente. Ela |
| 6 | + tambem permite a consulta dos status dos pagamentos, a data estipulada para |
| 7 | + a liquidação das transações realizadas e os métodos de pagamento |
| 8 | + disponíveis. Para demonstracao use as credenciais `orders:123mudar` para |
| 9 | + testar os filtros de autorizacao. |
| 10 | + version: 2.0.0 |
| 11 | + title: Evoluservices Orders API |
| 12 | + contact: |
| 13 | + |
| 14 | +servers: |
| 15 | + - url: 'https://sandbox.evoluservices.com ' |
| 16 | + - url: 'https://evcash-latest.staging.evoluservices.com' |
| 17 | +tags: |
| 18 | + - name: payment-methods |
| 19 | + description: >- |
| 20 | + Obtém os métodos de pagamento disponíveis para estabelecimentos |
| 21 | + específicos |
| 22 | + - name: orders |
| 23 | + description: Operação para criar novos pedidos e verificar os já existentes |
| 24 | +paths: |
| 25 | + /api/payment-methods: |
| 26 | + get: |
| 27 | + tags: |
| 28 | + - payment-methods |
| 29 | + summary: Possui as formas de pagamento disponíveis ao estabelecimento |
| 30 | + operationId: paymentMethods |
| 31 | + parameters: |
| 32 | + - in: query |
| 33 | + name: paymentMethods.amount |
| 34 | + schema: |
| 35 | + type: string |
| 36 | + description: Valor do pagamento |
| 37 | + - in: query |
| 38 | + name: paymentMethods.merchantCode |
| 39 | + schema: |
| 40 | + type: string |
| 41 | + description: Código de identificação do estabelecimento |
| 42 | + responses: |
| 43 | + '200': |
| 44 | + description: OK |
| 45 | + content: |
| 46 | + application/json: |
| 47 | + schema: |
| 48 | + $ref: '#/components/schemas/PaymentMethodsOutputDto' |
| 49 | + '400': |
| 50 | + description: Exceção de validação |
| 51 | + '401': |
| 52 | + description: Não autorizado |
| 53 | + '404': |
| 54 | + description: estabelecimento não encontrado |
| 55 | + '422': |
| 56 | + description: Erro de integração |
| 57 | + '500': |
| 58 | + description: Erro interno no servidor |
| 59 | + security: |
| 60 | + - BasicAuth: [] |
| 61 | + /api/orders: |
| 62 | + post: |
| 63 | + tags: |
| 64 | + - orders |
| 65 | + summary: Cria uma nova transação e envia para aprovação |
| 66 | + operationId: createOrders |
| 67 | + requestBody: |
| 68 | + description: Objeto contendo as informações para a solicitação de transação |
| 69 | + content: |
| 70 | + application/json: |
| 71 | + schema: |
| 72 | + $ref: '#/components/schemas/ClientsOrderInputDto' |
| 73 | + required: true |
| 74 | + responses: |
| 75 | + '200': |
| 76 | + description: OK |
| 77 | + content: |
| 78 | + application/json: |
| 79 | + schema: |
| 80 | + $ref: '#/components/schemas/ClientsOrderOutputDto' |
| 81 | + '400': |
| 82 | + description: Exceção de validação |
| 83 | + '401': |
| 84 | + description: não autorizado |
| 85 | + '404': |
| 86 | + description: Estabelecimento não encontrado |
| 87 | + '422': |
| 88 | + description: Erro de integração |
| 89 | + '500': |
| 90 | + description: Erro interno no servidor |
| 91 | + security: |
| 92 | + - BasicAuth: [] |
| 93 | + '/api/orders/{uuid}': |
| 94 | + get: |
| 95 | + tags: |
| 96 | + - orders |
| 97 | + parameters: |
| 98 | + - required: true |
| 99 | + in: path |
| 100 | + name: uuid |
| 101 | + schema: |
| 102 | + type: string |
| 103 | + description: Uuid do Link de Pagamento |
| 104 | + summary: 'Consulta o Link de Pagamento e de acordo com o uuid ' |
| 105 | + operationId: consultOrder |
| 106 | + responses: |
| 107 | + '200': |
| 108 | + description: OK |
| 109 | + content: |
| 110 | + application/json: |
| 111 | + schema: |
| 112 | + $ref: '#/components/schemas/ClientsOrderTransactionsDto' |
| 113 | + '400': |
| 114 | + description: Exceção de validação |
| 115 | + '401': |
| 116 | + description: Não autorizado |
| 117 | + '404': |
| 118 | + description: Pedido não encontrado |
| 119 | + '422': |
| 120 | + description: Erro de integração |
| 121 | + '500': |
| 122 | + description: Erro interno no servidor |
| 123 | + security: |
| 124 | + - BasicAuth: [] |
| 125 | +components: |
| 126 | + schemas: |
| 127 | + PaymentMethodsInputDto: |
| 128 | + type: object |
| 129 | + properties: |
| 130 | + amount: |
| 131 | + type: string |
| 132 | + example: '10000' |
| 133 | + merchantCode: |
| 134 | + type: string |
| 135 | + example: AVD242AN |
| 136 | + PaymentMethodsOutputDto: |
| 137 | + type: object |
| 138 | + properties: |
| 139 | + paymentMethods: |
| 140 | + type: array |
| 141 | + items: |
| 142 | + $ref: '#/components/schemas/PaymentMethod' |
| 143 | + PaymentMethod: |
| 144 | + type: object |
| 145 | + properties: |
| 146 | + type: |
| 147 | + type: string |
| 148 | + example: CREDIT |
| 149 | + paymentOption: |
| 150 | + type: object |
| 151 | + $ref: '#/components/schemas/PaymentOption' |
| 152 | + PaymentOption: |
| 153 | + type: object |
| 154 | + properties: |
| 155 | + maxInstallments: |
| 156 | + type: number |
| 157 | + example: '12' |
| 158 | + paymentBrands: |
| 159 | + type: array |
| 160 | + items: |
| 161 | + type: string |
| 162 | + example: 'VISA, MASTER, ELO' |
| 163 | + ClientsOrderInputDto: |
| 164 | + type: object |
| 165 | + properties: |
| 166 | + order: |
| 167 | + type: object |
| 168 | + properties: |
| 169 | + reference: |
| 170 | + type: string |
| 171 | + example: 123CLIENTS |
| 172 | + redirectUrl: |
| 173 | + type: string |
| 174 | + example: 'https://example.com/callback' |
| 175 | + description: >- |
| 176 | + Redireciona a URL depois do pagamento do pedido. Faça um retorno |
| 177 | + de chamada 'POST' com o formato 'x-www-form-urlencoded' e com os |
| 178 | + parâmetros 'uuid' e 'transactionNumber'. |
| 179 | + amount: |
| 180 | + type: string |
| 181 | + example: '10000' |
| 182 | + maxInstallments: |
| 183 | + type: number |
| 184 | + example: '2' |
| 185 | + merchantCode: |
| 186 | + type: string |
| 187 | + example: A1B2C3 |
| 188 | + customerName: |
| 189 | + type: string |
| 190 | + example: Rodrigo |
| 191 | + customerDocument: |
| 192 | + type: string |
| 193 | + example: 01234567890 |
| 194 | + recurrent: |
| 195 | + type: boolean |
| 196 | + example: true |
| 197 | + recurrenceType: |
| 198 | + type: string |
| 199 | + enum: |
| 200 | + - MONTHLY |
| 201 | + - FLEXIBLE |
| 202 | + quantityCharges: |
| 203 | + type: number |
| 204 | + example: '10' |
| 205 | + frequency: |
| 206 | + type: number |
| 207 | + example: '30' |
| 208 | + ClientsOrderOutputDto: |
| 209 | + type: object |
| 210 | + properties: |
| 211 | + uuid: |
| 212 | + type: string |
| 213 | + example: e2ba235d-0b30-4edc-981d-e2c222763aee |
| 214 | + payUrl: |
| 215 | + type: string |
| 216 | + example: api.evoluservices.com/orders/pay |
| 217 | + reference: |
| 218 | + type: string |
| 219 | + example: 123CLIENTS |
| 220 | + status: |
| 221 | + type: string |
| 222 | + enum: |
| 223 | + - APPROVED |
| 224 | + - CANCELED |
| 225 | + - PENDING |
| 226 | + ClientsOrderTransactionsDto: |
| 227 | + type: object |
| 228 | + properties: |
| 229 | + uuid: |
| 230 | + type: string |
| 231 | + example: e2ba235d-0b30-4edc-981d-e2c222763aee |
| 232 | + reference: |
| 233 | + type: string |
| 234 | + example: 123CLIENTS |
| 235 | + status: |
| 236 | + type: string |
| 237 | + enum: |
| 238 | + - APPROVED |
| 239 | + - CANCELED |
| 240 | + - PENDING |
| 241 | + transactionList: |
| 242 | + type: array |
| 243 | + items: |
| 244 | + $ref: '#/components/schemas/ClientsTransactionDto' |
| 245 | + ClientsTransactionDto: |
| 246 | + type: object |
| 247 | + properties: |
| 248 | + number: |
| 249 | + type: number |
| 250 | + example: '12345678909' |
| 251 | + status: |
| 252 | + type: string |
| 253 | + enum: |
| 254 | + - APPROVED |
| 255 | + - CANCELLED |
| 256 | + - ABORTED |
| 257 | + - ABORTED_BY_MERCHANT |
| 258 | + - PARTIALLY_CANCELED |
| 259 | + description: >- |
| 260 | + Além dos valores abaixo, temos algumas outras possibilidades de |
| 261 | + status para controle interno, por exemplo: COMPLETE, INCOMPLETE, |
| 262 | + CANCEL_REQUESTED, etc, mas eles não devem ser considerados como |
| 263 | + valores esperados porque são extremamente voláteis. |
| 264 | + amount: |
| 265 | + type: number |
| 266 | + example: '100.00' |
| 267 | + installments: |
| 268 | + type: number |
| 269 | + example: '2' |
| 270 | + paymentBrand: |
| 271 | + type: string |
| 272 | + enum: |
| 273 | + - VISA_CREDITO |
| 274 | + - VISA_ELECTRON |
| 275 | + - MASTERCARD |
| 276 | + - MAESTRO |
| 277 | + - AMEX |
| 278 | + - DINERS |
| 279 | + - HIPERCARD |
| 280 | + - AURA |
| 281 | + - SOROCRED |
| 282 | + - BANRISUL |
| 283 | + - ELO |
| 284 | + - SICREDI |
| 285 | + - ELO_DEBITO |
| 286 | + - BRADESCO |
| 287 | + - HIPER |
| 288 | + - AGIPLAN |
| 289 | + - BANESCARD |
| 290 | + - CREDZ |
| 291 | + - JCB |
| 292 | + - CABAL |
| 293 | + - MAIS |
| 294 | + - CHEQUE_TELECHEQUE |
| 295 | + - CHEQUE_CREDITALL |
| 296 | + - BOLETO |
| 297 | + - BANESCARD_DEBITO |
| 298 | + - CABAL_DEBITO |
| 299 | + - HIPER_DEBITO |
| 300 | + - REDESHOP |
| 301 | + paymentQuantity: |
| 302 | + type: number |
| 303 | + example: '3' |
| 304 | + nsu: |
| 305 | + type: string |
| 306 | + example: '993485982' |
| 307 | + authorizationNumber: |
| 308 | + type: string |
| 309 | + example: '470216' |
| 310 | + customer: |
| 311 | + type: object |
| 312 | + $ref: '#/components/schemas/SubjectIdentifierDto' |
| 313 | + payments: |
| 314 | + type: array |
| 315 | + items: |
| 316 | + $ref: '#/components/schemas/ClientsTransactionPaymentDto' |
| 317 | + SubjectIdentifierDto: |
| 318 | + type: object |
| 319 | + properties: |
| 320 | + name: |
| 321 | + type: string |
| 322 | + example: Jose da Silva |
| 323 | + document: |
| 324 | + type: string |
| 325 | + example: 123.456.789-09 |
| 326 | + ClientsTransactionPaymentDto: |
| 327 | + type: object |
| 328 | + properties: |
| 329 | + number: |
| 330 | + type: number |
| 331 | + example: '12345678909' |
| 332 | + amount: |
| 333 | + type: number |
| 334 | + example: '100.00' |
| 335 | + status: |
| 336 | + type: string |
| 337 | + enum: |
| 338 | + - PAYED |
| 339 | + - UNPAID |
| 340 | + - ANTICIPATION_REQUESTED |
| 341 | + - ANTICIPATED |
| 342 | + - CANCEL_REQUESTED |
| 343 | + - CANCELLED |
| 344 | + payDate: |
| 345 | + type: string |
| 346 | + example: 01/01/2001 |
| 347 | + description: >- |
| 348 | + Descreve a data em que o pagamento efetivamente foi feito ou, se |
| 349 | + ainda não foi pago, mostra a data esperada. |
| 350 | + merchant: |
| 351 | + type: object |
| 352 | + $ref: '#/components/schemas/SubjectIdentifierDto' |
| 353 | + securitySchemes: |
| 354 | + BasicAuth: |
| 355 | + type: http |
| 356 | + scheme: basic |
0 commit comments