Skip to main content
The Payments API allows you to process payments, track payment history, and generate payment summaries. RestAI supports multiple payment methods including cash, card, Yape, Plin, and bank transfers.

Key Features

  • Multiple Payment Methods: Accept cash, card, Yape, Plin, bank transfers, and other payment types
  • Partial Payments: Support split payments where customers can pay an order in multiple transactions
  • Daily Summaries: Get aggregated payment data by method and time period
  • Payment Tracking: Link payments to orders with detailed reference information
  • Tip Management: Track gratuities separately from order totals

Authentication

All payment endpoints require authentication via JWT token and tenant middleware. Users must have the appropriate permissions:
  • payments:read - View payment records and summaries
  • payments:create - Process new payments

Base URL

https://api.restai.app/v1/payments

Common Response Format

All endpoints return responses in this format:
{
  "success": true,
  "data": {
    // Response data
  }
}
Error responses include an error object:
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Orden no encontrada"
  }
}

Payment Methods

Supported payment method values:
  • cash - Cash payment
  • card - Credit/debit card
  • yape - Yape mobile payment
  • plin - Plin mobile payment
  • transfer - Bank transfer
  • other - Other payment methods

Payment Status

  • completed - Payment successfully processed

Next Steps

  • Process Payment - Learn how to create payments and handle partial payments

Build docs developers (and LLMs) love