{
  "info": {
    "_postman_id": "2632362e-3798-5091-acef-1193a52f6f08",
    "name": "Monato · Cash",
    "description": "Cash API 1.0.0. Generated from `products/cash/cash-openapi.yaml`.\n\nSelect the Monato Sandbox environment and fill in your credentials, then send any request.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Signs Cash requests as described in the Cash API securitySchemes:",
          "// X-Signature = HMAC-SHA256(timestamp + \".\" + requestBody, api_secret), hex encoded.",
          "const ts = Math.floor(Date.now() / 1000).toString();",
          "const raw = pm.request.body && pm.request.body.mode === 'raw' ? pm.variables.replaceIn(pm.request.body.raw || '') : '';",
          "const body = raw ? JSON.stringify(JSON.parse(raw)) : '';",
          "if (raw) { pm.request.body.raw = body; }",
          "const sig = CryptoJS.HmacSHA256(ts + '.' + body, pm.variables.get('cashApiSecret')).toString(CryptoJS.enc.Hex);",
          "pm.request.headers.upsert({ key: 'X-Client-Id', value: pm.variables.get('cashClientId') });",
          "pm.request.headers.upsert({ key: 'X-Timestamp', value: ts });",
          "pm.request.headers.upsert({ key: 'X-Signature', value: sig });"
        ]
      }
    }
  ],
  "item": [
    {
      "name": "Create Webhook",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{finBaseUrl}}/api/v1/cash/webhooks",
          "host": [
            "{{finBaseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "cash",
            "webhooks"
          ]
        },
        "description": "Allows authenticated clients to configure webhook endpoints for receiving real-time\nnotifications about operation status changes. The webhook is only activated if the activation test is successful.\n\n**Webhook Events**: After configuration, your endpoint will receive:\n- Activation test: See `WebhookActivationEvent` schema below\n- Status updates: See `OperationStatusUpdateEvent` schema below\n\n**Note**: Only one active webhook is allowed per client. Creating a new webhook will deactivate any existing ones after successful activation.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"endpoint_url\": \"https://your-webhook-endpoint.com/webhooks\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "auth": {
          "type": "noauth"
        }
      },
      "response": [
        {
          "name": "201 Webhook configured successfully. An activation test will be sent to your endpoint.",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks"
              ]
            }
          },
          "code": 201,
          "status": "Webhook configured successfully. An activation test will be sent to your endpoint.",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"event\": \"webhook.created\",\n  \"id\": 456,\n  \"endpoint_url\": \"https://your-webhook-endpoint.com/webhooks\",\n  \"secret_token\": \"644530cd9b0b431e61b8c6c656d17c77481047215a3ac66db71a7ad490397f7c\",\n  \"created_at\": \"2025-01-15T10:30:00Z\"\n}"
        },
        {
          "name": "400 Bad Request - Invalid webhook configuration",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid webhook configuration",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"event\": \"webhook.failed\",\n  \"errors\": {\n    \"endpoint_url\": [\n      \"must be a valid URL\"\n    ]\n  }\n}"
        },
        {
          "name": "401 Unauthorized - Invalid or missing authentication",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks"
              ]
            }
          },
          "code": 401,
          "status": "Unauthorized - Invalid or missing authentication",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"error\": \"Unauthorized\"\n}"
        }
      ]
    },
    {
      "name": "Get Active Webhook",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{finBaseUrl}}/api/v1/cash/webhooks/active",
          "host": [
            "{{finBaseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "cash",
            "webhooks",
            "active"
          ]
        },
        "description": "Retrieves the currently active webhook configuration for the authenticated client.\nReturns 404 if no active webhook is configured.",
        "auth": {
          "type": "noauth"
        }
      },
      "response": [
        {
          "name": "200 Active webhook configuration found",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks/active",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks",
                "active"
              ]
            }
          },
          "code": 200,
          "status": "Active webhook configuration found",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"id\": 456,\n  \"endpoint_url\": \"https://your-webhook-endpoint.com/webhooks\",\n  \"is_active\": true,\n  \"created_at\": \"2025-01-15T10:30:00Z\",\n  \"updated_at\": \"2025-01-15T10:30:00Z\"\n}"
        },
        {
          "name": "401 Unauthorized - Invalid or missing authentication",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks/active",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks",
                "active"
              ]
            }
          },
          "code": 401,
          "status": "Unauthorized - Invalid or missing authentication",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"error\": \"Unauthorized\"\n}"
        },
        {
          "name": "404 No active webhook configuration found for this client",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks/active",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks",
                "active"
              ]
            }
          },
          "code": 404,
          "status": "No active webhook configuration found for this client",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"code\": \"not_found\",\n  \"error_type\": \"DOMAIN\",\n  \"message\": \"Active webhook configuration not found\"\n}"
        }
      ]
    },
    {
      "name": "Update Webhook",
      "request": {
        "method": "PUT",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{finBaseUrl}}/api/v1/cash/webhooks/active",
          "host": [
            "{{finBaseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "cash",
            "webhooks",
            "active"
          ]
        },
        "description": "Updates an existing webhook configuration. The webhook will be deactivated and a new activation test will be sent.\nThe webhook will only become active again if the new endpoint responds successfully to the activation test.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"id\": 456,\n  \"endpoint_url\": \"https://new-webhook-endpoint.com/webhooks\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "auth": {
          "type": "noauth"
        }
      },
      "response": [
        {
          "name": "200 Webhook updated successfully and activation test initiated",
          "originalRequest": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks/active",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks",
                "active"
              ]
            }
          },
          "code": 200,
          "status": "Webhook updated successfully and activation test initiated",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"event\": \"webhook.updated\",\n  \"id\": 456,\n  \"endpoint_url\": \"https://new-webhook-endpoint.com/webhooks\",\n  \"secret_token\": \"644530cd9b0b431e61b8c6c656d17c77481047215a3ac66db71a7ad490397f7c\",\n  \"updated_at\": \"2025-01-15T11:30:00Z\"\n}"
        },
        {
          "name": "400 Bad Request - Invalid webhook configuration",
          "originalRequest": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks/active",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks",
                "active"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid webhook configuration",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"event\": \"webhook.failed\",\n  \"errors\": {\n    \"endpoint_url\": [\n      \"must be a valid URL\"\n    ]\n  }\n}"
        },
        {
          "name": "401 Unauthorized - Invalid or missing authentication",
          "originalRequest": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks/active",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks",
                "active"
              ]
            }
          },
          "code": 401,
          "status": "Unauthorized - Invalid or missing authentication",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"error\": \"Unauthorized\"\n}"
        },
        {
          "name": "404 Webhook configuration not found",
          "originalRequest": {
            "method": "PUT",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/webhooks/active",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "webhooks",
                "active"
              ]
            }
          },
          "code": 404,
          "status": "Webhook configuration not found",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"event\": \"webhook.failed\",\n  \"errors\": \"Webhook config not found\"\n}"
        }
      ]
    },
    {
      "name": "Create Cash-In · Standard cash-in with amount",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
          "host": [
            "{{finBaseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "cash",
            "cash_in"
          ]
        },
        "description": "Creates a new cash-in operation that allows users to deposit money at physical locations.\n\n- **Amount Limits**: 10 - 6000 MXN (may vary by physical location)\n- **Expiration**: 3 days from creation (on closed references)\n- **Reference**: 20-digit unique reference number\n\n**Open References**: Some clients can create \"open references\" without specifying an amount upfront.\nWhen creating an open reference, the `amount` parameter can be omitted, and the actual amount\nwill be determined at the time of payment at the physical location.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"amount\": 500,\n  \"external_user_id\": \"USER123456\",\n  \"document_type\": \"INE\",\n  \"document_id\": \"1234567890123\",\n  \"phone\": \"5512345678\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "auth": {
          "type": "noauth"
        }
      },
      "response": [
        {
          "name": "201 Cash-in created successfully",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 201,
          "status": "Cash-in created successfully",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"0\",\n  \"response_text\": \"Operacion creada\",\n  \"result\": {\n    \"operation_id\": 123,\n    \"kind\": \"cash_in\",\n    \"reference\": \"10511175512161627448\",\n    \"status\": \"close\",\n    \"transaction_id\": \"FMXdbnBuiw2SHqSyfzSkqN71q\",\n    \"amount\": 500,\n    \"created_at\": \"2025-01-15T10:30:00Z\",\n    \"expire_at\": \"2025-01-18T10:30:00Z\"\n  }\n}"
        },
        {
          "name": "400 Invalid parameters",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Invalid amount",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos, Monto invalido\",\n  \"result\": {\n    \"amount\": 5,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Operation rejected",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"1\",\n  \"response_text\": \"Operacion rechazada\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "401 Unauthorized - Invalid or missing authentication",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 401,
          "status": "Unauthorized - Invalid or missing authentication",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"error\": \"Unauthorized\"\n}"
        }
      ]
    },
    {
      "name": "Create Cash-In · Open reference, amount determined at payment",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
          "host": [
            "{{finBaseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "cash",
            "cash_in"
          ]
        },
        "description": "Creates a new cash-in operation that allows users to deposit money at physical locations.\n\n- **Amount Limits**: 10 - 6000 MXN (may vary by physical location)\n- **Expiration**: 3 days from creation (on closed references)\n- **Reference**: 20-digit unique reference number\n\n**Open References**: Some clients can create \"open references\" without specifying an amount upfront.\nWhen creating an open reference, the `amount` parameter can be omitted, and the actual amount\nwill be determined at the time of payment at the physical location.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"external_user_id\": \"USER123456\",\n  \"document_type\": \"INE\",\n  \"document_id\": \"1234567890123\",\n  \"phone\": \"5512345678\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "auth": {
          "type": "noauth"
        }
      },
      "response": [
        {
          "name": "201 Cash-in created successfully",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 201,
          "status": "Cash-in created successfully",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"0\",\n  \"response_text\": \"Operacion creada\",\n  \"result\": {\n    \"operation_id\": 123,\n    \"kind\": \"cash_in\",\n    \"reference\": \"10511175512161627448\",\n    \"status\": \"close\",\n    \"transaction_id\": \"FMXdbnBuiw2SHqSyfzSkqN71q\",\n    \"amount\": 500,\n    \"created_at\": \"2025-01-15T10:30:00Z\",\n    \"expire_at\": \"2025-01-18T10:30:00Z\"\n  }\n}"
        },
        {
          "name": "400 Invalid parameters",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Invalid amount",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos, Monto invalido\",\n  \"result\": {\n    \"amount\": 5,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Operation rejected",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"1\",\n  \"response_text\": \"Operacion rechazada\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "401 Unauthorized - Invalid or missing authentication",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_in",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_in"
              ]
            }
          },
          "code": 401,
          "status": "Unauthorized - Invalid or missing authentication",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"error\": \"Unauthorized\"\n}"
        }
      ]
    },
    {
      "name": "Create Cash-Out",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{finBaseUrl}}/api/v1/cash/cash_out",
          "host": [
            "{{finBaseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "cash",
            "cash_out"
          ]
        },
        "description": "Creates a new cash-out operation that allows users to withdraw money at physical locations.\n\n- **Amount Limits**: 50 - 3000 MXN (may vary by physical location)\n- **Expiration**: 60 minutes from creation (default)\n- **Reference**: 20-digit unique reference number\n- **Note**: Maximum and minimum amount may vary by physical location.",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"amount\": 250,\n  \"external_user_id\": \"USER789012\",\n  \"document_type\": \"CURP\",\n  \"document_id\": \"ABCD123456HMNMNL01\",\n  \"phone\": \"5587654321\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "auth": {
          "type": "noauth"
        }
      },
      "response": [
        {
          "name": "201 Cash-out created successfully",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_out",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_out"
              ]
            }
          },
          "code": 201,
          "status": "Cash-out created successfully",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"0\",\n  \"response_text\": \"Operacion creada\",\n  \"result\": {\n    \"operation_id\": 124,\n    \"kind\": \"cash_out\",\n    \"reference\": \"20511175512161627449\",\n    \"status\": \"close\",\n    \"transaction_id\": \"FMXdbnBuiw2SHqSyfzSkqN72q\",\n    \"amount\": 250,\n    \"created_at\": \"2025-01-15T10:30:00Z\",\n    \"expire_at\": \"2025-01-15T11:30:00Z\"\n  }\n}"
        },
        {
          "name": "400 Invalid parameters",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_out",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_out"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Invalid amount",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_out",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_out"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos, Monto invalido\",\n  \"result\": {\n    \"amount\": 5,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Operation rejected",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_out",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_out"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"1\",\n  \"response_text\": \"Operacion rechazada\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "401 Unauthorized - Invalid or missing authentication",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/cash_out",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "cash_out"
              ]
            }
          },
          "code": 401,
          "status": "Unauthorized - Invalid or missing authentication",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"error\": \"Unauthorized\"\n}"
        }
      ]
    },
    {
      "name": "Create Bulk Cash-In Operations",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{finBaseUrl}}/api/v1/cash/bulk_operations",
          "host": [
            "{{finBaseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "cash",
            "bulk_operations"
          ]
        },
        "description": "Creates multiple cash-in operations in bulk. This endpoint accepts a quantity and expiration date,\nand will generate the specified number of cash-in references asynchronously.\n\n- **Limits**: 1 - 1000 operations per request\n- **Processing**: Operations are created asynchronously via background job\n- **Use Case**: Useful for pre-generating multiple payment references for distribution",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"quantity\": 100,\n  \"expiration_date\": \"2025-01-20\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "auth": {
          "type": "noauth"
        }
      },
      "response": [
        {
          "name": "201 Bulk operation request accepted and processing started",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/bulk_operations",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "bulk_operations"
              ]
            }
          },
          "code": 201,
          "status": "Bulk operation request accepted and processing started",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"0\",\n  \"response_text\": \"Operacion bulk creada\",\n  \"result\": {\n    \"bulk_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\"\n  }\n}"
        },
        {
          "name": "400 Invalid parameters",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/bulk_operations",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "bulk_operations"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Invalid amount",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/bulk_operations",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "bulk_operations"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos, Monto invalido\",\n  \"result\": {\n    \"amount\": 5,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Operation rejected",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/bulk_operations",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "bulk_operations"
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"1\",\n  \"response_text\": \"Operacion rechazada\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "401 Unauthorized - Invalid or missing authentication",
          "originalRequest": {
            "method": "POST",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/bulk_operations",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "bulk_operations"
              ]
            }
          },
          "code": 401,
          "status": "Unauthorized - Invalid or missing authentication",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"error\": \"Unauthorized\"\n}"
        }
      ]
    },
    {
      "name": "Consult Operation",
      "request": {
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{finBaseUrl}}/api/v1/cash/consult?reference=10511175512161627448",
          "host": [
            "{{finBaseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "cash",
            "consult"
          ],
          "query": [
            {
              "key": "reference",
              "value": "10511175512161627448",
              "description": "20-digit operation reference number",
              "disabled": false
            }
          ]
        },
        "description": "Retrieves the current status and details of a cash operation using its reference number.\nUse this endpoint to check the status of cash-in or cash-out operations.",
        "auth": {
          "type": "noauth"
        }
      },
      "response": [
        {
          "name": "200 Operation found successfully",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/consult?reference=10511175512161627448",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "consult"
              ],
              "query": [
                {
                  "key": "reference",
                  "value": "10511175512161627448",
                  "description": "20-digit operation reference number",
                  "disabled": false
                }
              ]
            }
          },
          "code": 200,
          "status": "Operation found successfully",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"0\",\n  \"response_text\": \"Operacion encontrada\",\n  \"result\": {\n    \"operation_id\": 123,\n    \"kind\": \"cash_in\",\n    \"reference\": \"10511175512161627448\",\n    \"status\": \"paid\",\n    \"amount\": 500,\n    \"created_at\": \"2025-01-15T10:30:00Z\",\n    \"expire_at\": \"2025-01-18T10:30:00Z\"\n  }\n}"
        },
        {
          "name": "400 Invalid parameters",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/consult?reference=10511175512161627448",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "consult"
              ],
              "query": [
                {
                  "key": "reference",
                  "value": "10511175512161627448",
                  "description": "20-digit operation reference number",
                  "disabled": false
                }
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Invalid amount",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/consult?reference=10511175512161627448",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "consult"
              ],
              "query": [
                {
                  "key": "reference",
                  "value": "10511175512161627448",
                  "description": "20-digit operation reference number",
                  "disabled": false
                }
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"60\",\n  \"response_text\": \"Parámetros Incorrectos, Monto invalido\",\n  \"result\": {\n    \"amount\": 5,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "400 Operation rejected",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/consult?reference=10511175512161627448",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "consult"
              ],
              "query": [
                {
                  "key": "reference",
                  "value": "10511175512161627448",
                  "description": "20-digit operation reference number",
                  "disabled": false
                }
              ]
            }
          },
          "code": 400,
          "status": "Bad Request - Invalid operation parameters",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"1\",\n  \"response_text\": \"Operacion rechazada\",\n  \"result\": {\n    \"amount\": 500,\n    \"external_user_id\": \"USER123456\"\n  }\n}"
        },
        {
          "name": "401 Unauthorized - Invalid or missing authentication",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/consult?reference=10511175512161627448",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "consult"
              ],
              "query": [
                {
                  "key": "reference",
                  "value": "10511175512161627448",
                  "description": "20-digit operation reference number",
                  "disabled": false
                }
              ]
            }
          },
          "code": 401,
          "status": "Unauthorized - Invalid or missing authentication",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"error\": \"Unauthorized\"\n}"
        },
        {
          "name": "404 Operation not found",
          "originalRequest": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{finBaseUrl}}/api/v1/cash/consult?reference=10511175512161627448",
              "host": [
                "{{finBaseUrl}}"
              ],
              "path": [
                "api",
                "v1",
                "cash",
                "consult"
              ],
              "query": [
                {
                  "key": "reference",
                  "value": "10511175512161627448",
                  "description": "20-digit operation reference number",
                  "disabled": false
                }
              ]
            }
          },
          "code": 404,
          "status": "Operation not found",
          "header": [
            {
              "key": "Content-Type",
              "value": "application/json"
            }
          ],
          "_postman_previewlanguage": "json",
          "body": "{\n  \"response_code\": \"64\",\n  \"response_text\": \"Operacion no encontrada\",\n  \"result\": {\n    \"reference\": \"10511175512161627448\"\n  }\n}"
        }
      ]
    }
  ]
}
