Transactions
Service group for viewing a transaction, checking balances, creating a new transaction, and more.
Service that returns the available balances in the account.
POST
/api/v1/commerces/getBusiness
Request Body
data*
Object
data field
{
"statusCode":200,
"message": "Sucessful",
"data": {
"Business": {
"balance":12000,
"profits":2300
}
},
"_channel": "web"
}
Service that returns all the information about a transaction.
POST
/api/v1/transactions/find
This service returns information about a transaction if it was carried out within the last two days.
Request Body
data*
Object
_id
String
Customer ID (the same as sent in the sale)
{
"statusCode":200,
"message": "Exitoso",
"data": {
"Transaction": {
"id": 1,
"amount": 5000,
"currency": "COP",
"costs": 0,
"prevBalance": 30000,
"newBalance": 25000,
"createdAt": "DD/MM/YY HH:mm",
"Product": {
"id": 1,
"name": "Exitoso",
},
"TransactionStatus": {
"id": 1,
"name": "Exitoso",
"color": "red"
},
"Person": {
"document": "",
"cellphone": ""
},
"PaymentMethod": {
"id": 1,
"image": "",
"name": "Saldo"
}
}
},
"_channel": "web"
}
Status transaction
PENDING
1
APPROVED
2
REJECTED
3
PROCESSING
4
PARTIAL
5
Sell a product
Service used to initiate a sale
POST
/api/v1/transactions/sell
Request Body
data.productId
String
Product ID
data.*
String
Additional fields required for the product can be consulted here.
Service that allows obtaining all detailed information about a product.
_channel
string
Always send "WS"
_version
String
API version
_id
String
customer ID
{
"message": "Exitoso",
"_channel": "WS",
"statusCode": 200,
"data": {
"transactionId": "5d2fa66e-4c73-4f86-b698-6bd5fd5284b1"
}
}
Inquire / Quote
Service that allows for quoting and obtaining the sale value
POST
/api/v1/transactions/query
It is recommended to always consume this service, even if the product does not require a prior inquiry.
Request Body
data.productId*
String
Product ID
data.*
String
Additional fields required for the product can be consulted here.
Service that allows obtaining all detailed information about a product.
_channel
String
Always send "WS"
_version
String
API version
Última actualización