YOM Docs

Credit

Once your Commerces are uploaded, you can associate Credit with them.

Credit is a YOM feature that lets you manage the credit line of your Commerces and make sure transactions run smoothly and securely. The Credit entity holds the information needed to manage and monitor the credit available to each Commerce.

Endpoint

GET /api/credit

FILE <fecha>_<hora>_credit.csv

Fields

Field Type Requirement Description Examples
commerceId 📝 Text 🟢 Required Unique identifier of the Commerce the Credit is assigned to.
*Must match the commerceId field from the Commerces upload. "12345"
nane 📝 Text ⚪ Optional Name of the Commerce. "Panadería Don Carlos"
isDisabled 🔘 Bool 🟢 Required Does the Commerce have Credit usage disabled? true
false
balance 🔢 Number 🟢 Required Remaining Credit line.
Example → if the user has a $1000 line and placed a $300 order, then
balance = 700. 700
maxAmount 🔢 Number 🟢 Required Maximum credit line.
Example → if the user has a $1000 line, then
maxAmount = 1000. 1000
state 📝 Text 🟢 Required Credit status.
'ok' → Ok
'warning' → Warning
'blocked' → Blocked "ok"
email 📝 Text ⚪ Optional Email address of the Commerce. "[email protected]"
paymentType 📝 Text ⚪ Optional Payment method available to the commerce "Efectivo"
blockedMessage 📝 Text ⚪ Optional Message with the reason for the block "Estás bloqueado por falta de crédito"

Response

The Credit endpoint response returns a JSON object with detailed information about the credit assigned to each Commerce, including balance, credit status, and other important details.

Response Example

{
  "commerceId": "12345",
  "name": "Panadería Don Carlos",
  "isDisabled": true,
  "balance": 700,
  "maxAmount": 1000,
  "state": "ok",
  "email": "[email protected]",
  "paymentType": "Efectivo",
  "bloquedMessage": "Estás bloqueado por falta de crédito"
}

With this structure, you can manage and look up the Credit information for Commerces in YOM.