@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Payments Gateway API
@base https://apiexamples.vtexpayments.com.br
@version 1.0
@auth ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header
@common_fields {Content-Type: str, Accept: str}
@endpoints 25
@hint download_for_search
@toc api(25)

@endpoint GET /api/pvt/installments
@required {request.value: int}
@optional {request.salesChannel: int, request.paymentDetails[0].id: int, request.paymentDetails[0].value: int, request.paymentDetails[0].bin: int}
@returns(200) {value: num, installments: [map]}
@errors {400}

@endpoint GET /api/pvt/affiliations
@returns(200)

@endpoint POST /api/pvt/affiliations
@required {implementation: str, name: str, configuration: [map{name!: str, value!: str}], isdelivered: bool, isConfigured: bool}
@returns(200) {id: str, implementation: str, name: str, configuration: [map], isdelivered: bool, isConfigured: bool}

@endpoint PUT /api/pvt/affiliations/{affiliationId}
@required {affiliationId: str, id: str, implementation: str, name: str, configuration: [map{name!: str, value!: str, valueKey!: str}], isdelivered: bool, isConfigured: bool}
@returns(200) {id: str, implementation: str, name: str, configuration: [map], isdelivered: bool, isConfigured: bool}

@endpoint GET /api/pvt/affiliations/{affiliationId}
@required {affiliationId: str}
@returns(200) {id: str, implementation: str, name: str, configuration: [map], isdelivered: bool, isConfigured: bool}

@endpoint GET /api/pvt/rules
@returns(200)

@endpoint POST /api/pvt/rules
@required {name: str, salesChannels: [map{id!: str}], paymentSystem: map{id!: num, name!: str, implementation!: str}, connector: map{implementation!: str, affiliationId!: str}, issuer: map{name!: str}, antifraud: map{implementation!: str, affiliationId!: str}, installmentOptions: map{dueDateType!: num, interestRateMethod!: num, minimumInstallmentValue!: num, installments!: [map]}, isSelfAuthorized: bool, requiresAuthentication: bool, enabled: bool, installmentsService: bool, isDefault: bool, beginDate: str, endDate: str, condition: map{id!: str, pullRate!: num, name!: str}, multiMerchantList: [str], country: map{name!: str, isoCode!: str}, dateIntervals: [map{start!: str, end!: str}]}
@optional {externalInterest: bool, minimumValue: num, deadlines: [map{paymentOptions!: [map]}], cobrand: map{name!: str}, cardLevel: map{name!: str}, excludedBinsRanges: num}
@returns(200) {id: str, name: str, salesChannels: [map], paymentSystem: map{id: num, name: str, implementation: str?}, connector: map?{implementation: str, affiliationId: str}, issuer: map{name: str?}, antifraud: map?{implementation: str?, affiliationId: str?}, installmentOptions: map?{dueDateType: num, interestRateMethod: num?, minimumInstallmentValue: num, installments: [map]}, isSelfAuthorized: bool?, requiresAuthentication: bool?, enabled: bool, installmentsService: bool, isDefault: bool?, beginDate: str?, endDate: str?, condition: map?{id: str, pullRate: num, name: str?}, multiMerchantList: [str]?, country: map?{name: str?, isoCode: str}, dateIntervals: [map]?, externalInterest: bool, minimumValue: num?, deadlines: [map], cobrand: map{name: str?}, cardLevel: map{name: str?}, excludedBinsRanges: num?}

@endpoint GET /api/pvt/rules/{ruleId}
@required {ruleId: str}
@returns(200) {id: str, name: str, salesChannels: [map], paymentSystem: map{id: num, name: str, implementation: str?}, connector: map?{implementation: str, affiliationId: str}, issuer: map{name: str?}, antifraud: map?{implementation: str?, affiliationId: str?}, installmentOptions: map?{dueDateType: num, interestRateMethod: num?, minimumInstallmentValue: num, installments: [map]}, isSelfAuthorized: bool?, requiresAuthentication: bool?, enabled: bool, installmentsService: bool, isDefault: bool?, beginDate: str?, endDate: str?, condition: map?{id: str, pullRate: num, name: str?}, multiMerchantList: [str]?, country: map?{name: str?, isoCode: str}, dateIntervals: [map]?, externalInterest: bool, minimumValue: num?, deadlines: [map], cobrand: map{name: str?}, cardLevel: map{name: str?}, excludedBinsRanges: num?}

