openapi: 3.0.0
info:
title: VTex Anti-fraud Provider Account Transaction Process API
description: ">ℹ️ Onboarding guide\r\n>\r\n> Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Anti-fraud Provider Protocol is a set of definitions to help you integrate your anti-fraud service API into VTEX platform.\r\n\r\nTo achieve this, you need to implement a web API (REST) following the specifications described in this documentation.\r\n\r\n>⚠️ You can also access our [template on GitHub](https://github.com/vtex-apps/antifraud-provider-example) to help you quickly develop your anti-fraud connector using the Anti-fraud Provider Protocol and VTEX IO.\r\n\r\nTo learn more about the Anti-fraud Provider Protocol, check our [developer guide](https://developers.vtex.com/docs/guides/how-the-integration-protocol-between-vtex-and-antifraud-companies-works).\r\n\r\n## Anti-fraud Provider API Index\r\n\r\n### Anti-fraud Flow\r\n\r\n- `POST` [Send Anti-fraud Pre-Analysis Data (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/pre-analysis)\r\n- `POST` [Send Anti-fraud Data](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/transactions)\r\n- `PUT` [Update Anti-fraud Transactions (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#put-/transactions/-transactionId-)\r\n- `GET` [List Anti-fraud Provider Manifest](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/manifest)\r\n- `GET` [Get Anti-fraud Status](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/transactions/-transactions.id-)\r\n- `DELETE` [Stop Anti-fraud Analysis (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#delete-/transactions/-transactions.Id-)\r\n\r\n### OAuth Flow\r\n\r\n1. `POST` [Retrieve Token](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/authorization/token)\r\n2. `GET` [Redirect](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/redirect)\r\n3. `GET` [Return to VTEX](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/authorizationCode)\r\n4. `GET` [Get Credentials](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/authorization/credentials)"
version: '1.0'
servers:
- url: https://{providerApiEndpoint}
description: Anti-fraud provider endpoint URL.
variables:
providerApiEndpoint:
description: Anti-fraud provider endpoint URL.
default: '{providerApiEndpoint}'
tags:
- name: Transaction Process
paths:
/api/pvt/transactions:
post:
tags:
- Transaction Process
summary: VTex 1. Start a new transaction
description: "This request is the first step to create a new transaction.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| PCI Gateway | Payment-Make Payments | **Process payments** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
operationId: 1.Createanewtransaction
parameters:
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/1.CreateanewtransactionRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StartTransactionResponse'
example:
id: 46351F157C624CBA926359ADED377265
transactionId: 46351F157C624CBA926359ADED377265
referenceKey: '1234567'
interactions:
href: /api/pvt/transactions/46351F157C624CBA926359ADED377265/interactions
settlements:
href: /api/pvt/transactions/46351F157C624CBA926359ADED377265/settlements
payments:
href: /api/pvt/transactions/46351F157C624CBA926359ADED377265/payments
refunds:
href: /api/pvt/transactions/46351F157C624CBA926359ADED377265/refunds
cancellations:
href: /api/pvt/transactions/46351F157C624CBA926359ADED377265/cancellations
capabilities:
href: /api/pvt/transactions/46351F157C624CBA926359ADED377265/capabilities
timeoutStatus: 0
totalRefunds: 0
status: Started
value: 20000
receiverUri: https://cosmetics2.vtexpayments.com.br/split/46351F157C624CBA926359ADED377265/payments
startDate: '2023-12-15T19:53:59.4307279Z'
authorizationToken: null
authorizationDate: null
commitmentToken: null
commitmentDate: null
refundingToken: null
refundingDate: null
cancelationToken: null
cancelationDate: null
fields:
- name: owner
value: teste_1@test.com
- name: lastTransitionDate
value: 12/15/2023 7:53:59 PM
- name: TotalTimeSpentInTransitionsUntilThisTransition
value: '0'
- name: channel
value: cosmetics2
- name: salesChannel
value: '1'
ipAddress: null
sessionId: null
macId: null
vtexFingerprint: null
chargeback: null
whiteSignature: null
owner: teste_1@test.com
orderId: null
userAgent: null
acceptHeader: null
antifraudTid: null
antifraudResponse: null
antifraudReference: null
antifraudAffiliationId: null
channel: cosmetics2
salesChannel: '1'
urn: null
softDescriptor: null
markedForRecurrence: false
buyer: null
deprecated: false
/api/pub/transactions/{transactionId}/payments:
post:
tags:
- Transaction Process
summary: VTex 2.1 Send payments information public
description: "The second step to create a new transaction. This request is used to send the payment data through a public request.\r\n>\r\n>ℹ️ If you want to send payment data containing sensitive information, such as credit card data, use the [Send payments with saved credit card](https://developers.vtex.com/docs/api-reference/payments-gateway-api#post-/api/pvt/transactions/-transactionId-/payments) endpoint.## Permissions\r\n\r\nThis endpoint does not require [permissions](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3)."
operationId: 2.SendPaymentsPublic
parameters:
- name: orderId
in: query
description: Order identification.
required: true
style: form
explode: true
schema:
type: string
example: '1248716513905'
- $ref: '#/components/parameters/transactionId'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/2.SendPaymentsPublicRequest'
description: Payment information.
responses:
'201':
description: Created. This endpoint does not return any data in the response body.
deprecated: false
/api/pvt/transactions/{transactionId}/payments:
post:
tags:
- Transaction Process
summary: VTex 2.2 Send payments with saved credit card
description: "The second step to create a new transaction. This request is used to send the payment data through a private request.\r\n>\r\n>ℹ️ If you want to send payment data that does not contain sensitive information, you can use the [Send payments information public](https://developers.vtex.com/docs/api-reference/payments-gateway-api#post-/api/pub/transactions/-transactionId-/payments) endpoint.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| PCI Gateway | Payment-Make Payments | **Process payments** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
operationId: 2.SendPaymentsWithSavedCreditCard
parameters:
- $ref: '#/components/parameters/transactionId'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
requestBody:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/2.SendPaymentsWithSavedCreditCardRequest'
description: Payment information.
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentDetailsResponse'
example:
id: 1EED2BE7683644B4B4D441B0AFCE4004
paymentSystem: 4
paymentSystemName: Mastercard
merchantName: null
group: creditCard
userProfileId: null
isCustom: false
allowInstallments: true
requiresAuthentication: false
allowIssuer: true
allowNotification: false
isAvailable: true
description: null
authorizationDate: null
self:
href: /api/pvt/transactions/99129781C2D84F2AA55E62B72B14A7E9/payments/1EED2BE7683644B4B4D441B0AFCE4004
tid: null
nsu: null
returnCode: null
returnMessage: null
status: Received
connector: null
ConnectorResponses: null
connectorResponse: null
ShowConnectorResponses: false
value: 30000
installmentsInterestRate: 0
installmentsValue: 0
referenceValue: 30000
installments: 1
currencyCode: BRL
provider: null
isBillingAddressDifferent: null
isRegexValid: null
isLuhnValid: null
fields:
- name: AvailableRules
value: 993d4d35-b64d-454d-8108-c560580160e0,eae3d89b-7dc7-4862-931d-e6d4e1ff838c
- name: originalPaymentSystem
value: '4'
- name: baseUrl
value: https://cosmetics2.vtexpayments.com.br:443
- name: currencyCode
value: BRL
- name: usedAccountId
value: 'False'
- name: cardHolder
value: UserTest
- name: firstDigits
value: '537824'
- name: lastDigits
value: '9174'
- name: expiryMonth
value: '10'
- name: expiryYear
value: '2019'
- name: accountId
value: 09F1F6C21F764BBF85D0039F4A2D3E04
sheets: null
originalPaymentId: null
deprecated: false
/api/pvt/transactions/{transactionId}/additional-data:
post:
tags:
- Transaction Process
summary: VTex 3. Send additional data
description: "The third step to create a new transaction. This request sends additional data related to the transaction, such as profile information, shopping cart, shipping data, among others.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| PCI Gateway | Payment-Make Payments | **Process payments** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
operationId: 3.SendAdditionalData
parameters:
- $ref: '#/components/parameters/transactionId'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
requestBody:
content:
application/json:
schema:
type: array
description: Array containing additional data.
items:
type: object
description: Additional data fields.
required:
- name
- value
properties:
name:
type: string
description: Dataset name. This information must be sent in escaped JSON format.
value:
type: string
description: Dataset values. This information must be sent in escaped JSON format.
example:
- name: cart
value: '{"items":[{"id":"6257034","name":"Tamanco Couro Preto Poá","value":5999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"C503YC002_34","productId":"6257000","sellingPrice":59.99,"sellerId":"1","dockId":"999800000-5","categoryId":"18","categoryName":"Tamanco","deliveryChannel":"delivery","deliveryType":"Convencional","deliverySlaInMinutes":5760,"deliveryWindow":null,"tax":0,"freight":167},{"id":"7136034","name":"Sandália Off White Espadrile Salto Forrado","value":5999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"S5146R881_34","productId":"7136000","sellingPrice":59.99,"sellerId":"1","dockId":"999800000-5","categoryId":"12","categoryName":"Anabela","deliveryChannel":"delivery","deliveryType":"Convencional","deliverySlaInMinutes":5760,"deliveryWindow":null,"tax":0,"freight":166},{"id":"8305038","name":"Tamanco Caramelo Salto Fachete","value":9999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"S534IZ012_38","productId":"8305000","sellingPrice":99.99,"sellerId":"1","dockId":"999800000-5","categoryId":"18","categoryName":"Tamanco","deliveryChannel":"delivery","deliveryType":"Convencional","deliverySlaInMinutes":5760,"deliveryWindow":null,"tax":0,"freight":166},{"id":"7641034","name":"Tênis Slip On Couro Preto Recorte","value":9999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"C524B9002_34","productId":"7641000","sellingPrice":99.99,"sellerId":"coinshop","dockId":"0405","categoryId":"30","categoryName":"Clássico","deliveryChannel":"delivery","deliveryType":"Correios - PAC","deliverySlaInMinutes":18720,"deliveryWindow":null,"tax":0,"freight":7138},{"id":"8278038","name":"Tênis Slip Caramelo Matelassê","value":5999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"S534IR012_38","productId":"8278000","sellingPrice":59.99,"sellerId":"coinmarket","dockId":"0571","categoryId":"32","categoryName":"Slip On","deliveryChannel":"delivery","deliveryType":"PAC","deliverySlaInMinutes":14400,"deliveryWindow":null,"tax":0,"freight":7090}],"sellers":[{"id":"1","name":"CONSTANCE","documentType":"CNPJ","document":"30901791000191"},{"id":"coinshop","name":"coinshop","documentType":"CNPJ","document":"48275547000126"},{"id":"coinmarket","name":"coinmarket","documentType":"CNPJ","document":"48314133000169"}],"freight":14727,"shippingdate":null,"shippingestimated":"4bd","orderUrl":"http://www.constance.com.br/admin/checkout/#/orders?q=1373160984904","tax":0,"isGiftRegistry":null,"giftRegistryDescription":null,"giftRegistryId":null,"isPickupStore":null,"isCallCenter":null}'
- name: clientProfileData
value: '{"email":"test@test.com","firstName":"Izidio","lastName":"Test Trace","document":"111111111","phone":"+56987654321","corporateName":null,"tradeName":null,"corporateDocument":null,"stateInscription":"Exento","postalCode":"8320000","address":{"receiverName":"wqqw weqw","postalCode":"8320000","city":"wdade","state":"Región Metropolitana","country":"CHL","street":"asdafd","number":"sadas","neighborhood":"Santiago","complement":"604","reference":"efa"},"gender":null,"birthDate":null,"createdDate":null,"corporatePhone":null,"isCorporate":false,"documentType":"rutCHL","id":"d48a1cd3-c04e-4949-a275-df4b197a7ec9"}'
responses:
'200':
description: OK. This endpoint does not return any data in the response body.
deprecated: false
patch:
tags:
- Transaction Process
summary: VTex 3.1 Update additional data (optional)
description: "Use this request to update any information that has previously been sent on endpoint [3. Send additional data](https://developers.vtex.com/docs/api-reference/payments-gateway-api#post-/api/pvt/transactions/-transactionId-/additional-data).\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| PCI Gateway | Payment-Make Payments | **Process payments** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
operationId: 3.1UpdateAdditionalData
parameters:
- $ref: '#/components/parameters/transactionId'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
requestBody:
content:
application/json:
schema:
type: array
description: Array containing additional data.
items:
type: object
description: Additional data fields.
required:
- name
- value
properties:
name:
type: string
description: Dataset name. This information must be sent in escaped JSON format.
value:
type: string
description: Dataset values. This information must be sent in escaped JSON format.
example:
- name: cart
value: '{"items":[{"id":"6257034","name":"Tamanco Couro Preto Poá","value":5999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"C503YC002_34","productId":"6257000","sellingPrice":59.99,"sellerId":"1","dockId":"999800000-5","categoryId":"18","categoryName":"Tamanco","deliveryChannel":"delivery","deliveryType":"Convencional","deliverySlaInMinutes":5760,"deliveryWindow":null,"tax":0,"freight":167},{"id":"7136034","name":"Sandália Off White Espadrile Salto Forrado","value":5999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"S5146R881_34","productId":"7136000","sellingPrice":59.99,"sellerId":"1","dockId":"999800000-5","categoryId":"12","categoryName":"Anabela","deliveryChannel":"delivery","deliveryType":"Convencional","deliverySlaInMinutes":5760,"deliveryWindow":null,"tax":0,"freight":166},{"id":"8305038","name":"Tamanco Caramelo Salto Fachete","value":9999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"S534IZ012_38","productId":"8305000","sellingPrice":99.99,"sellerId":"1","dockId":"999800000-5","categoryId":"18","categoryName":"Tamanco","deliveryChannel":"delivery","deliveryType":"Convencional","deliverySlaInMinutes":5760,"deliveryWindow":null,"tax":0,"freight":166},{"id":"7641034","name":"Tênis Slip On Couro Preto Recorte","value":9999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"C524B9002_34","productId":"7641000","sellingPrice":99.99,"sellerId":"coinshop","dockId":"0405","categoryId":"30","categoryName":"Clássico","deliveryChannel":"delivery","deliveryType":"Correios - PAC","deliverySlaInMinutes":18720,"deliveryWindow":null,"tax":0,"freight":7138},{"id":"8278038","name":"Tênis Slip Caramelo Matelassê","value":5999,"quantity":1,"priceTags":[],"components":null,"commission":0.0,"freightCommission":0.0,"sellerChain":null,"shippingDiscount":0,"discount":0,"refId":"S534IR012_38","productId":"8278000","sellingPrice":59.99,"sellerId":"coinmarket","dockId":"0571","categoryId":"32","categoryName":"Slip On","deliveryChannel":"delivery","deliveryType":"PAC","deliverySlaInMinutes":14400,"deliveryWindow":null,"tax":0,"freight":7090}],"sellers":[{"id":"1","name":"CONSTANCE","documentType":"CNPJ","document":"30901791000191"},{"id":"coinshop","name":"coinshop","documentType":"CNPJ","document":"48275547000126"},{"id":"coinmarket","name":"coinmarket","documentType":"CNPJ","document":"48314133000169"}],"freight":14727,"shippingdate":null,"shippingestimated":"4bd","orderUrl":"http://www.constance.com.br/admin/checkout/#/orders?q=1373160984904","tax":0,"isGiftRegistry":null,"giftRegistryDescription":null,"giftRegistryId":null,"isPickupStore":null,"isCallCenter":null}'
- name: clientProfileData
value: '{"email":"test@test.com","firstName":"Izidio","lastName":"Test Trace","document":"111111111","phone":"+56987654321","corporateName":null,"tradeName":null,"corporateDocument":null,"stateInscription":"Exento","postalCode":"8320000","address":{"receiverName":"wqqw weqw","postalCode":"8320000","city":"wdade","state":"Región Metropolitana","country":"CHL","street":"asdafd","number":"sadas","neighborhood":"Santiago","complement":"604","reference":"efa"},"gender":null,"birthDate":null,"createdDate":null,"corporatePhone":null,"isCorporate":false,"documentType":"rutCHL","id":"d48a1cd3-c04e-4949-a275-df4b197a7ec9"}'
responses:
'200':
description: OK. This endpoint does not return any data in the response body.
deprecated: false
/api/pvt/transactions/{transactionId}/authorization-request:
post:
tags:
- Transaction Process
summary: VTex 4. Authorize new transaction
description: "The fourth and last step to create a new transaction. It will authorized the new transaction creation according to the data previously informed in the latests requests.\r\n\r\nThis step is the trigger to process each of payments that were received in step 2.\r\n\r\nEach payment will be sent to acquirer. If all payments are authorized, the transaction will be authorized. If one of the payments is denied, all payments in transaction will be cancelled.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| PCI Gateway | Payment-Make Payments | **Process payments** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
operationId: 4.Doauthorization
parameters:
- $ref: '#/components/parameters/transactionId'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/4.DoauthorizationRequest'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SettleResponse'
example:
id: null
token: 2BCA48B4FBCB42D0B8A19EE965712AD8
status: 8
statusDetail: Approved
processingDate: '2023-12-14T22:45:50.9977213Z'
refundedValue: 0
refundedToken: null
message: null
code: null
connectorRefundedValue: 0
cancelledValue: 0
deprecated: false
/api/pvt/transactions/{transactionId}:
get:
tags:
- Transaction Process
summary: VTex Get transaction details
description: "Returns data about a specific transaction made in your store.\r\n\r\n>⚠️ Do not use the `interactions.href` route which is part of this endpoint's response. This is an internal-only route not meant to be used by external developers.\r\n\r\n## Permissions\r\n\r\nAny user or [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys) must have at least one of the appropriate [License Manager resources](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3) to be able to successfully run this request. Otherwise they will receive a status code `403` error. These are the applicable resources for this endpoint:\r\n\r\n| **Product** | **Category** | **Resource** |\r\n| --------------- | ----------------- | ----------------- |\r\n| PCI Gateway | Payment-Make Payments | **View Payment Data** |\r\n\r\nThere are no applicable [predefined roles](https://help.vtex.com/en/tutorial/predefined-roles--jGDurZKJHvHJS13LnO7Dy) for this resource list. You must [create a custom role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc#creating-a-role) and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see [Authentication overview](https://developers.vtex.com/docs/guides/authentication).\r\n\r\n>❗ To prevent integrations from having excessive permissions, consider the [best practices for managing app keys](https://help.vtex.com/en/tutorial/best-practices-application-keys--7b6nD1VMHa49aI5brlOvJm) when assigning License Manager roles to integrations."
operationId: TransactionDetails
parameters:
- $ref: '#/components/parameters/transactionId'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/TransactionDetailsResponse'
example:
id: D3640578F8124C50CB42BD3F8D282CD9
transactionId: D3640578F8124C50CB42BD3F8D282CD9
referenceKey: '505288'
interactions:
href: /api/pvt
# --- truncated at 32 KB (87 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vtex/refs/heads/main/openapi/vtex-transaction-process-api-openapi.yml