openapi: 3.0.3
info:
title: Antifraud Access PaymentRequest API
description: Antifraud services
license:
name: Apache License Version 2.0
url: http://www.apache.org/licenses/LICENSE-2.0.html
version: '2.0'
servers:
- url: https://api-sandbox.koin.com.br
description: Sandbox domain url
tags:
- name: PaymentRequest
paths:
/PaymentRequest/check:
post:
summary: Check
description: ''
operationId: check
requestBody:
content:
application/json:
schema:
type: object
required:
- CPF
- TotalPrice
- UseDate
- SalesChannelId
- Proposal
properties:
FraudId:
type: string
default: '221313221'
MaxInstallments:
type: string
default: '12'
CPF:
type: string
default: 09427275090
Email:
type: string
default: email@dominio.com.br
TotalPrice:
type: number
default: 1000
format: double
UseDate:
type: string
default: '2021-05-24'
Ip:
type: string
default: '001'
Optin:
type: string
SalesChannelId:
type: string
default: '3'
Proposal:
type: string
default: '1234546'
responses:
'200':
description: '200'
content:
application/json:
examples:
APPROVED:
value: "{\n \"UseDate\": \"05/24/2021\",\n \"Message\": \"Request authorized!\",\n \"amountInstallments\": 3,\n \"installmentOptions\": [\n {\n \"of\": null,\n \"cet\": null,\n \"installments\": \"1\",\n \"rates\": null,\n \"description\": \"On view\",\n \"originalValue\": \"570.00\",\n \"firstDueDate\": \"2020-12-11\",\n \"cetAM\": \"0.63\",\n \"orderValue\": \"570.00\",\n \"installmentValue\": null,\n \"paymentType\": \"21\"\n },\n {\n \"iof\": \"3.73\",\n \"cet\": \"70.32\",\n \"installments\": \"2\",\n \"rates\": \"3.89\",\n \"description\": \"2 x R$299.11\",\n \"originalValue\": \"570.00\",\n \"firstDueDate\": \"2020-12-11\",\n \"cetAM\": \"4.52\",\n \"orderValue\": \"598.22\",\n \"installmentValue\": \"299.11\",\n \"paymentType\": \"85\"\n }\n ],\n \"CPF\": \"432.378,721-99\",\n \"TotalPrice\": \"570\",\n \"IdPaymentRequest\": 661005,\n \"Code\": 11100,\n \"Proposal\": \"1234567\",\n \"status\": \"Approved\"\n}"
REPROVED:
value: "{\n \"Message\": \"Unauthorized\",\n \"amountInstallments\": 0,\n \"Code\": 12300,\n \"status\": \"FAILED\"\n}"
schema:
oneOf:
- title: APPROVED
type: object
properties:
UseDate:
type: string
example: 05/24/2021
Message:
type: string
example: Request authorized!
amountInstallments:
type: integer
example: 3
default: 0
installmentOptions:
type: array
items:
type: object
properties:
of: {}
cet: {}
installments:
type: string
example: '1'
rates: {}
description:
type: string
example: On view
originalValue:
type: string
example: '570.00'
firstDueDate:
type: string
example: '2020-12-11'
cetAM:
type: string
example: '0.63'
orderValue:
type: string
example: '570.00'
installmentValue: {}
paymentType:
type: string
example: '21'
CPF:
type: string
example: 432.378,721-99
TotalPrice:
type: string
example: '570'
IdPaymentRequest:
type: integer
example: 661005
default: 0
Code:
type: integer
example: 11100
default: 0
Proposal:
type: string
example: '1234567'
status:
type: string
example: Approved
- title: REPROVED
type: object
properties:
Message:
type: string
example: Unauthorized
amountInstallments:
type: integer
example: 0
default: 0
Code:
type: integer
example: 12300
default: 0
status:
type: string
example: FAILED
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'401':
description: '401'
content:
application/json:
examples:
Result:
value: ''
'404':
description: '404'
content:
application/json:
examples:
The Specified Resource Was Not Found:
value: ''
5XX:
description: 5XX
content:
application/json:
examples:
Unexpected Error:
value: ''
deprecated: false
tags:
- PaymentRequest
/V1/PaymentRequest/include:
post:
summary: Include
description: ''
operationId: include
requestBody:
content:
application/json:
schema:
type: object
required:
- OrderID
- Currency
- TotalPrice
- Buyer
- Shipping
- Items
- AdditionalParameters
properties:
OrderID:
type: string
default: Class1
Currency:
type: string
default: BRL
TotalPrice:
type: string
default: '78.99'
Proposal:
type: string
default: '692241828173551436932475'
DiscountPercent:
type: string
default: '0.20'
DiscountValue:
type: string
default: '0.05'
IncreasePercent:
type: string
default: '0.10'
IncreaseValue:
type: string
default: '1.00'
Buyer:
type: object
required:
- Email
- Name
properties:
Email:
type: string
default: email@domain.com.br
Documents:
type: object
required:
- Key
- Value
properties:
Key:
type: string
default: CPF
Value:
type: string
default: '1234567890'
Address:
type: object
required:
- ZipCode
- Number
- AddressType
properties:
Country:
type: string
default: Brasil
State:
type: string
default: MG
City:
type: string
default: Belo Horizonte
District:
type: string
default: Bela Vista
ZipCode:
type: string
default: '30160913'
Street:
type: string
default: Rua Rio de Janeiro 909
Number:
type: string
default: '999'
Complement:
type: string
default: 13º Andar
AddressType:
type: string
default: '1'
Phones:
type: object
required:
- AreaCode
- Number
- PhoneType
properties:
AreaCode:
type: string
default: '11'
Number:
type: string
default: '999984999'
PhoneType:
type: string
default: '1'
Name:
type: string
default: Nome da Loja
Ip:
type: string
default: '127001'
IsReliable:
type: string
default: 'false'
IsFirstPurchase:
type: string
default: 'false'
AdditionalInfo:
type: object
required:
- Key
- Value
properties:
Key:
type: string
default: Birthday
Value:
type: string
default: '1993-03-19'
Shipping:
type: object
required:
- UseData
properties:
Address:
type: object
properties:
ZipCode:
type: string
default: '01310300'
Street:
type: string
default: Av. Paulista
Number:
type: string
default: '2421'
Complement:
type: string
default: 13° Andar
City:
type: string
default: São Paulo
District:
type: string
default: Bela Vista
State:
type: string
default: São Paulo
Country:
type: string
default: Brasil
Type:
type: string
default: '1'
Price:
type: string
default: '199.90'
UseData:
type: string
default: '2022-07-20'
Items:
type: object
required:
- Reference
- Description
- Quantity
- Price
properties:
Reference:
type: string
default: Item_4556
Description:
type: string
default: Teste boleto registrado
Quantity:
type: string
default: '1'
Category:
type: string
default: Teste
Price:
type: string
default: '980.56'
AdditionalParameters:
type: object
required:
- ExpirationDate
properties:
ExpirationDate:
type: string
default: '2022-01-02 00:12:12'
UserExpirationDate:
type: string
default: '2022-02-02 00:02:23'
FixInstallments:
type: string
default: '0'
MaxInstallments:
type: string
default: '24'
IntermediateId:
type: string
default: '123'
SalesChannelId:
type: string
default: '5'
SoftDescription:
type: string
default: Nome Que Aparece no Boleto
OrderOriginIsDifferent:
type: string
default: Y
UserCreate:
type: string
default: Email do Usuário de Criação do Pedido
OrderOriginData:
type: object
properties:
OrderOriginDocuments:
type: object
required:
- Type
- Number
properties:
Type:
type: string
default: CPF
Number:
type: string
default: 833.931.540-44
OrderOriginName:
type: string
default: Nome Fantasia da Origem do Pedido
OrderOriginCompanyName:
type: string
default: Razão Social da Origem do Pedido
OrderOriginEmail:
type: string
default: origem_pedido@email.com.br
OrderOriginPhone:
type: string
default: '552133665591'
ProductType:
type: array
items:
type: string
examples:
Car Rental:
value:
OrderID: Class1
Currency: BRL
TotalPrice: '78.99'
Proposal: '692241828173551436932475'
Buyer:
Name: Maria Silva
Email: email@domain.com.br
Documents:
- Type: CPF
Number: '1234567890'
Address:
Country: Brasil
State: MG
City: Belo Horizonte
ZipCode: '30160913'
Street: Rua Rio de Janeiro 909
Number: '999'
Complement: ''
Type: '1'
Phones:
- AreaCode: '11'
Number: '999984999'
Shipping:
UseDate: '2023-05-24'
Price: '0.00'
Address: null
Items:
- Reference: Cod_Item_321
Description: Origem no aeroporto GRU, com destino no aeroporto YYZ
Quantity: '1'
Price: '1999.01'
Category: Passagem
AdditionalParameters:
ExpirationDate: '2023-01-02 00:12:12'
UserExpirationDate: '2022-02-02 00:02:23'
FixInstallments: '0'
MaxInstallments: '24'
IntermediateId: '123'
SalesChannelId: '5'
SoftDescription: Nome Que Aparece no Boleto
OrderOriginData:
OrderOriginDocuments:
Type: CNPJ
Number: 12.456.789/0001-01
OrderOriginName: Nome Fantasia da Origem do Pedido
OrderOriginCompanyName: Razão Social da Origem do Pedido
OrderOriginEmail: origem_pedido@email.com.br
OrderOriginPhone: '552133665591'
OrderOriginIsDifferent: Y
UserCreate: Email do Usuário de Criação do Pedido
AdditionalData:
CarRentalData:
- CarRentalCompany: United
CarDescription: Volkswagen T-Cross Automatic
CarCategory: CA
PickUpDateTime: '2019-12-25 16:30:00'
ReturnDateTime: '2019-12-27 16:30:00'
PickUpLocation:
ZipCode: 01310-300
Street: Av. Paulista
Number: '2421'
Complement: ''
District: Bela Vista
City: São Paulo
State: SP
Country: Brazil
ReturnLocation:
ZipCode: 01310-300
Street: Av. Paulista
Number: '2421'
Complement: ''
District: Bela Vista
City: São Paulo
State: SP
Country: Brazil
Drivers:
- DriverName: Main Driver Name
DriverEmail: email_condutor_principal@dominio.com.br
DriverBirthDate: '1988-07-27'
DriverPhone: '552133665591'
DriverGender: '2'
DriverDocuments:
Type: CPF
Number: 00132618605
- DriverName: Second Driver Name
DriverEmail: email__second_condutor@dominio.com.br
DriverBirthDate: '1985-02-15'
DriverPhone: '552133665577'
DriverGender: '1'
DriverDocuments:
Type: CPF
Number: 00234638625
Product Type:
- CarRental
Airline:
value:
OrderID: Class1
Currency: BRL
TotalPrice: '78.99'
Proposal: '692241828173551436932475'
Buyer:
Name: Maria Silva
Email: email@domain.com.br
Documents:
- Type: CPF
Number: '1234567890'
Address:
Country: Brasil
State: MG
City: Belo Horizonte
ZipCode: '30160913'
Street: Rua Rio de Janeiro 909
Number: '999'
Complement: ''
Type: '1'
Phones:
- AreaCode: '11'
Number: '999984999'
Shipping:
UseDate: '2023-05-24'
Price: '0.00'
Address: null
Items:
- Reference: Cod_Item_321
Description: Origem no aeroporto GRU, com destino no aeroporto YYZ
Quantity: '1'
Price: '1999.01'
Category: Passagem
AdditionalParameters:
ExpirationDate: '2023-01-02 00:12:12'
UserExpirationDate: '2022-02-02 00:02:23'
FixInstallments: '0'
MaxInstallments: '24'
IntermediateId: '123'
SalesChannelId: '5'
SoftDescription: Nome Que Aparece no Boleto
OrderOriginData:
OrderOriginDocuments:
Type: CNPJ
Number: 12.456.789/0001-01
OrderOriginName: Nome Fantasia da Origem do Pedido
OrderOriginCompanyName: Razão Social da Origem do Pedido
OrderOriginEmail: origem_pedido@email.com.br
OrderOriginPhone: '552133665591'
OrderOriginIsDifferent: Y
UserCreate: Email do Usuário de Criação do Pedido
AdditionalData:
AirlineData:
Legs:
- LegNumber: '1'
Origin: GRU
Destination: YYZ
DepartureTime: '2021-08-04 21:40:00'
Passengers:
- PassengerName: ROSÂNGELA HUDSON JANUÁRIO
Product Type:
- Airline
Lodging:
value:
OrderID: Class1
Currency: BRL
TotalPrice: '78.99'
Proposal: '692241828173551436932475'
Buyer:
Name: Maria Silva
Email: email@domain.com.br
Documents:
- Type: CPF
Number: '1234567890'
Address:
Country: Brasil
State: MG
City: Belo Horizonte
ZipCode: '30160913'
Street: Rua Rio de Janeiro 909
Number: '999'
Complement: ''
Type: '1'
Phones:
- AreaCode: '11'
Number: '999984999'
Shipping:
UseDate: '2023-05-24'
Price: '0.00'
Address: null
Items:
- Reference: Cod_Item_321
Description: Origem no aeroporto GRU, com destino no aeroporto YYZ
Quantity: '1'
Price: '1999.01'
Category: Passagem
AdditionalParameters:
ExpirationDate: '2023-01-02 00:12:12'
UserExpirationDate: '2022-02-02 00:02:23'
FixInstallments: '0'
MaxInstallments: '24'
IntermediateId: '123'
SalesChannelId: '5'
SoftDescription: Nome Que Aparece no Boleto
OrderOriginData:
OrderOriginDocuments:
Type: CNPJ
Number: 12.456.789/0001-01
OrderOriginName: Nome Fantasia da Origem do Pedido
OrderOriginCompanyName: Razão Social da Origem do Pedido
OrderOriginEmail: origem_pedido@email.com.br
OrderOriginPhone: '552133665591'
OrderOriginIsDifferent: Y
UserCreate: Email do Usuário de Criação do Pedido
AdditionalData:
LodgingData:
LodgingName: Pousada Porto Mar
CheckInDate: '2019-04-06'
CheckOutDate: '2019-04-13'
Duration: '7'
LodgingRefund: N
LodgingAddress:
ZipCode: 01311-300
Street: Av. Paulista
Number: '1728'
Complement: 7 floor
District: Bela Vista
City: São Paulo
State: SP
Country: Brazil
Type: '1'
Lodgers:
- LodgerName: Full Name of Passenger 1
LodgerEmail: caio.montediro@koin.com.br
LodgerPhone: '552133665591'
LodgerDocuments:
- Type: CPF
Number: 396.469,778-80
Product Type:
- Lodging
Destination Service:
value:
OrderID: Class1
Currency: BRL
TotalPrice: '78.99'
Proposal: '692241828173551436932475'
Buyer:
Name: Maria Silva
Email: email@domain.com.br
Documents:
- Type: CPF
Number: '1234567890'
Address:
Country: Brasil
State: MG
City: Belo Horizonte
ZipCode: '30160913'
Street: Rua Rio de Janeiro 909
Number: '999'
Complement: ''
Type: '1'
Phones:
- AreaCode: '11'
Number: '999984999'
Shipping:
UseDate: '2023-05-24'
Price: '0.00'
Address: null
Items:
- Reference: Cod_Item_321
Description: Origem no aeroporto GRU, com destino no aeroporto YYZ
Quantity: '1'
Price: '1999.01'
Category: Passagem
AdditionalParameters:
ExpirationDate: '2023-01-02 00:12:12'
UserExpirationDate: '2022-02-02 00:02:23'
FixInstallments: '0'
MaxInstallments: '24'
IntermediateId: '123'
SalesChannelId: '5'
SoftDescription: Nome Que Aparece no Boleto
OrderOriginData:
OrderOriginDocuments:
Type: CNPJ
Number: 12.456.789/0001-01
OrderOriginName: Nome Fantasia da Origem do Pedido
OrderOriginCompanyName: Razão Social da Origem do Pedido
OrderOriginEmail: origem_pedido@email.com.br
OrderOriginPhone: '552133665591'
OrderOriginIsDifferent: Y
UserCreate: Email do Usuário de Criação do Pedido
AdditionalData:
DestinationServiceData:
DSDetails:
- DSId: ''
DSType: '1'
DSName: P.172 INDISSIMA CLASICA, TRINAGULO DE ORO
DSDescription: DELHIJAIPURAGRA
DSDateStart: '2020-07-27'
DSateEnd: '2020-09-27'
DS Duration: '2'
DSOrigin: DELHI
DSDestination: AGRA
DSPenaltyDate: '2020-07-10'
DSQtPax: '1'
PaxDetails:
- PaxName: Passenger"s Full Name
PaxBirthDate: '1988-07-27'
PaxEmail: ''
PaxPhone: ''
PaxDocuments:
Type: CPF
Number: 00234638625
PaxAddress:
ZipCode: 03813310
Country: BRA
State: SP
City: São Paulo
District: Jd, Matarazzo
Street: Rua, Japichaua
Number: '100'
Complement: Home Home
Product Type:
- DestinationService
responses:
'200':
description: '200'
content:
application/json:
examples:
APPROVED:
value: "{\n \"AdditionalInfo\": [],\n \"Message\": \"Your purchase is APPROVED! Thank you for shopping with KOIN.\",\n \"Transaction ID\": 833971,\n \"Code\": \"200\"\n}"
SENT:
value: "{\n \"Message\": \"Request sent successfully. We are waiting for the customer to finalize the purchase!\",\n \"Code\": 11200,\n \"UrlCompleteOrder\": \"http://uat-institucional.koin.com.br/payment/complete/#397a3088c2f4475fcb3479174ba75e5c\"\n}"
INVALID CPF:
value: "{\n \"Message\": \"Invalid CPF, please review the CPF informed.\",\n \"Code\": 11991\n}"
schema:
oneOf:
- title: APPROVED
type: object
properties:
AdditionalInfo:
type: array
Message:
type: string
example: Your purchase is APPROVED! Thank you for shopping with KOIN.
Transaction ID:
type: integer
example: 833971
default: 0
Code:
type: string
example: '200'
- title: SENT
type: object
properties:
Message:
type: string
example: Request sent successfully. We are waiting for the customer to finalize the purchase!
Code:
type: integer
example: 11200
default: 0
UrlCompleteOrder:
type: string
example: http://uat-institucional.koin.com.br/payment/complete/#397a3088c2f4475fcb3479174ba75e5c
- title: INVALID CPF
type: object
properties:
Message:
type: string
example: Invalid CPF, please review the CPF informed.
Code:
type: integer
example: 11991
default: 0
'400':
description: '400'
content:
application/json:
examples:
Result:
value: '{}'
schema:
type: object
properties: {}
'401':
description
# --- truncated at 32 KB (32 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/koin/refs/heads/main/openapi/koin-paymentrequest-api-openapi.yml