@endpoint PUT /api/pvt/rules/{ruleId}
@required {ruleId: str, id: str, name: str, salesChannels: [map{id!: str}], paymentSystem: map{id!: num, name!: str, implementation!: str}, connector: map{implementation!: str, affiliationId!: str}, issuer: map{name!: str}, antifraud: map{implementation!: str, affiliationId!: str}, installmentOptions: map{dueDateType!: num, interestRateMethod!: num, minimumInstallmentValue!: num, installments!: [map]}, isSelfAuthorized: bool, requiresAuthentication: bool, enabled: bool, installmentsService: bool, isDefault: bool, beginDate: str, endDate: str, condition: map{id!: str, pullRate!: num, name!: str}, multiMerchantList: [str], country: map{name!: str, isoCode!: str}, dateIntervals: [map{start!: str, end!: str}]}
@optional {externalInterest: bool, minimumValue: num, deadlines: [map{paymentOptions!: [map]}], cobrand: map{name!: str}, cardLevel: map{name!: str}, excludedBinsRanges: num}
@returns(200) {id: str, name: str, salesChannels: [map], paymentSystem: map{id: num, name: str, implementation: str?}, connector: map?{implementation: str, affiliationId: str}, issuer: map{name: str?}, antifraud: map?{implementation: str?, affiliationId: str?}, installmentOptions: map?{dueDateType: num, interestRateMethod: num?, minimumInstallmentValue: num, installments: [map]}, isSelfAuthorized: bool?, requiresAuthentication: bool?, enabled: bool, installmentsService: bool, isDefault: bool?, beginDate: str?, endDate: str?, condition: map?{id: str, pullRate: num, name: str?}, multiMerchantList: [str]?, country: map?{name: str?, isoCode: str}, dateIntervals: [map]?, externalInterest: bool, minimumValue: num?, deadlines: [map], cobrand: map{name: str?}, cardLevel: map{name: str?}, excludedBinsRanges: num?}

@endpoint DELETE /api/pvt/rules/{ruleId}
@required {ruleId: str}
@returns(200)

@endpoint GET /api/pvt/merchants/payment-systems
@optional {salesChannel: int}
@returns(200)

@endpoint GET /api/payments/pvt/account/{cardId}
@required {cardId: str}
@returns(200) {bin: str, lastDigits: str, expiryMonth: str, expiryYear: str, mask: str, paymentSystem: int, paymentSystemName: str, address: map{addressType: str, addressId: str, postalCode: str, street: str, neighborhood: str, city: str, state: str, country: str, number: str, complement: str}, document: str, tokens: map{providerId: str, type: str, value: str, expiration: str, label: str, href: str, providerCardTokenId: str, useCvvForAuthorization: bool, extraData: map{customField1: str}}}
@errors {404, 500}

@endpoint POST /api/pvt/transactions
@required {value: num, referenceId: str, channel: str, salesChannel: str}
@optional {urn: str}
@returns(200) {id: str, transactionId: str, referenceKey: str, interactions: map{href: str}, settlements: map{href: str}, payments: map{href: str}, refunds: map{href: str}, cancellations: map{href: str}, capabilities: map{href: str}, timeoutStatus: num, totalRefunds: num, status: str, value: num, receiverUri: str?, startDate: str, authorizationToken: str?, authorizationDate: str?, commitmentToken: str?, commitmentDate: str?, refundingToken: str?, refundingDate: str?, cancelationToken: str?, cancelationDate: str?, fields: [map], ipAddress: str?, sessionId: str?, macId: str?, vtexFingerprint: str?, chargeback: str?, whiteSignature: str?, owner: str, orderId: str?, userAgent: str?, acceptHeader: str?, antifraudTid: str?, antifraudResponse: str?, antifraudReference: str?, antifraudAffiliationId: str?, channel: str, salesChannel: str, urn: str?, softDescriptor: str?, markedForRecurrence: bool, buyer: map?{firstName: str, lastName: str, documentType: str, document: str, email: str, address: str, phone: str}}

@endpoint POST /api/payments/transactions/{transactionId}/payments
@required {an: str, orderId: str, transactionId: str}
@returns(201)

@endpoint POST /api/pvt/transactions/{transactionId}/additional-data
@required {transactionId: str}
@returns(200)

