Checkout - API Documentation

Version: 1.0.1 | Last modified: 09/13/2024

Introduction

This document describes the TotalCoin API endpoints for registering a payment intention for subsequent processing in checkout.

Authentication

API access control is done through OAuth 2.0 with Bearer Tokens.

Endpoint

POST api/auth/login

Request

{
    "username": "",
    "password": ""
}
Field Type Description Required
username String Username Yes
password String Password Yes

Response (HTTP 200)

{
    "token": "",
    "expires_in": 3600
}
Field Type Description
token String Authentication token
expires_in Number Token validity in seconds

Possible Errors

Code Description
401 Invalid or non-existent credentials
403 No permissions to access the API
Credentials: Must be requested from the technical department.

Create Payment Intention

Create a payment transaction for a customer's account.

Endpoint

POST api/v2/checkout

Request (form-data)

Field Type Description Required
ME String Merchant number assigned by totalcoin Yes
AM decimal Transaction amount Yes
AC string Concept to display in checkout Yes
DI String DNI or CUIT of the holder or person making the payment Yes
ED String Payment order expiration date No
ER string Internal merchant reference Yes
NA string Last name of the holder or person making the payment Yes
NC string First name of the holder or person making the payment Yes
PM string Payment methods to make available separated by | (pipe). Example: CASH|CREDITCARD
CASH: cash payment (rapipago/pagofacil)
CREDITCARD: Debit or credit cards according to collector account permissions.
Yes
LG string Absolute URL to display custom logo in checkout No
EMC string Email of the holder or person making the payment Yes
CF string Return URL for Failed operation No
CP string Return URL for operations in Process No
CS string Return URL for successful operations No

Response (HTTP 200)

String - Payment intention identifier

Possible Errors

Code Description
401 Not authorized to perform the transaction
500 Error processing the transaction
Access Data:
Base URL: https://apicobranzastest.totalcoin.com (TEST)
*An API user is required (request to totalcoin)

Process Payment Intention

Once the payment intention endpoint has been called and a status 200 has been obtained with the corresponding value, you can proceed to invoke the checkout with the preloaded sent data.

Simply redirect to: [url]/workspace/checkout/receptor?requestId={id}

Key Value
url https://test.totalcoin.com (TEST)
https://ar.totalcoin.com (PROD)
id id obtained by calling the payment intention endpoint

Webhook Notifications

Once the payment is processed, totalcoin will send a notification to an endpoint pre-established by the user.

This webhook is sent only once and always expects to receive a 200 as a response. Totalcoin does NOT process responses or retry in case of destination errors.

To resend webhooks, it can be done manually from our collections portal by users with specific roles and permissions.

Webhook Response Fields

Field Description
Referencia Internal and unique operation reference number of TotalCoin
Concepto Value sent in the ER field in the checkout
Estado Last operation status, with "APROBADO" or "DISPONIBLE" being the values for valid operations
ReferenciaMerchant IdOperacion merchant. This value is no longer null when it is a qr or transfer operation and the integration includes automatic reconciliation. For cards and Cash this value is always null.