Golang Use Case for Transaction Management

Description

Thanks to the flexibility of the V4 API, you can create your own web application for managing transactions with some of the features that our PayConex™ Portal implements. In this example, we use the Go programming language for the back end to develop a web app capable of handling authorizations, captures, refunds, and generating reports. The web app does this through the transaction metadata in response to processing or updating our transactions. However, we recommend using our Payment Portal for a more comprehensive solution as the PayConex™ V4 API doesn't entirely support all the features that the Portal does.

Sample App Workflow

For practical purposes, we also integrated the Checkout Component to facilitate making and reviewing transactions.

PayConex™ Golang Sample App for Transaction Management

PayConex™ Golang Sample App for Transaction Management

  1. Bearer Token Request: The merchant website requests a bearerToken from the back-end control, which integrates with the PayConex™ V4 API iframe configuration and instance. The back end returns the bearerToken to load the Checkout Component.
  2. Checkout Component Workflow: The customer completes the form with the PayConex™ token returned for an authorization transaction. This workflow is illustrated here: Checkout Component Workflow.
  3. Transaction Processing: With the token, we perform an authorization (CIT) transaction to ensure the customer has the sufficient amount of funds in their account where we receive the transactionId for capturing and/or refunds.
  4. Transaction Metadata Storage: Store the transaction metadata to use transactionId for captures, refunds and querying the database to generate transaction reports that can also be adjusted via the PATCH Transaction.
  5. Transaction Report: Query your database to get the transaction metadata for each transaction. As mentioned previously, certain pieces of transaction metadata can be updated via the PATCH transaction API endpoint, such as the shippingAddress details and customer information.
  6. Transaction Management: Through the back-end controller, the merchant can trigger captures, refunds, get/update transaction metadata via the PayConex™ API and remove a transaction from their database.

📘

Source Code

The source code can be found at our Github Repository.

For expanding on this sample application, also consider the following: