VTEX

Payments Gateway API

>ℹ️ Onboarding guide > > Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to…

Other#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

>ℹ️ Onboarding guide
>
> Check the new Payments onboarding guide. 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.

The Payments Gateway API allows you to get payment data and process your store's transactions.

Endpoints 22

Installments

  • GETInstallments options/api/pvt/installments?request.value=10&request.salesChannel=1&request.paymentDetails[0].id=2&request.paymentDetails[0].value=10&request.paymentDetails[0].bin=411111Returns the best installment options according to the informed params.

Configuration

  • GETAffiliations/api/pvt/affiliationsReturns all affiliations that your provider can handle.
  • POSTInsert Affiliation/api/pvt/affiliationsCreates a new affiliation and returns a successful response.
  • GETAffiliation By Id/api/pvt/affiliations/:affiliationIdReturns associated data for the specified affiliation Id, like name and implementation, for example.
  • PUTUpdate Affiliation/api/pvt/affiliations/:affiliationIdReturns all affiliations.
  • GETAvailable Payment Methods/api/pvt/merchants/payment-systemsReturns enabled payment methods, like visa, master, bankissueinvoice that are shown for the final user and enabled to receive payment.
  • GETRules/api/pvt/rulesReturns all rules conditions your provider can handle.
  • POSTInsert Rule/api/pvt/rulesCreates a new rule and returns a successful response.
  • GETRule By Id/api/pvt/rules/:ruleIdReturns rule by specified RuleId.
  • PUTRule By Id/api/pvt/rules/:ruleIdUpdate Rule.
  • DELETEDelete Rule/api/pvt/rules/:ruleIdDeletes rules by specified Id.

Transaction Process

  • POST2.1 Send Payments Information Public/api/pub/transactions/:transactionId/payments?orderId={{orderId}}The second step to create a new transaction. Here, you have the option to send the data in three diferent ways: doing a private request, a public request or a…
  • POST1. Starts a new transaction/api/pvt/transactionsThis request is the first step to create a new transaction.
  • GETTransaction Details/api/pvt/transactions/:transactionIdReturns associated data for the specified transaction id, like value and status, for exemple.
  • POST3. Send Additional Data/api/pvt/transactions/:transactionId/additional-dataThe third step to create a new transaction. It will send the additional related data to the transaction, like billig and shipping adress.
  • POSTDo authorization/api/pvt/transactions/:transactionId/authorization-requestThe fouth and last step to create a new transaction. It will authorized the new transction creation acorrdint to the data previously informed in the latests…
  • POST2.2 Send Payments With Saved Credit Card/api/pvt/transactions/:transactionId/paymentsThe second step to create a new transaction. Here, you have the option to send the data in three diferent ways: doing a private request, a public request or a…
  • GETPayment Details/api/pvt/transactions/:transactionId/payments/:paymentIdReturns associated information details for the specified payment id.
  • GETTransaction Settlement Details/api/pvt/transactions/:transactionId/settlementsReturns associated settlements data for the specified transaction id.

Transaction Flow

  • POSTCancel the transaction/api/pvt/transactions/:transactionId/cancellation-requestCancel's transaction that was previously approved, but not settled.
  • POSTRefund the transaction/api/pvt/transactions/:transactionId/refunding-requestRefunds transaction's value that was previously settled.
  • POSTSettle the transaction/api/pvt/transactions/:transactionId/settlement-requestSettles transaction's value.

API details

Base URL
https://vtex.local
https://{accountName}.vtexpayments.com.br
Authentication
An API key in the X-VTEX-API-AppKey header
An API key in the X-VTEX-API-AppToken header
Operations
22 operations on 17 pathsPOST 10GET 9PUT 2DELETE 1
Main resources
Configuration 10Transaction Process 8Transaction Flow 3Installments 1
Response formats
application/json; charset=utf-8 application/json
Description format
OpenAPI 3.0.0, API version 1.0
Listed from
APIs.guru OpenAPI Directory (CC0-1.0)
Source updated

How to test the Payments Gateway API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the Payments Gateway API collection, without the publisher's secrets.
  3. Add your credentialsThis API uses an API key in the X-VTEX-API-AppKey header. Add yours in the collection's variables or an environment; the requests already reference it.
  4. Send a requestPick an endpoint, for example “Installments options” (GET /api/pvt/installments?request.value=10&request.salesChannel=1&request.paymentDetails[0].id=2&request.paymentDetails[0].value=10&request.paymentDetails[0].bin=411111), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the Payments Gateway API?

>ℹ️ Onboarding guide > > Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to… It is listed under Other and has 22 endpoints.

Who publishes the Payments Gateway API?

It is listed from VTEX's public API description (an OpenAPI document), not published by VTEX on Swastik Codes. Anyone who controls vtex.com can claim the profile by adding a DNS TXT record.

What is the base URL of the Payments Gateway API?

Its description lists 2 base URLs: https://vtex.local, https://{accountName}.vtexpayments.com.br. The first is the usual one; the others are typically sandbox or regional servers.

How do I authenticate with the Payments Gateway API?

It accepts 2 methods: an API key in the X-VTEX-API-AppKey header; an API key in the X-VTEX-API-AppToken header.

How many endpoints does the Payments Gateway API have?

22 operations on 17 paths (10 POST, 9 GET, 2 PUT, 1 DELETE). The largest groups are Configuration, Transaction Process, Transaction Flow, Installments.

Is forking the Payments Gateway API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.