@endpoint PATCH /api/pvt/transactions/{transactionId}/additional-data
@required {transactionId: str}
@returns(200)

@endpoint POST /api/pvt/transactions/{transactionId}/authorization-request
@required {transactionId: str, transactionId: str, softDescriptor: str, prepareForRecurrency: bool}
@returns(200) {id: str?, token: str, status: num, statusDetail: str, processingDate: str, refundedValue: int, refundedToken: str?, message: str?, code: str?, connectorRefundedValue: num, cancelledValue: int}

@endpoint GET /api/pvt/transactions/{transactionId}
@required {transactionId: str}
@returns(200) {id: str, transactionId: str, referenceKey: str, interactions: map{href: str}, settlements: map{href: str}, payments: map{href: str}, refunds: map{href: str}, cancellations: map{href: str}, capabilities: map{href: str}, timeoutStatus: num, totalRefunds: num, status: str, value: num, receiverUri: str?, startDate: str, authorizationToken: str?, authorizationDate: str?, commitmentToken: str?, commitmentDate: str?, refundingToken: str?, refundingDate: str?, cancelationToken: str?, cancelationDate: str?, fields: [map], shopperInteraction: str, ipAddress: str?, sessionId: str?, macId: str, vtexFingerprint: str?, chargeback: str?, whiteSignature: str?, owner: str, orderId: str?, userAgent: str, acceptHeader: str, antifraudTid: str?, antifraudResponse: str?, antifraudReference: str?, antifraudAffiliationId: str?, channel: str, salesChannel: str, urn: str?, softDescriptor: str?, markedForRecurrence: bool, buyer: map?{firstName: str, lastName: str, documentType: str, document: str, email: str, address: str, phone: str}}

@endpoint GET /api/pvt/transactions/{transactionId}/payments/{paymentId}
@required {transactionId: str}
@optional {paymentId: str}
@returns(200) {id: str, paymentSystem: num, paymentSystemName: str, merchantName: str?, group: str, userProfileId: str?, isCustom: bool, allowInstallments: bool, requiresAuthentication: bool, allowIssuer: bool, allowNotification: bool, isAvailable: bool, description: str?, authorizationDate: str?, self: map{href: str}, tid: str?, nsu: str?, returnCode: str?, returnMessage: str?, status: str, connector: str?, ConnectorResponses: map{Tid: str, ReturnCode: str?, Message: str?, authId: str?, nsu: str}, connectorResponse: map{Tid: str, ReturnCode: str?, Message: str?, authId: str?, nsu: str}, ShowConnectorResponses: bool, value: num, installmentsInterestRate: num, installmentsValue: num, referenceValue: num, installments: num, currencyCode: str?, provider: str?, isBillingAddressDifferent: bool?, isRegexValid: bool?, isLuhnValid: bool?, fields: [map], sheets: str?, originalPaymentId: str?}

@endpoint GET /api/pvt/transactions/{transactionId}/settlements
@required {transactionId: str}
@returns(200) {requests: [map], actions: [map]}

@endpoint POST /api/pvt/transactions/{transactionId}/settlement-request
@required {transactionId: str, value: num}
@returns(200) {id: str?, token: str, status: num, statusDetail: str, processingDate: str, refundedValue: int, refundedToken: str?, message: str?, code: str?, connectorRefundedValue: num, cancelledValue: int}

@endpoint POST /api/pvt/transactions/{transactionId}/refunding-request
@required {transactionId: str, value: num}
@optional {freight: num, tax: num, minicart: map}
@returns(200) {id: str?, token: str, status: num, statusDetail: str, processingDate: str, refundedValue: int, refundedToken: str?, message: str?, code: str?, connectorRefundedValue: num, cancelledValue: int}

@endpoint POST /api/pvt/transactions/{transactionId}/cancellation-request
@required {transactionId: str, value: num}
@returns(200) {id: str?, token: str, status: num, statusDetail: str, processingDate: str, refundedValue: int, refundedToken: str?, message: str?, code: str?, connectorRefundedValue: num, cancelledValue: int}

@endpoint GET /api/payments/pvt/payments/{paymentId}/payment-notification
@required {paymentId: str}
@returns(200)

@endpoint POST /api/payments/pvt/payments/{paymentId}/payment-notification
@required {paymentId: str, paymentDate: str, valuePaid: num}
@returns(200)

@end
