openapi: 3.0.0
info:
title: VTex Payment Provider Protocol API
description: ">ℹ️ The Payment Provider Protocol is a set of definitions to help you integrate your payment processing API into the VTEX platform, including sub-acquirers, acquirers, gateways, and custom payment services. \r\n\r\nTo achieve this, you must implement a web API (REST) following the specifications described in this documentation.\r\n\r\nTo learn more about the Payment Provider Protocol, check our [Help Center article](https://help.vtex.com/en/tutorial/payment-provider-protocol--RdsT2spdq80MMwwOeEq0m).\r\n\r\n## Endpoint requirements\r\n\r\n * Must use a standard subdomain/domain name, not an IP address.\r\n * Must be served over HTTPS on port 443 with TLS 1.2 support.\r\n * Must respond in less than 5 seconds when running the tests.\r\n * Must respond in less than 20 seconds when in production.\r\n * Must be [PCI-DSS compliant](https://developers.vtex.com/docs/guides/payments-integration-pci-dss-compliance) or use [Secure Proxy](https://developers.vtex.com/docs/guides/payments-integration-secure-proxy) to accept branded cards like Visa, Mastercard, Amex, etc.\r\n\r\n## Testing\r\n\r\nYou can perform tests on your payment provider using our [VTEX - Payment Provider Test Suite](https://apps.vtex.com/vtex-payment-provider-test-suite/p).\r\n\r\n>ℹ An extra header `X-VTEX-API-Is-TestSuite` = `true` will be sent for every test suite request, to help you easily identify it and mock any required scenarios.\r\n\r\nFor more details about testing a Payment Provider, check our [Payment Provider Homologation](https://developers.vtex.com/docs/guides/payments-integration-payment-provider-homologation) article.\r\n\r\n## Common parameters in the documentation\r\n\r\n
\r\n \r\n {{providerApiEndpoint}} | \r\n Provider's endpoint for the implementation. | \r\n
\r\n \r\n {{X-PROVIDER-API-AppKey}} | \r\n Unique identifier created by the provider and configured on the provider configuration page (Admin VTEX). | \r\n
\r\n \r\n {{X-PROVIDER-API-AppToken}} | \r\n Unique token created by the provider and configured on the provider configuration page (Admin VTEX). | \r\n
\r\n
\r\n\r\n## Payment Provider Protocol API Index\r\n\r\n### Payment Flow\r\n\r\n- `GET` [List Payment Provider Manifest](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#get-/manifest)\r\n- `POST` [Create payment](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#post-/payments)\r\n- `POST` [Cancel payment](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#post-/payments/-paymentId-/cancellations)\r\n- `POST` [Settle payment](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#post-/payments/-paymentId-/settlements)\r\n- `POST` [Refund payment](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#post-/payments/-paymentId-/refunds)\r\n- `POST` [Inbound request (BETA)](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#post-/payments/-paymentId-/inbound-request/-action-)\r\n\r\n### Configuration Flow\r\n\r\n- `POST` [Create authorization token](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#post-/authorization/token)\r\n- `GET` [Provider authentication](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#get-/authorization/redirect)\r\n- `GET` [Get credentials](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#get-/authorization/credentials)"
version: '1.0'
servers:
- url: https://{providerApiEndpoint}
description: Payment provider endpoint URL.
variables:
providerApiEndpoint:
description: Payment provider endpoint URL.
default: '{providerApiEndpoint}'
paths:
/manifest:
get:
tags:
- Payment Flow
summary: VTex List Payment Provider Manifest
description: "Exposes the provider manifest, including metadata settings such as payment methods, split configuration, and custom fields.\r\n\r\n> ℹ️ This request is made from VTEX to the payment provider.\r\n\r\n## Available payment methods\r\n\r\n\r\n \r\n | Payment Method | \r\n Type | \r\n Country | \r\n
\r\n \r\n Visa | \r\n Credit Card | \r\n Global | \r\n
\r\n \r\n Mastercard | \r\n Credit Card | \r\n Global | \r\n
\r\n \r\n American Express | \r\n Credit Card | \r\n Global | \r\n
\r\n \r\n Discover | \r\n Credit Card | \r\n Global | \r\n
\r\n \r\n JCB | \r\n Credit Card | \r\n Global | \r\n
\r\n \r\n Diners | \r\n Credit Card | \r\n Global | \r\n
\r\n \r\n Elo | \r\n Credit Card | \r\n Brazil | \r\n
\r\n \r\n Hipercard | \r\n Credit Card | \r\n Brazil | \r\n
\r\n \r\n Aura | \r\n Credit Card | \r\n Brazil | \r\n
\r\n \r\n Banricompras | \r\n Credit Card | \r\n Brazil | \r\n
\r\n \r\n Credz | \r\n Credit Card | \r\n Brazil | \r\n
\r\n \r\n Cabal | \r\n Credit Card | \r\n Argentina, Brazil, Uruguay, Paraguay | \r\n
\r\n Cartes Bancaires (CB) | \r\n Credit Card | \r\n France | \r\n \r\n \r\n VirtualDebitElo | \r\n Debit Card | \r\n Brazil | \r\n
\r\n \r\n Visa Electron | \r\n Debit Card | \r\n Global | \r\n
\r\n \r\n Maestro | \r\n Debit Card | \r\n Global | \r\n
\r\n \r\n Mastercard Debit | \r\n Debit Card | \r\n Global | \r\n
\r\n \r\n Débito Online | \r\n Debit Card | \r\n Brazil | \r\n
\r\n \r\n Cobranded | \r\n Card | \r\n Global | \r\n
\r\n \r\n Privatelabels | \r\n Card | \r\n Global | \r\n
\r\n \r\n Promissories | \r\n Generic | \r\n Global | \r\n
\r\n \r\n Cash | \r\n Generic | \r\n Global | \r\n
\r\n \r\n Pix | \r\n Online Transfer | \r\n Brazil | \r\n
\r\n \r\n Safetypay | \r\n Online Transfer | \r\n Americas and Europe | \r\n
\r\n \r\n BankInvoice | \r\n Offline/Voucher | \r\n Brazil (Boleto Bancário) | \r\n
\r\n \r\n FichaDeposito | \r\n Offline/Voucher | \r\n Mexico | \r\n
\r\n \r\n Rapipago | \r\n Offline/Voucher | \r\n Argentina | \r\n
\r\n \r\n OXXO | \r\n Offline/Voucher | \r\n Mexico | \r\n
\r\n \r\n Voucher | \r\n Offline/Voucher | \r\n Mexico | \r\
\n
\r\n \r\n Bitcoin | \r\n Cryptocurrency | \r\n Global | \r\n
\r\n \r\n Venda Direta Credito | \r\n Credit Card (Physical) | \r\n Global | \r\n
\r\n \r\n Venda Direta Debito | \r\n Debit Card (Physical) | \r\n Global | \r\n
\r\n
\r\n\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed."
operationId: Manifest
security: []
parameters:
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Success-Manifest'
example:
paymentMethods:
- name: Visa
allowsSplit: onCapture
- name: Pix
allowsSplit: disabled
- name: Mastercard
allowsSplit: onCapture
- name: American Express
allowsSplit: onCapture
- name: BankInvoice
allowsSplit: onAuthorize
- name: Privatelabels
allowsSplit: disabled
- name: Promissories
allowsSplit: disabled
customFields:
- name: Merchant's custom field
type: text
- name: Merchant's custom select field
type: select
options:
- text: Field option 1
value: '1'
- text: Field option 2
value: '2'
- text: Field option 3
value: '3'
autoSettleDelay:
minimum: '0'
maximum: '720'
metadataFields:
- MetadataName1
- MetadataName2
deprecated: false
/payments:
post:
tags:
- Payment Flow
summary: VTex Create payment
description: "Creates a new payment and initiates the payment flow.\r\n\r\n> ℹ️ This request is made from VTEX to the payment provider.\r\n\r\nPayment providers must:\r\n\r\n- Execute authorization on payments made through credit/debit card or any synchronized payments;\r\n\r\n- Return the required information to the customer on payments made through bank-issued invoice, redirect, or any async payments.\r\n\r\n >ℹ️ This endpoint has to meet the principle of [idempotence](https://en.wikipedia.org/wiki/Idempotence). When calling this endpoint for the first time of a payment, without a `paymentId`, it should create a new payment. When calling this endpoint for an existing `paymentId`, it should not create another payment, but return the updated status of the existing payment instead.\r\n\r\n## Callbacks (asynchronous flow)\r\n\r\nCallbacks are used for asynchronous payments, which do not receive the final status immediately. At first, an `undefined` status is returned, and the final status will be received from a callback request in the future as `authorized` or `denied`. There are two types of callbacks:\r\n\r\n- **Notification:** If a payment returns with `undefined` status, you are expected to send us a callback/notification to update it later, sending a POST with an updated version of your response (same structure as above) to the `callbackUrl` we have provided.\r\n\r\n- **Retry:** If a payment returns with `undefined` status, you are expected to call the retry endpoint provided by the `callbackUrl` when the processing of the payment is completed, so we make another Create Payment request to update the status with the new value (`authorized` or `denied`).\r\n\r\nCallback requests should be authenticated using a Key and Token which you can [generate from your VTEX partner account License Manager](https://help.vtex.com/en/tutorial/application-keys--2iffYzlvvz4BDMr6WGUtet#generating-app-keys-in-your-account). To do so, `POST` your request passing the `X-VTEX-API-AppKey` and `X-VTEX-API-AppToken` headers with your credentials. **Note:** do not mix up these credentials with the ones we send on behalf of the merchant when sending our requests.\r\n\r\n>⚠ For integrations not using VTEX IO, use the **Notification** callback. For integrations developed using VTEX IO infrastructure, use the **Retry** callback.\r\n\r\n### Callback URL\r\n\r\nThe `callbackUrl` field contains an URL that the payment provider uses to make a callback and inform our gateway of the final payment status: `approved` or `denied`. \r\n\r\nThis URL has some query parameters, including the `X-VTEX-signature`. This parameter is mandatory and contains a signature token to identify that the request has been generated from VTEX as a security measure. The signature token has at most 32 characters. You can check an example of callback URL with the signature token below:\r\n\r\n```\r\nhttps://gatewayqa.vtexpayments.com.br/api/pvt/payment-provider/transactions/8FB0F111111122222333344449984ACB/payments/A2A9A25B11111111222222333327883C/callback?accountName=teampaymentsintegrations&X-VTEX-signature=R******tk\r\n```\r\n\r\nIn the [Transactions page of the Admin](https://help.vtex.com/en/tutorial/how-to-view-the-orders-details--tutorials_452), the signature token appears masked for security reasons, as in this example: `X-VTEX-signature=Rj******tk`.\r\n\r\nWhen making the callback request, we recommend that payment providers use the callback URL exactly as received, which guarantees that all the parameters are included.\r\n\r\nSee below an example of a payload forwarded along with the callback URL:\r\n\r\n```json\r\n{\r\n \"paymentId\": \"8B3BA2F4352545A8B1C5A215F356A01C\",\r\n \"status\": \"approved\",\r\n \"authorizationId\": \"184520\",\r\n \"nsu\": \"21705348\",\r\n \"tid\": \"21705348\",\r\n \"acquirer\": \"pagmm\",\r\n \"code\": \"0000\",\r\n \"message\": \"Successfully approved transaction\",\r\n \"delayToAutoSettle\": 1200,\r\n \"delayToAutoSettleAfterAntifraud\": 1200,\r\n \"delayToCancel\": 86400,\r\n \"cardBrand\": \"Mastercard\"\
,\r\n \"firstDigits\": \"534696\",\r\n \"lastDigits\": \"6921\",\r\n \"maxValue\": 16.6\r\n}\r\n```\r\n\r\n>ℹ️ The parameter values sent in the callback payload replace the original values informed in the **Create Payment** request.\r\n\r\n>⚠️ If the waiting parameters (`delayToAutoSettle` and `delayToAutoSettleAfterAntifraud`) are not sent with the callback URL, the values for these parameters will be automatically set to 24 hours.\r\n\r\n## Beta features\r\n\r\nThe beta features available for payment providers are:\r\n\r\n- `inboundRequestsUrl`: Allows to forward external requests back to your payment provider implementation, including the configured credentials (`X-VTEX-API-*` headers), and settings.\r\n\r\n>ℹ You can reach out to our team by [opening a ticket](https://help.vtex.com/en/tutorial/opening-tickets-to-vtex-support--16yOEqpO32UQYygSmMSSAM) to know more about any beta features.\r\n\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed."
operationId: CreatePayment
parameters:
- $ref: '#/components/parameters/X-PROVIDER-API-AppKey'
- $ref: '#/components/parameters/X-PROVIDER-API-AppToken'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
security:
- appKey: []
appToken: []
- VtexIdclientAutCookie: []
requestBody:
content:
application/json:
schema:
type: object
required:
- reference
- orderId
- shopperInteraction
- transactionId
- paymentId
- paymentMethod
- paymentMethodCustomCode
- merchantName
- value
- currency
- installments
- deviceFingerprint
- miniCart
- url
- callbackUrl
- returnUrl
properties:
reference:
type: string
description: Merchant's order reference provided by VTEX Checkout.
example: '618272'
orderId:
type: string
description: Merchant's order identifier provided by VTEX Checkout (also called order group).
example: '1072430428324'
shopperInteraction:
type: string
description: 'Indicates which system the buyer interacted with (examples: ecommerce, instore, subscription).'
example: ecommerce
verificationOnly:
type: boolean
description: Indicates whether this payment is just to validate the buyer's payment method information (for instance, validate the credit card information).
example: false
transactionId:
type: string
description: VTEX transaction ID related to this payment.
example: 2F023FD5A72A49D48A8633252B7CCBD6
paymentId:
type: string
description: VTEX payment ID that can be used as unique identifier.
example: 01693EB95BE443AC85874E395CD91565
paymentMethod:
type: string
description: The payment method chosen for this payment. It must be one of the available payment methods offered by the provider, which can be obtained from the [List Payment Provider Manifest endpoint](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#get-/manifest).
example: Diners
paymentMethodCustomCode:
type: string
description: Configurable for Cobranded and Privatelabels payment methods.
nullable: true
example:
merchantName:
type: string
description: VTEX merchant name that will receive the payment.
example: mystore
value:
type: number
description: Value amount of the payment.
example: 31.9
referenceValue:
type: number
description: Value amount of the payment without interest applied. This value is the same as the "value" field when "installmentsInterestRate" is 0.0.
example: 31.9
currency:
type: string
description: Currency code (ISO 4217 alpha-3).
example: BRL
installments:
type: number
description: Number of installments.
example: 1
installmentsInterestRate:
type: number
description: The interest rate.
example: 0
installmentsValue:
type: number
description: The value of each installment.
example: 31.9
deviceFingerprint:
type: string
description: A hash that represents the device used to initiate the payment.
example: '75076388'
ipAddress:
type: string
description: The IP Address of the buyer.
example: 187.105.111.65
card:
type: object
description: Card information used for payment. This parameter is required only with card payment methods (credit, debit or co-branded).
required:
- holder
- number
- csc
- expiration
properties:
holder:
type: string
description: Card holder name.
example: John Doe
nullable: true
holderToken:
type: string
description: A token representing the card holder (this field is absent in case the provider does not use the [Secure Proxy](https://developers.vtex.com/docs/guides/payments-integration-secure-proxy)).
example: '#vtex#token#d799bae#csc#'
number:
type: string
description: Card number.
example: 364901****2661
nullable: true
csc:
type: string
description: Card security code.
example: '***'
nullable: true
bin:
type: string
description: First six digits of the card number (this field is absent in case the provider does not use the [Secure Proxy](https://developers.vtex.com/docs/guides/payments-integration-secure-proxy)).
example: '364901'
numberToken:
type: string
description: A token representing the card number (this field is absent in case the provider does not use the [Secure Proxy](https://developers.vtex.com/docs/guides/payments-integration-secure-proxy)).
example: '#vtex#token#d799bae#number#'
numberLength:
type: number
description: The number of characters in the card number (this field is absent in case the provider does not use the [Secure Proxy](https://developers.vtex.com/docs/guides/payments-integration-secure-proxy)).
example: 16
cscToken:
type: string
description: A token representing the card security code (this field is absent in case the provider does not use the [Secure Proxy](https://developers.vtex.com/docs/guides/payments-integration-secure-proxy)).
example: '#vtex#token#d799bae#csc#'
cscLength:
type: number
description: The number of characters in the Card Security Code (this field is absent in case the provider does not use the [Secure Proxy](https://developers.vtex.com/docs/guides/payments-integration-secure-proxy)).
example: 3
expiration:
type: object
description: Information about card expiration.
required:
- month
- year
properties:
month:
type: string
description: Card expiration month (2-digits).
example: '12'
nullable: true
year:
type: string
description: Card expiration year (4-digits).
example: '2020'
nullable: true
document:
type: string
description: Card holder's document.
example: '39295416023'
paymentOrigin:
type: string
description: Identifies the type of wallet used in the payment. Please contact our [VTEX Support](https://help.vtex.com/support) to enable this field in your account.
example: Google Pay
cryptogram:
type: string
description: 3DS cryptogram information (available only for payments transactions with DPAN cards). Please contact our [VTEX Support](https://help.vtex.com/support) to enable this field in your account.
example: /gAAAAAAAbQHWutaqaYsQLsAAAA=
eci:
type: string
description: '[Electronic Commerce Indicator](https://support.midtrans.com/hc/en-us/articles/204161150-What-is-ECI-on-3DS-protocol-). This value indicates the result of the authentication attempt on transactions enforced by the 3DS (available only for payments transactions with DPAN cards). Please contact our [VTEX Support](https://help.vtex.com/support) to enable this field in your account.'
example: '05'
miniCart:
type: object
description: Minicart information.
required:
- shippingValue
- taxValue
- buyer
- shippingAddress
- billingAddress
- items
properties:
shippingValue:
type: number
description: Total shipping value.
example: 2
taxValue:
type: number
description: Total tax value.
example: 1
buyer:
type: object
description: Buyer information.
required:
- firstName
- lastName
- document
- documentType
- email
- phone
properties:
id:
type: string
description: Buyer's unique identifier.
example: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName:
type: string
description: Buyer's first name.
example: John
lastName:
type: string
description: Buyer's last name.
example: Doe
document:
type: string
description: Buyer's document number.
example: '01234567890'
documentType:
type: string
description: Buyer's document type.
example: cpf
email:
type: string
description: Buyer's email.
example: john.doe@example.com
phone:
type: string
description: Buyer's phone number.
example: '+5521999999999'
isCorporate:
type: boolean
description: Indicates whether or not the buyer is corporate. If `true`, the fields `corporateName`, `tradeName` and `corporateDocument` are required.
example: false
corporateName:
type: string
description: Buyer's corporate name. This field is required if `isCorporate` is `true`.
example: VTEX
nullable: true
tradeName:
type: string
description: Buyer's trade name. This field is required if `isCorporate` is `true`.
example: VTEX
nullable: true
corporateDocument:
type: string
description: Buyer's corporate document number. This field is required if `isCorporate` is `true`.
example: '123456789'
nullable: true
createdDate:
type: string
description: Date when the buyer's profile was created in yyyy-MM-ddTHH:mm:ss format.
example: '2020-02-18T18:17:45'
shippingAddress:
type: object
description: Information about the address where the purchase will be delivered.
required:
- country
- street
- number
- neighborhood
- postalCode
- city
- state
properties:
country:
type: string
description: Shipping address country code (ISO 3166 alpha-3).
example: BRA
street:
type: string
description: Shipping address street.
example: Praia de Botafogo St.
number:
type: string
description: Shipping address number.
example: '300'
complement:
type: string
description: Shipping address complement.
example: 3rd Floor
neighborhood:
type: string
description: Shipping address neighborhood.
example: Botafogo
postalCode:
type: string
description: Shipping address postal code.
example: '22250040'
city:
type: string
description: Shipping address city.
example: Rio de Janeiro
state:
type: string
description: Shipping address state/province.
example: RJ
billingAddress:
type: object
description: Buyer's billing address information.
required:
- country
- street
- number
- neighborhood
- postalCode
- city
- state
properties:
country:
type: string
description: Billing address country code (ISO 3166 alpha-3).
example: BRA
street:
type: string
description: Billing address street.
example: Brigadeiro Faria Lima Avenue
number:
type: string
description: Billing address number.
example: '4440'
complement:
type: string
description: Billing address complement.
example: 10th Floor
neighborhood:
type: string
description: Billing address neighborhood.
example: Itaim Bibi
postalCode:
type: string
description: Billing address postal code.
example: '04538132'
city:
type: string
description: Billing address city.
example: São Paulo
state:
type: string
description: Billing address state/province.
example: SP
items:
type: array
description: Items of the cart of the purchase.
items:
type: object
description: Cart items information.
required:
- id
- name
- price
- quantity
- discount
properties:
id:
type: string
description: Item identifier.
example: '8'
name:
type: string
description: Item name.
example: Tenis Preto I
price:
type: number
description: Item price per unity.
example: 30.9
quantity:
type: integer
description: Item quantity.
example: 1
discount:
type: integer
description: Discount received for the item.
example: 0
deliveryType:
type: string
description: The delivery SLA selected for this item. Possible values in Brazil, for instance, are PAC, SEDEX.
example: Normal
categoryId:
type: string
description: The item category Id.
example: '5'
sellerId:
type: string
description: In case of a marketplace transaction, this is the Id of the seller for this specific item. Otherwise, this is filled with a '1'.
example: '1'
taxRate:
type: number
description: Value of the sum of all Taxes applied to each item. Rates are in percentage, so 5% is represented as 0.05.
example: 0.05
taxValue:
type: number
description: Total Tax value of the item (taxRate times value).
example: 1.54
recipients:
type: array
description: Array containing the information for the recipients of this payment in case the Payment Provider is configured to allow the split of payments.
items:
type: object
description: Recipients information.
required:
- id
- name
- documentType
- document
- role
- amount
properties:
id:
type: string
description: Recipient identifier.
example: mystore
name:
type: string
description: Recipient name.
example: Company ABC
documentType:
type: string
description: Recipient document type.
example: CNPJ
document:
type: string
description: Recipient document number.
example: '24830098000172'
role:
type: string
description: Indicates if the recipient is the seller or the marketplace.
example: seller
chargeProcessingFee:
type: boolean
description: Indicates whether or not this recipient is charged for processing fees.
example: true
chargebackLiable:
type: boolean
description: Indicates whether or not this recipient is liable to chargebacks.
example: true
amount:
type: number
description: Amount due to this recipient.
example: 13.8
comissionAmount:
type: number
description: Amount received by the Marketplace.
example: 3
merchantSettings:
type: array
description: Custom fields (for the given Provider) which the merchant must fill. Each element of this array is a key-value pair.
items:
type: object
description: Merchant settings information.
required:
- name
- value
properties:
name:
type: string
description: Custom field name.
example: Public Merchant ID Test.
value:
type: string
description: Custom field value.
example: '1'
url:
type: string
description: The order URL from merchant's backoffice.
example: https://admin.mystore.example.com/orders?q=1072430428324
inboundRequestUrl:
type: string
description: The URL to call for the Inbound Request (BETA).
example: https://api.mystore.example.com/checkout/order/1072430428324/inbound-request/:action
secureProxyUrl:
type: string
description: The URL for the [Secure Proxy](https://developers.vtex.com/docs/guides/payments-integration-secure-proxy) to authorize the Payment (this field is absent in case the provider does not use the Secure Proxy).
example: https://account.vtexpayments.com.br/.../proxy
sandBoxMode:
type: boolean
description: Indicates whether or not this request is being sent from a sandbox environment.
example: false
totalCartValue:
type: number
description: Total amount of the shopping cart that this payment is part of. It can be used together with the value to calculate the percentage that this payment represents of the total.
example: 31.9
callbackUrl:
type: string
description: The URL you need to call to send the callbacks (notification or retry) of payment status changes.
example: https://coinshop.vtexpayments.com.br/payment-provider/transactions/900BA26FEAC84332A53AE1007E740DE3/payments/E713830E32764BF99028A0A275841BFC/notification
returnUrl:
type: string
description: The URL you need to redirect the end user back to merchant's store when using the redirect flow.
example: https://mystore.example.com/checkout/order/1072430428324
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata field information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
example: MetadataName
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
example: MetadataValue
examples:
Credit Card Success Approved:
value:
reference: '618272'
orderId: '1072430428324'
shopperInteraction: ecommerce
transactionId: 2F023FD5A72A49D48A8633252B7CCBD6
paymentId: 01693EB95BE443AC85874E395CD91565
paymentMethod: Diners
paymentMethodCustomCode:
merchantName: mystore
card:
holder: John Doe
number: 364901****2661
csc: '***'
expiration:
month: '12'
year: '2020'
document: '39295416023'
token:
value: 31.9
referenceValue: 31.9
currency: BRL
installments: 1
installmentsInterestRate: 0
installmentsValue: 31.9
deviceFingerprint: '75076388'
ipAddress: 187.105.111.65
miniCart:
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: cpf
corporateName:
tradeName:
corporateDocument:
isCorporate: false
email: john.doe@example.com
phone: '+5521999999999'
createdDate: '2020-02-18T18:17:45'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '8'
name: Tenis Preto I
price: 30.9
quantity: 1
discount: 0
deliveryType: Normal
categoryId: '5'
sellerId: '1'
shippingValue: 1
taxValue: 0
url: https://admin.mystore.example.com/orders?q=1072430428324
callbackUrl: https://api.mystore.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/1072430428324
inboundRequestsUrl: https://api.mystore.example.com/checkout/order/1072430428324/inbound-request/:action
recipients:
- id: mymarketplace
name: My Marketplace QA
documentType: CNPJ
document: '99999999999999'
role: marketplace
chargeProcessingFee: true
chargebackLiable: true
amount: 31.9
merchantSettings:
- name: field1
value: value1
- name: field2
value: value2
connectorMetadata:
- name: MetadataName
value: MetadataValue
Pix Success Approved:
value:
reference: '32478982'
orderId: v967373115140abc
shopperInteraction: ecommerce
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
paymentMethod: Pix
paymentMethodCustomCode:
merchantName: mystore
value: 4307.23
referenceValue: 4307.23
currency: BRL
installments: 1
deviceFingerprint: 15ace369587ha
card:
holder:
number:
csc:
expiration:
month:
year:
miniCart:
shippingValue: 11.44
taxValue: 10.01
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: cpf
email: john.doe@example.com
phone: '+5521999999999'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '132981'
name: My First Product
price: 2134.9
quantity: 2
discount: 5
- id: '123242'
name: My Second Product
price: 21.98
quantity: 1
discount: 1
url: https://admin.mystore.example.com/orders/v32478982
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/v32478982
Success Undefined:
value:
reference: '32478982'
orderId: v967373115140abc
shopperInteraction: ecommerce
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
paymentMethod: Visa
paymentMethodCustomCode:
merchantName: mystore
value: 4307.23
referenceValue: 4000
currency: BRL
installments: 3
deviceFingerprint: 12ade389087fe
card:
holder: John Doe
number: '4682185088924788'
csc: '021'
expiration:
month: '06'
year: '2029'
miniCart:
shippingValue: 11.44
taxValue: 10.01
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: CPF
email: john.doe@example.com
phone: '+5521987654321'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '132981'
name: My First Product
price: 2134.9
quantity: 2
discount: 5
- id: '123242'
name: My Second Product
price: 21.98
quantity: 1
discount: 1
url: https://admin.mystore.example.com/orders/v32478982
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/v32478982
BankInvoice Success Undefined:
value:
reference: '32478982'
orderId: v967373115140abc
shopperInteraction: ecommerce
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
paymentMethod: BankInvoice
paymentMethodCustomCode:
merchantName: mystore
value: 4307.23
referenceValue: 4307.23
currency: BRL
installments: 1
deviceFingerprint: 12ade389087fe
card:
holder:
number:
csc:
expiration:
month:
year:
miniCart:
shippingValue: 11.44
taxValue: 10.01
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: CPF
email: john.doe@example.com
phone: '+5521987654321'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '132981'
name: My First Product
price: 2134.9
quantity: 2
discount: 5
- id: '123242'
name: My Second Product
price: 21.98
quantity: 1
discount: 1
url: https://admin.mystore.example.com/orders/v32478982
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/v32478982
Success Denied:
value:
reference: '32478982'
orderId: v967373115140abc
shopperInteraction: ecommerce
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
paymentMethod: Visa
paymentMethodCustomCode:
merchantName: mystore
value: 4307.23
referenceValue: 4000
currency: BRL
installments: 3
deviceFingerprint: 12ade389087fe
card:
holder: John Doe
number: '4682185088924788'
csc: '021'
expiration:
month: '06'
year: '2029'
miniCart:
shippingValue: 11.44
taxValue: 10.01
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: CPF
email: john.doe@example.com
phone: '+5521987654321'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '132981'
name: My First Product
price: 2134.9
quantity: 2
discount: 5
- id: '123242'
name: My Second Product
price: 21.98
quantity: 1
discount: 1
url: https://admin.mystore.example.com/orders/v32478982
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/v32478982
BankInvoice Success Approved:
value:
reference: '618272'
orderId: '1072430428324'
shopperInteraction: ecommerce
transactionId: 2F023FD5A72A49D48A8633252B7CCBD6
paymentId: 01693EB95BE443AC85874E395CD91565
paymentMethod: BankInvoice
paymentMethodCustomCode:
merchantName: mystore
card:
holder: 'null'
number: 'null'
csc: 'null'
expiration:
month: 'null'
year: 'null'
document:
token:
value: 31.9
referenceValue: 31.9
currency: BRL
installments: 1
installmentsInterestRate: 0
installmentsValue: 31.9
deviceFingerprint: '98073964'
ipAddress: 187.105.111.65
miniCart:
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: cpf
corporateName:
tradeName:
corporateDocument:
isCorporate: false
email: john.doe@example.com
phone: '+5521999999999'
createdDate: '2020-02-18T18:17:45'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '8'
name: Tenis Preto I
price: 30.9
quantity: 1
discount: 0
deliveryType: Normal
categoryId: '5'
sellerId: '1'
shippingValue: 11.44
taxValue: 10.01
url: https://admin.mystore.example.com/orders?q=1072430428324
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/1072430428324
inboundRequestsUrl: https://api.mystore.example.com/checkout/order/1072430428324/inbound-request/:action
recipients:
- id: mymarketplace
name: My Marketplace QA
documentType: CNPJ
document: '99999999999999'
role: marketplace
chargeProcessingFee: true
chargebackLiable: true
amount: 31.9
merchantSettings:
- name: field1
value: value1
- name: field2
value: value2
Payment App + Inbound Request Success Undefined:
value:
reference: '32478982'
orderId: v967373115140abc
shopperInteraction: ecommerce
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
paymentMethod: CustomPay
paymentMethodCustomCode:
merchantName: mystore
value: 4307.23
referenceValue: 4307.23
currency: BRL
installments: 1
deviceFingerprint: 12ade389087fe
card:
holder:
number:
csc:
expiration:
month:
year:
miniCart:
shippingValue: 11.44
taxValue: 10.01
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: CPF
email: john.doe@example.com
phone: '+5521987654321'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '132981'
name: My First Product
price: 2134.9
quantity: 2
discount: 5
- id: '123242'
name: My Second Product
price: 21.98
quantity: 1
discount: 1
url: https://admin.mystore.example.com/orders/v32478982
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/v32478982
inboundRequestsUrl: https://mystore.api.example.com/some-path/inbound-request/:action
Redirect Success Undefined:
value:
reference: '32478982'
orderId: v967373115140abc
shopperInteraction: ecommerce
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
paymentMethod: FakePay
paymentMethodCustomCode:
merchantName: mystore
value: 4307.23
referenceValue: 4307.23
currency: BRL
installments: 1
deviceFingerprint: 12ade389087fe
card:
holder:
number:
csc:
expiration:
month:
year:
miniCart:
shippingValue: 11.44
taxValue: 10.01
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: CPF
email: john.doe@example.com
phone: '+5521987654321'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '132981'
name: My First Product
price: 2134.9
quantity: 2
discount: 5
- id: '123242'
name: My Second Product
price: 21.98
quantity: 1
discount: 1
url: https://admin.mystore.example.com/orders/v32478982
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/v32478982
Redirect Success Approved:
value:
reference: '618272'
orderId: '1072430428324'
shopperInteraction: ecommerce
transactionId: 2F023FD5A72A49D48A8633252B7CCBD6
paymentId: 01693EB95BE443AC85874E395CD91565
paymentMethod: RedirectPay
paymentMethodCustomCode:
merchantName: mystore
value: 31.9
referenceValue: 31.9
currency: BRL
installments: 1
installmentsInterestRate: 0
installmentsValue: 31.9
deviceFingerprint: '75076388'
ipAddress: 187.105.111.65
miniCart:
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: cpf
corporateName:
tradeName:
corporateDocument:
isCorporate: false
email: john.doe@example.com
phone: '+5521999999999'
createdDate: '2020-02-18T18:17:45'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '8'
name: Tenis Preto I
price: 30.9
quantity: 1
discount: 0
deliveryType: Normal
categoryId: '5'
sellerId: '1'
shippingValue: 1
taxValue: 0
url: https://admin.mystore.example.com/orders/v32478982
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/v32478982
inboundRequestsUrl: https://api.mystore.example.com/checkout/order/1072430428324/inbound-request/:action
recipients:
- id: mymarketplace
name: My Marketplace QA
documentType: CNPJ
document: '99999999999999'
role: marketplace
chargeProcessingFee: true
chargebackLiable: true
amount: 31.9
merchantSettings:
- name: field1
value: value1
- name: field2
value: value2
Fail Generic Error:
value:
reference: '32478982'
orderId: v967373115140abc
shopperInteraction: ecommerce
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
paymentMethod: Visa
paymentMethodCustomCode:
merchantName: mystore
value: 4307.23
referenceValue: 4000
currency: BRL
installments: 3
deviceFingerprint: 12ade389087fe
card:
holder: John Doe
number: '4682185088924788'
csc: '021'
expiration:
month: '06'
year: '2029'
miniCart:
shippingValue: 11.44
taxValue: 10.01
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: CPF
email: john.doe@example.com
phone: '+5521987654321'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '132981'
name: My First Product
price: 2134.9
quantity: 2
discount: 5
- id: '123242'
name: My Second Product
price: 21.98
quantity: 1
discount: 1
url: https://admin.mystore.example.com/orders/v32478982
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/v32478982
Fail Bad Request:
value:
reference: '32478982'
orderId: v967373115140abc
shopperInteraction: ecommerce
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
paymentMethod: Visa
paymentMethodCustomCode:
merchantName: mystore
value: 4307.23
referenceValue: 4000
currency: BRL
installments: 3
deviceFingerprint: 12ade389087fe
card:
holder: John Doe
number: '4682185088924788'
csc: '021'
expiration:
month: '06'
year: '2029'
miniCart:
shippingValue: 11.44
taxValue: 10.01
buyer:
id: c1245228-1c68-11e6-94ac-0afa86a846a5
firstName: John
lastName: Doe
document: '01234567890'
documentType: CPF
email: john.doe@example.com
phone: '+5521987654321'
shippingAddress:
country: BRA
street: Praia de Botafogo St.
number: '300'
complement: 3rd Floor
neighborhood: Botafogo
postalCode: '22250040'
city: Rio de Janeiro
state: RJ
billingAddress:
country: BRA
street: Brigadeiro Faria Lima Avenue
number: '4440'
complement: 10th Floor
neighborhood: Itaim Bibi
postalCode: '04538132'
city: São Paulo
state: SP
items:
- id: '132981'
name: My First Product
price: 2134.9
quantity: 2
discount: 5
- id: '123242'
name: My Second Product
price: 21.98
quantity: 1
discount: 1
url: https://admin.mystore.example.com/orders/v32478982
callbackUrl: https://api.example.com/some-path/to-notify/status-changes?an=mystore
returnUrl: https://mystore.example.com/checkout/order/v32478982
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Success-Approved'
examples:
Success:
value:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
status: approved
authorizationId: AUT123567
nsu: NSU987432
tid: TID1578324421
acquirer: FooBarPayments
delayToAutoSettle: 432000
delayToAutoSettleAfterAntifraud: 120
delayToCancel: 600
connectorMetadata:
- name: MetadataName
value: MetadataValue
Success - PIX:
value:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
status: undefined
tid: TID1578324421
authorizationId:
nsu:
code: APP123
paymentAppData:
payload: '{"code":"https://bacen.pix/pix/code","qrCodeBase64Image":"iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAYAAABytg0kAAABQGlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGDiSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAxSDMwMkgwiCZmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsgspwWXFu+Xeyundb6w0WL33C5M9SiAKyW1OBlI/wHihOSCohIGBsYYIFu5vKQAxG4AskWKgI4CsqeA2OkQ9goQOwnC3gNWExLkDGRfALIFkjMSU4DsB0C2ThKSeDoSG2ovCLAZGZkbhBNwKKmgJLWiBEQ75xdUFmWmZ5QoOAJDJ1XBMy9ZT0fByMDIgIEBFNYQ1Z9vgMOQUYwDIZapzMBgmQEUfIQQSxNmYNiZzsDAU4UQU5/PwMBrxMBw5GJBYlEi3AGM31iK04yNIGzu7QwMrNP+//8M9Ca7JgPD3+v////e/v//32UMDMy3GBgOfAMA4+RdqZ9YRkcAAABWZVhJZk1NACoAAAAIAAGHaQAEAAAAAQAAABoAAAAAAAOShgAHAAAAEgAAAESgAgAEAAAAAQAAAAKgAwAEAAAAAQAAAAIAAAAAQVNDSUkAAABTY3JlZW5zaG900Fpo3gAAAdJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6ZXhpZj0iaHR0cDovL25zLmFkb2JlLmNvbS9leGlmLzEuMC8iPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MjwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlVzZXJDb21tZW50PlNjcmVlbnNob3Q8L2V4aWY6VXNlckNvbW1lbnQ+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4yPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Cl89Cn4AAAASSURBVAgdY/wPBAxAwAQiQAAAPfgEAIAu9DkAAAAASUVORK5CYII="}'
message: The customer needs to finish the payment flow
delayToAutoSettle: 604800
delayToAutoSettleAfterAntifraud: 120
delayToCancel: 300
Success - Credit Card:
value:
paymentId: 01693EB95BE443AC85874E395CD91565
status: approved
authorizationId: AUT-09DC5E8F03
nsu: NSU-107521E866
tid: TID-7B58BE1A08
acquirer: TestPay
code: '2000'
message:
delayToAutoSettle: 21600
delayToAutoSettleAfterAntifraud: 1800
delayToCancel: 21600
connectorMetadata:
- name: MetadataName
value: MetadataValue
Success - Bank invoice:
value:
paymentId: 01693EB95BE443AC85874E395CD91565
status: undefined
authorizationId: AUT-2E7CBF7290-ASYNC
paymentUrl: https://example.org/boleto/gatewayqa/2F023FD5A72A49D48A8633252B7CCBD6/01693EB95BE443AC85874E395CD91565
identificationNumber: '23790504004199031316957008109209378300000019900'
identificationNumberFormatted: 23790.50400 41990.313169 57008.109209 3 78300000019900
barCodeImageType: i25
barCodeImageNumber: '23793783000000199000504041990313165700810920'
nsu: NSU-60F328ACD8-ASYNC
tid: TID-F3FB9B3FDB-ASYNC
acquirer: TestPay
code: 2000-ASYNC
message:
delayToAutoSettle: 21600
delayToAutoSettleAfterAntifraud: 1800
delayToCancel: 21600
Success - Payment App:
value:
paymentId: 01693EB95BE443AC85874E395CD91565
status: undefined
authorizationId: AUT-6929AD8429
paymentAppData:
appName: vtex.payment
payload: '{"approvePaymentUrl":"https://api.mystore.example.com/payments/F5C1A4E20D3B4E07B7E871F5B5BC9F91/callback-trigger/approved?url=https://api.mystore.example.com/transactions/D3AA1FC8372E430E8236649DB5EBD08E/payments/F5C1A4E20D3B4E07B7E871F5B5BC9F91/notification","denyPaymentUrl":"https://api.mystore.example.com/payments/F5C1A4E20D3B4E07B7E871F5B5BC9F91/callback-trigger/denied?url=https://api.mystore.example.com/transactions/D3AA1FC8372E430E8236649DB5EBD08E/payments/F5C1A4E20D3B4E07B7E871F5B5BC9F91/notification","orderId":"1072650953886","transactionId":"D3AA1FC8372E430E8236649DB5EBD08E","paymentId":"F5C1A4E20D3B4E07B7E871F5B5BC9F91","timestamp":"2020-10-29 17:15:59Z"}'
nsu: NSU-227AFD0BD2
tid: TID-DBE4BFFB19
acquirer: TestPay
code: '2001'
message:
delayToAutoSettle: 21600
delayToAutoSettleAfterAntifraud: 1800
delayToCancel: 21600
Success - Redirect:
value:
paymentId: 7ee64e51-a0d3-4405-874c-d7497ab84572
status: undefined
tid: 214c699cb408ce6a7110
paymentUrl: http://php-connector.herokuapp.com/installments.php?paymentId=7ee64e51-a0d3-4405-874c-d7497ab84572
Success - Callback:
value:
paymentId: 7ee64e51-a0d3-4405-874c-d7497ab84572
status: approved
authorizationId: 3baafb4097d6c8ad3883
paymentUrl:
nsu: 214c699cb408ce6a7110
tid: 214c699cb408ce6a7110
acquirer:
code:
message: Payment with custom installments approved
delayToAutoSettle: 21600
delayToAutoSettleAfterAntifraud: 1800
delayToCancel: 21600
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/Fail-BadRequest'
example:
status: error
code: ERR123
message: The currency ABC is not supported
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Fail-BadRequest'
example:
status: error
code: ERR123
message: Authorization has failed due to an internal error
deprecated: false
/payments/{paymentId}/cancellations:
post:
tags:
- Payment Flow
summary: VTex Cancel payment
description: "Cancels a payment that was not yet approved or settled.\r\n\r\n> ℹ️ This request is made from VTEX to the payment provider.\r\n\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed."
operationId: CancelPayment
parameters:
- $ref: '#/components/parameters/X-PROVIDER-API-AppKey'
- $ref: '#/components/parameters/X-PROVIDER-API-AppToken'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/paymentId'
security:
- appKey: []
appToken: []
- VtexIdclientAutCookie: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CancelPaymentRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Success1'
example:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
cancellationId: '1231323234234'
code:
message: Successfully cancelled
requestId: D12D9B80972C462980F5067A3A126837
connectorMetadata:
- name: MetadataName
value: MetadataValue
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Fail-GenericError1'
example:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
cancellationId:
code: ERR123
message: Cancellation has failed due to an internal error
requestId: D12D9B80972C462980F5067A3A126837
'501':
description: Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Fail-GenericError1'
example:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
cancellationId:
code: cancel-manually
message: This payment needs to be manually cancelled
requestId: D12D9B80972C462980F5067A3A126837
deprecated: false
/payments/{paymentId}/settlements:
post:
tags:
- Payment Flow
summary: VTex Settle payment
description: "Settles a payment that was previously approved.\r\n\r\n> ℹ️ This request is made from VTEX to the payment provider.\r\n\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed."
operationId: SettlePayment
parameters:
- $ref: '#/components/parameters/X-PROVIDER-API-AppKey'
- $ref: '#/components/parameters/X-PROVIDER-API-AppToken'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/paymentId'
security:
- appKey: []
appToken: []
- VtexIdclientAutCookie: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SettlePayment'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Success2'
example:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
settleId: 2EA354989E7E4BBC9F9D7B66674C2574
value: 57
code:
message: Successfully settled
requestId: DCEAA1FC8372E430E8236649DB5EBD08E
connectorMetadata:
- name: MetadataName
value: MetadataValue
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Fail-GenericError2'
example:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
settleId:
value: 0
code: ERR123
message: Settlement has failed due to an internal error
requestId: DCEAA1FC8372E430E8236649DB5EBD08E
deprecated: false
/payments/{paymentId}/refunds:
post:
tags:
- Payment Flow
summary: VTex Refund payment
description: "Refunds a payment (in full or in part) that was previously settled.\r\n\r\n> ℹ️ This request is made from VTEX to the payment provider.\r\n\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed."
operationId: RefundPayment
parameters:
- $ref: '#/components/parameters/X-PROVIDER-API-AppKey'
- $ref: '#/components/parameters/X-PROVIDER-API-AppToken'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/paymentId'
security:
- appKey: []
appToken: []
- VtexIdclientAutCookie: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/RefundPayment'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Success3'
example:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
refundId: 2EA354989E7E4BBC9F9D7B66674C2574
value: 57
code:
message: Successfully refunded
requestId: LA4E20D3B4E07B7E871F5B5BC9F91
connectorMetadata:
- name: MetadataName
value: MetadataValue
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/Fail-GenericError3'
example:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
refundId:
value: 0
code: ERR123
message: Refund has failed due to an internal error
requestId: LA4E20D3B4E07B7E871F5B5BC9F91
'501':
description: Not Implemented
content:
application/json:
schema:
$ref: '#/components/schemas/Fail-GenericError3'
example:
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
refundId:
value: 0
code: refund-manually
message: This payment needs to be manually refunded
requestId: LA4E20D3B4E07B7E871F5B5BC9F91
deprecated: false
/payments/{paymentId}/inbound/{action}:
post:
tags:
- Payment Flow
summary: VTex Inbound request (BETA)
description: "The Inbound request (BETA) implements an URL that facilitates a direct connection between VTEX Gateway service and the Payment Provider. This functionality allows the payment provider to create other types of specific routes, in addition to those described in the other PPP endpoints, according to their type of operation (e.g. hook or enrollment routes, among others). \r\n\r\nThis endpoint forwards a request back to your endpoint using the `inboundRequestsUrl` provided in the [Create Payment](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#post-/payments?endpoint=post-/payments) endpoint payload.\r\n\r\nThe `{action}` part of the path will be the same you have used to call the `inboundRequestsUrl` (e.g. hook, enrollment, among others).\r\n\r\n> ℹ️ This request is made from VTEX to the payment provider.\r\n\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed."
operationId: InboundRequest(BETA)
parameters:
- $ref: '#/components/parameters/X-PROVIDER-API-AppKey'
- $ref: '#/components/parameters/X-PROVIDER-API-AppToken'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/paymentId'
- name: action
in: path
description: Describes the type of action that will be performed on the route (e.g. hook, enrollment, among others). It is the same `:action` information used in the `inboundRequestsUrl` provided in the [Create Payment](https://developers.vtex.com/docs/api-reference/payment-provider-protocol#post-/payments?endpoint=post-/payments) endpoint payload.
required: true
style: simple
schema:
type: string
example: hook
security:
- appKey: []
appToken: []
- VtexIdclientAutCookie: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/InboundRequest_BETA_Request'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Success4'
example:
requestId: LA4E20D3B4E07B7E871F5B5BC9F91
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
responseData:
statusCode: 200
contentType: application/json
content: '{"myAttribute":"anyValue"}'
connectorMetadata:
- name: MetadataName
value: MetadataValue
deprecated: false
/authorization/token:
post:
tags:
- Configuration Flow
summary: VTex Create authorization token
description: "Creates the authorization token that will be used for VTEX to redirect the merchant to the provider's authentication application. For more information about the Payment Provider Protocol (PPP) merchant authentication procedure, visit [Configuration Flow](https://developers.vtex.com/docs/guides/payments-integration-implementing-a-payment-provider#configuration-flow).\r\n\r\n> ℹ️ This request is made from VTEX to the payment provider.\r\n\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed."
operationId: CreateAuthorizationToken
parameters:
- $ref: '#/components/parameters/X-PROVIDER-API-AppKey'
- $ref: '#/components/parameters/X-PROVIDER-API-AppToken'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
security:
- appKey: []
appToken: []
- VtexIdclientAutCookie: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAuthorizationTokenRequest'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Success5'
example:
applicationId: vtex
token: 358a5bea-07d0-4122-888a-54ab70b5f02f
deprecated: false
/authorization/redirect:
get:
tags:
- Configuration Flow
summary: VTex Provider authentication
description: "Use the application of provider for merchant's authentication.\r\n\r\nVTEX will redirect the merchant to your application using the `token` we retrieved earlier.\r\n\r\nYou're expected to have a signup/signin process on your side in order to authenticate the merchant, either as a new or as an existent user.\r\n\r\nAt this point, you can present your terms an conditions, a contract, and ask for merchant's final agreement to use your services.\r\n\r\nFinally, you need to generate an `authorizationCode` that you must concatenate to the `returnUrl` we send earlier.\r\n\r\nExample:\r\n\r\n`returnUrl` = `https://admin.mystore.example.com/provider-return?authorizationCode=`\r\n\r\n`authorizationCode` = `7940597D-A63B`\r\n\r\nRedirect the merchant to:\r\n\r\n`https://admin.mystore.example.com/provider-return?authorizationCode=7940597D-A63B` \r\n\r\n For more information about the Payment Provider Protocol (PPP) merchant authentication procedure, visit [Configuration Flow](https://developers.vtex.com/docs/guides/payments-integration-implementing-a-payment-provider#configuration-flow).\r\n\r\n> ℹ️ This request is made from VTEX to the payment provider.\r\n\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed."
operationId: ProviderAuthentication
parameters:
- $ref: '#/components/parameters/X-PROVIDER-API-AppKey'
- $ref: '#/components/parameters/X-PROVIDER-API-AppToken'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/applicationId'
- name: token
in: query
description: You must generate a token that will be used to identify the same context when we redirect the merchant to your application.
required: true
style: form
explode: true
schema:
type: string
example: '{{token}}'
security:
- appKey: []
appToken: []
- VtexIdclientAutCookie: []
responses:
'200':
description: OK. This endpoint does not return any data in the response body.
deprecated: false
/authorization/credentials:
get:
tags:
- Configuration Flow
summary: VTex Get credentials
description: "Retrieves the merchant credentials (applicationId, appKey and appToken) registered with the payment provider. These credentials will be saved in the VTEX system and activated when the retailer decides to enable the connector.\r\n\r\n For more information about the Payment Provider Protocol (PPP) merchant authentication procedure, visit [Configuration Flow](https://developers.vtex.com/docs/guides/payments-integration-implementing-a-payment-provider#configuration-flow).\r\n\r\n> ℹ️ This request is made from VTEX to the payment provider.\r\n\r\n## Permissions\r\n\r\nCheck with your service provider to know what permissions are needed."
operationId: GetCredentials
parameters:
- $ref: '#/components/parameters/X-PROVIDER-API-AppKey'
- $ref: '#/components/parameters/X-PROVIDER-API-AppToken'
- $ref: '#/components/parameters/Content-Type'
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/applicationId'
- name: authorizationCode
in: query
description: Code generate by affiliation that will be used to identify the merchant authorization.
required: true
style: form
explode: true
schema:
type: string
example: '{{authorizationCode}}'
security:
- appKey: []
appToken: []
- VtexIdclientAutCookie: []
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Success6'
example:
applicationId: vtex
appKey: c5a5e3f1-4a77-4a00-8b53-0d1adb3e9628
appToken: 57ea254d-f3d3-488d-88d7-129766037ed1
deprecated: false
components:
schemas:
Success:
required:
- paymentMethods
type: object
description: Payment methods information.
properties:
paymentMethods:
type: array
description: List of each payment method implemented.
items:
type: string
description: Payment methods information.
example:
paymentMethods:
- Visa
- Mastercard
- Pix
- American Express
- BankInvoice
- Privatelabels
- Promissories
Success-Manifest:
required:
- paymentMethods
type: object
description: Payment provider manifest response body information.
properties:
paymentMethods:
type: array
description: Describes each payment method supported by payment provider and exposed its respective metadata.
items:
type: object
description: Payment methods information.
required:
- name
- allowsSplit
properties:
name:
type: string
description: Payment method name.
allowsSplit:
type: string
description: Describes which transaction flow stage the connector should receive payment split data. Check more details on the [Split Payouts on the Payment Provider Protocol](https://developers.vtex.com/vtex-rest-api/docs/split-payouts-on-payment-provider-protocol) article.
enum:
- onAuthorize
- onCapture
- disabled
customFields:
type: array
description: Describes the customized fields supported by the connector. Except for `appKey` or `appToken` values, which must be defined in homonymous fields, any other security data should be sent or stored as `password` type fields.
items:
type: object
description: Custom fields information.
properties:
name:
type: string
description: Custom field name.
type:
type: string
description: Custom field type.
enum:
- text
- password
- select
options:
type: array
description: In case of `select` type, the possible params are `text` and `value`.
items:
type: object
description: Custom field information.
properties:
text:
type: string
description: Custom field description.
value:
type: string
description: Custom field value.
autoSettleDelay:
type: object
description: 'Describes the allowed delay value for the auto settle capture. Accepted values: `minimum` and `maximum` in whole hours (decimals are not allowed). Check more details on the [Custom Auto Capture Feature](https://developers.vtex.com/vtex-rest-api/docs/custom-auto-capture-feature) article.'
required:
- minimum
- maximum
properties:
minimum:
type: string
description: Minimum amount of time to auto settle in hours.
maximum:
type: string
description: Maximum amount of time to auto settle in hours.
metadataFields:
type: array
description: 'Array containing the names of the metadata fields sent from the provider to the payment gateway. Limitations: the array must contain a maximum of 3 strings, and each of them, a maximum of 20 characters.'
items:
type: string
description: Metadata fields information.
Success-Approved:
required:
- paymentId
- status
- authorizationId
- tid
- nsu
- acquirer
- delayToAutoSettle
- delayToAutoSettleAfterAntifraud
- delayToCancel
type: object
description: Create payment response body information.
properties:
paymentId:
type: string
description: VTEX identifier for this payment. The same sent in the request.
status:
type: string
description: "The Provider's status for this payment. Must be one of three values:\r\n\r\n- `approved`\r\n- `denied`\r\n- `undefined`."
authorizationId:
type: string
description: Provider's unique identifier for the authorization. Should be sent when the payment is authorized. In other statuses, it should be absent or `null`.
bankIssueInvoiceId:
type: string
description: This field is deprecated, please use `paymentUrl` instead. The bank invoice URL to be presented to the end user.
paymentUrl:
type: string
description: When the payment is via bank invoice, this should be the invoice URL to be presented to the user. If the payment requires the redirection of the user, this should be the URL to redirect the user. If neither is the case, then this should be absent.
nullable: true
paymentAppData:
type: object
description: Object which indicates that a [Payment App](https://developers.vtex.com/docs/guides/payments-integration-payment-app) is needed to finish the payment. This object contains the data to be used by the Payment App.
required:
- appName
- payload
properties:
appName:
type: string
description: Indicates which VTEX IO app that will handle the payment flow at Checkout.
payload:
type: string
description: The payload that will be sent to your app, like a serialized JSON, for example.
identificationNumber:
type: string
description: The bank invoice unformatted identification number. Should only be present when the payment is made via bank invoice.
identificationNumberFormatted:
type: string
description: The bank invoice formatted identification number that will be presented to the end user.
barCodeImageType:
type: string
description: The bank invoice barcode image type. For instance, "i25" for Brazilian *Boleto Bancário*. Should only be present when the payment is made via bank invoice.
barCodeImageNumber:
type: string
description: The bank invoice number to generate a barcode (must follow any regulations/specifications for targeted countries). Should only be present when the payment is made via bank invoice.
tid:
type: string
description: Provider's unique identifier for the transaction.
nsu:
type: string
description: Provider's unique sequential number for the transaction.
nullable: true
acquirer:
type: string
description: Acquirer name (mostly used for card payments).
nullable: true
redirectUrl:
type: string
description: This field is deprecated, please use `paymentUrl` instead. The URL the end user needs to be redirected to (external authentication, 3DS, etc).
code:
type: string
description: Provider's operation/error code to be logged.
nullable: true
message:
type: string
description: Provider's operation/error message to be logged.
nullable: true
delayToAutoSettle:
type: integer
description: Total time (in seconds) before we make an automatic call to `/settlements`, regardless of whether the payment was approved by the merchant's anti-fraud provider or not. The maximum time allowed to wait for an auto capture is 604800 seconds (7 days).
delayToAutoSettleAfterAntifraud:
type: integer
description: Total time (in seconds) before we make an automatic call to `/settlements` after merchant's antifraud approval.
delayToCancel:
type: integer
description: 'Total time (in seconds) to wait for an authorization and make an automatic call to `/cancellations` to cancel the payment. The minimum value is 10 minutes (600 seconds). **NOTE 1**: If you set this field to a time period less than 24 hours (86399 seconds or less), the gateway will retry processing the payment every 1 hour. If you use a value of 24 hours (86400 seconds) or more in this field, the gateway will retry processing the payment every 4 hours. **NOTE 2**: For `delayToCancel` values between 5 minutes and 1 hour (300 and 3600 seconds), or when payment is made by [PIX](https://developers.vtex.com/docs/guides/payments-integration-pix-instant-payments-in-brazil) (Brazilian instant payment method), retry calls will occur every 5 minutes.'
maxValue:
type: integer
description: The maximum value for this payment. This field allows changes to be made to transactions to settle larger amounts as a result of order changes.
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata fields information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
Fail-BadRequest:
required:
- status
- code
- message
type: object
description: Bad request information.
properties:
status:
type: string
description: The Provider's status for this payment.
code:
type: string
description: Provider's operation/error code to be logged.
message:
type: string
description: Provider's operation/error message to be logged.
CancelPaymentRequest:
required:
- paymentId
- requestId
- authorizationId
type: object
description: Cancel payment request body information.
properties:
paymentId:
type: string
description: VTEX payment identifier.
example: F5C1A4E20D3B4E07B7E871F5B5BC9F91
requestId:
type: string
description: VTEX request identifier.
example: D12D9B80972C462980F5067A3A126837
authorizationId:
type: string
description: Payment authorization identifier (in case it was authorized previous to the cancellation request).
example: '5784589'
tid:
type: string
description: Provider's unique identifier for the transaction.
example: '10022005181543584603'
transactionId:
type: string
description: VTEX transaction ID related to this payment.
example: D3AA1FC8372E430E8236649DB5EBD08E
nsu:
type: string
description: Provider's unique sequential number for the transaction.
example: NSU987432
sandboxMode:
type: boolean
description: Indicates whether or not this request is being sent from a sandbox environment.
example: false
merchantSettings:
type: array
description: Custom fields (for the given provider) which the merchant must fill. Each element of this array is a key-value pair.
items:
type: object
description: Merchant settings information.
required:
- name
- value
properties:
name:
type: string
description: The custom field name.
example: Public Merchant ID Test.
value:
type: string
description: The custom field value.
example: '1'
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata fields information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
example: MetadataName
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
example: MetadataValue
Success1:
required:
- paymentId
- cancellationId
- code
- message
- requestId
type: object
description: Cancel payment response body information.
properties:
paymentId:
type: string
description: The same `paymentId` sent in the request.
cancellationId:
type: string
description: Provider's cancellation identifier. If the operation has failed you **MUST** return `null`.
code:
type: string
nullable: true
description: Provider's operation/error code to be logged. Return `cancel-manually` if you do not support this operation, so we can send a notification to the merchant.
message:
type: string
description: Provider's operation/error message to be logged.
requestId:
type: string
description: The same `requestId` sent in the request.
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata fields information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
Fail-GenericError1:
required:
- paymentId
- cancellationId
- code
- message
- requestId
type: object
description: Cancellation failure information.
properties:
paymentId:
type: string
description: The same `paymentId` sent in the request.
cancellationId:
type: string
nullable: true
description: Provider's cancellation identifier. If the operation has failed you **MUST** return `null`.
code:
type: string
description: Provider's operation/error code to be logged. Return `cancel-manually` if you do not support this operation, so we can send a notification to the merchant.
message:
type: string
description: Provider's operation/error message to be logged.
requestId:
type: string
description: The same `requestId` sent in the request.
Success2:
required:
- paymentId
- settleId
- value
- code
- message
- requestId
type: object
description: Settle payment response body information.
properties:
paymentId:
type: string
description: The same `paymentId` sent in the request.
settleId:
type: string
description: VTEX identifier for this settlement.
value:
type: number
description: The amount to be settled.
code:
type: string
nullable: true
description: Provider's operation/error code to be logged.
message:
type: string
description: Provider's operation/error message to be logged.
requestId:
type: string
description: The same `requestId` sent in the request.
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata fields information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
Fail-GenericError2:
required:
- paymentId
- settleId
- value
- code
- message
- requestId
type: object
description: Internal server error information.
properties:
paymentId:
type: string
description: The same `paymentId` sent in the request.
settleId:
type: string
nullable: true
description: VTEX identifier for this settlement.
value:
type: integer
description: The amount to be settled.
code:
type: string
description: Provider's operation/error code to be logged.
message:
type: string
description: Provider's operation/error message to be logged.
requestId:
type: string
description: The same `requestId` sent in the request.
Success3:
required:
- paymentId
- refundId
- value
- code
- message
- requestId
type: object
description: Refund payment response body information.
properties:
paymentId:
type: string
description: The same `paymentId` sent in the request.
refundId:
type: string
description: Provider's refund identifier. If the operation has failed you **MUST** return `null`.
value:
type: number
description: The amount that was refunded. If the operation has failed you **MUST** return `0`.
code:
type: string
nullable: true
description: Provider's operation/error code to be logged. Return `refund-manually` if you do not support this operation, so we can send a notification to the merchant.
message:
type: string
description: Provider's operation/error message to be logged.
requestId:
type: string
description: The same `requestId` sent in the request.
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata fields information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
Fail-GenericError3:
required:
- paymentId
- refundId
- value
- code
- message
- requestId
type: object
description: Internal server error information.
properties:
paymentId:
type: string
description: The same `paymentId` sent in the request.
refundId:
type: string
nullable: true
description: Provider's refund identifier. If the operation has failed you **MUST** return `null`.
value:
type: integer
description: The amount to be settled.
code:
type: string
description: Provider's operation/error code to be logged. Return `refund-manually` if you do not support this operation, so we can send a notification to the merchant.
message:
type: string
description: Provider's operation/error message to be logged.
requestId:
type: string
description: The same `requestId` sent in the request.
SettlePayment:
required:
- transactionId
- requestId
- paymentId
- value
- authorizationId
type: object
description: Settle payment request body information.
properties:
transactionId:
type: string
description: VTEX identifier for the transaction related to this payment.
requestId:
type: string
description: The unique identifier for this request to ensure its idempotency.
paymentId:
type: string
description: VTEX identifier for this payment.
value:
type: number
description: The amount to be settled.
authorizationId:
type: string
description: The authorization identifier for this payment.
tid:
type: string
description: Provider's unique identifier for the transaction.
nsu:
type: string
description: Provider's unique sequential number for the transaction.
recipients:
type: array
description: Array containing the information for the recipients of this payment in case the Payment Provider is configured to allow the split of payments.
items:
type: object
description: Recipients information.
required:
- id
- name
- documentType
- document
- role
- amount
properties:
id:
type: string
description: Recipient identifier.
name:
type: string
description: Recipient name.
documentType:
type: string
description: Recipient document type.
document:
type: string
description: Recipient document number.
role:
type: string
description: Indicates if the recipient is the seller or the marketplace.
chargeProcessingFee:
type: boolean
description: Indicates whether or not this recipient is charged for processing fees.
chargebackLiable:
type: boolean
description: Indicates whether or not this recipient is liable to chargebacks.
amount:
type: number
description: Amount due to this recipient.
commissionAmount:
type: number
description: Amount of commission due to the marketplace.
sandboxMode:
type: boolean
description: Indicates whether or not this request is being sent from a sandbox environment.
merchantSettings:
type: array
description: Custom fields (for the given provider) which the merchant must fill. Each element of this array is a key-value pair.
items:
type: object
description: Merchant settings information.
required:
- name
- value
properties:
name:
type: string
description: The custom field name.
value:
type: string
description: The custom field value.
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata fields information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
example:
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
requestId: 2019-02-04T22:53:42-40000
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
value: 45
authorizationId: '5784589'
tid: '5784589'
nsu: NSU987432
recipients:
- id: mystore
name: Company XPTO
documentType: CNPJ
document: '05314972000174'
role: marketplace
chargeProcessingFee: true
chargebackLiable: true
amount: 7.2
- id: sellerA
name: Company ABC
documentType: CNPJ
document: '24830098000172'
role: seller
chargeProcessingFee: false
chargebackLiable: false
amount: 37.8
commissionAmount: 7.2
sandboxMode: false
merchantSettings:
- name: Public Merchant ID Test.
value: '1'
connectorMetadata:
- name: MetadataName
value: MetadataValue
RefundPayment:
required:
- requestId
- settleId
- paymentId
- tid
- value
- transactionId
type: object
description: Refund payment request body information.
properties:
requestId:
type: string
description: The unique identifier for this request to ensure its idempotency.
settleId:
type: string
description: Provider's settlement identifier.
paymentId:
type: string
description: VTEX identifier for this payment.
tid:
type: string
description: Provider's unique identifier for the transaction.
value:
type: number
description: The amount to be refunded.
transactionId:
type: string
description: VTEX identifier for this transaction.
authorizationId:
type: string
description: The authorization identifier for this payment.
nsu:
type: string
description: Provider's unique sequential number for the transaction.
recipients:
type: array
description: Array containing the information for the recipients of this payment in case the Payment Provider is configured to allow the split of payments.
items:
type: object
description: Recipients information.
required:
- id
- name
- documentType
- document
- role
- amount
properties:
id:
type: string
description: Recipient identifier.
name:
type: string
description: Recipient name.
documentType:
type: string
description: Recipient document type.
document:
type: string
description: Recipient document number.
role:
type: string
description: Indicates if the recipient is the seller or the marketplace.
chargeProcessingFee:
type: boolean
description: Indicates whether or not this recipient is charged for processing fees.
chargebackLiable:
type: boolean
description: Indicates whether or not this recipient is liable to chargebacks.
amount:
type: number
description: Amount due to this recipient.
comissionAmount:
type: number
description: Amount received by the Marketplace.
sandboxMode:
type: boolean
description: Indicates whether or not this request is being sent from a sandbox environment.
merchantSettings:
type: array
description: Custom fields (for the given provider) which the merchant must fill. Each element of this array is a key-value pair.
items:
type: object
description: Merchant settings information.
required:
- name
- value
properties:
name:
type: string
description: The custom field name.
value:
type: string
description: The custom field value.
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata fields information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
example:
requestId: LA4E20D3B4E07B7E871F5B5BC9F91
settleId: Q5C1A4E20D3B4E07B7E871F5B5BC9F91
paymentId: F5C1A4E20D3B4E07B7E871F5B5BC9F91
tid: '10022005181543584603'
authorizationId: AUT123567
nsu: NSU987432
value: 20
transactionId: D3AA1FC8372E430E8236649DB5EBD08E
recipients:
- id: mystore
name: Company XPTO
documentType: CNPJ
document: '05314972000174'
role: marketplace
chargeProcessingFee: true
chargebackLiable: true
amount: 3.2
- id: sellerA
name: Company ABC
documentType: CNPJ
document: '24830098000172'
role: seller
amount: 16.8
comissionAmount: 3
sandboxMode: false
merchantSettings:
- name: Public Merchant ID Test.
value: '1'
connectorMetadata:
- name: MetadataName
value: MetadataValue
InboundRequest_BETA_Request:
required:
- requestId
- transactionId
- paymentId
- authorizationId
- tid
- nsu
- requestData
type: object
description: Inbound request information.
properties:
requestId:
type: string
description: The unique identifier for this request to ensure its idempotency.
example: LA4E20D3B4E07B7E871F5B5BC9F91
transactionId:
type: string
description: VTEX transaction ID related to this payment.
example: D3AA1FC8372E430E8236649DB5EBD08E
paymentId:
type: string
description: VTEX payment ID from this payment.
example: F5C1A4E20D3B4E07B7E871F5B5BC9F91
authorizationId:
type: string
description: Provider's unique identifier for the authorization.
example: AUT123567
nsu:
type: string
description: Provider's unique sequential number for the transaction.
example: NSU987432
tid:
type: string
description: Provider's unique identifier for the transaction.
example: '10022005181543584603'
requestData:
$ref: '#/components/schemas/RequestData'
merchantSettings:
type: array
description: Custom fields (for the given provider) which the merchant must fill. Each element of this array is a key-value pair.
items:
type: object
description: Merchant settings information.
required:
- name
- value
properties:
name:
type: string
description: The custom field name.
example: Public Merchant ID Test.
value:
type: string
description: The custom field value.
example: '1'
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata fields information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
example: MetadataName
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
example: MetadataValue
RequestData:
required:
- body
type: object
description: Request data information.
properties:
body:
type: string
description: Original request body information.
example: '{{originalRequestBody}}'
Success4:
required:
- requestId
- paymentId
- responseData
type: object
description: Inbound Request response body information.
properties:
requestId:
type: string
description: The same `requestId` sent in the request.
paymentId:
type: string
description: The same `paymentId` sent in the request.
code:
type: string
description: Provider's operation/error code to be logged.
message:
type: string
description: Provider's operation/error message to be logged.
responseData:
$ref: '#/components/schemas/ResponseData'
connectorMetadata:
type: array
description: Array containing metadata fields sent from the provider to the payment gateway.
items:
type: object
description: Metadata fields information.
required:
- name
- value
properties:
name:
type: string
description: The name of the metadata to be stored in the gateway (limited to 20 characters).
example: MetadataName
value:
type: string
description: The value of the metadata stored (limited to 200 characters).
example: MetadataValue
ResponseData:
required:
- statusCode
- contentType
- content
type: object
description: Response data information.
properties:
statusCode:
type: integer
description: Your desired status code.
contentType:
type: string
description: Your desired content-type.
content:
type: string
description: Your desired content body.
CreateAuthorizationTokenRequest:
required:
- applicationId
- returnUrl
type: object
description: Create authorization token request body information.
properties:
applicationId:
type: string
description: VTEX application identifier.
example: vtex
returnUrl:
type: string
description: The base URL you need to use to form the final URL when redirecting the merchant back to VTEX.
example: https://admin.mystore.example.com/provider-return?authorizationCode=
Success5:
required:
- applicationId
- token
type: object
description: Create authorization token response body information.
properties:
applicationId:
type: string
description: The same `applicationId` sent in the request.
token:
type: string
description: You must generate a token that will be used to identify the same context when we redirect the merchant to your application.
Success6:
required:
- applicationId
- appKey
- appToken
type: object
description: Get credentials response body information.
properties:
applicationId:
type: string
description: The same `applicationId` sent in the request.
appKey:
type: string
description: The value we will send in the header `X-VTEX-API-AppKey` for the payment flow.
appToken:
type: string
description: The value we will send in the header `X-VTEX-API-AppToken` for the payment flow.
securitySchemes:
appKey:
type: apiKey
in: header
name: X-VTEX-API-AppKey
description: Unique identifier of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys).
appToken:
type: apiKey
in: header
name: X-VTEX-API-AppToken
description: Secret token of the [application key](https://developers.vtex.com/docs/guides/api-authentication-using-application-keys).
VtexIdclientAutCookie:
type: apiKey
in: header
name: VtexIdclientAutCookie
description: '[User token](https://developers.vtex.com/docs/guides/api-authentication-using-user-tokens), valid for 24 hours.'
parameters:
X-PROVIDER-API-AppKey:
name: X-PROVIDER-API-AppKey
in: header
description: Unique identifier created by the provider and configured on the provider configuration page (Admin VTEX). To use this header as authorization, check that the `usesProviderHeadersName` field is set to `true` in the payment provider's `configuration.json`. To check the `configuration.json` file, access the route {{connector}}/paymentProvider/configuration.json.
required: true
style: simple
schema:
type: string
example: '{{X-PROVIDER-API-AppKey}}'
X-PROVIDER-API-AppToken:
name: X-PROVIDER-API-AppToken
in: header
description: Unique token created by the provider and configured on the provider configuration page (Admin VTEX). To use this header as authorization, check that the `usesProviderHeadersName` field is set to `true` in the payment provider's `configuration.json`. To check the `configuration.json` file, access the route {{connector}}/paymentProvider/configuration.json
required: true
style: simple
schema:
type: string
example: '{{X-PROVIDER-API-AppToken}}'
Content-Type:
name: Content-Type
in: header
description: Type of the content being sent.
required: true
style: simple
schema:
type: string
example: application/json
Accept:
name: Accept
in: header
description: HTTP Client Negotiation _Accept_ Header. Indicates the types of responses the client can understand.
required: true
style: simple
schema:
type: string
example: application/json
paymentId:
name: paymentId
in: path
description: VTEX payment identifier.
required: true
style: simple
schema:
type: string
example: F5C1A4E20D3B4E07B7E871F5B5BC9F91
applicationId:
name: applicationId
in: query
description: VTEX application identifier.
required: true
style: form
explode: true
schema:
type: string
example: vtex
tags:
- name: Configuration Flow
- name: Payment Flow