Este método simula a acción de crear un pago de un nuevo servicio, sin reserva de fecha y hora para un cliente en app.agendapro.

En caso de que se requiera, es posible crear pagos de distintos items en una misma llamada agregando más receipts.items con la estructura correspondiente de cada uno (new_service, giftcard, otros).

Se debe tener en consideración que existen distintos tipos de receipts (boleta, factura, boleta de servicios, comprobante de giftcard y otros) y los receipt.items pueden agruparse en un solo receipt o dividirse en distintos tipos de receipts según se requiera.

Body examples

{
  "transactions":[
    {
      "payment_method":"cash",
      "payment_method_type": "",
      "transaction_number": 4839,
      "amount":25000
    }
  ],

  "receipt_number":"45454544",
  "notes": "Prueba API giftcard y servicio",
  "client_id":165424,
  "payment_date":"2022-01-21",
  "location_id":1398,
  "receipts":[
    {
      "items":
      [
        {"item_type": "new_service",
          "list_price":25000,
          "price":25000,
          "location_id":1398,
          "seller_id":3765,
          "seller_type":0,
          "client_id":165424,
          "service_id": 3978
        }
      ],
      "receipt_type": "invoice"
    }
  ]
}
{
  "transactions":[
    {
      "payment_method":"cash",
      "payment_method_type": "",
      "transaction_number": 4839,
      "amount":50000
    }
  ],

  "receipt_number":"45454544",
  "notes": "Prueba servicios",
  "client_id":165424,
  "payment_date":"2022-01-21",
  "location_id":1398,
  "receipts":[
    {
      "items":
      [
        {"item_type": "new_service",
          "list_price":25000,
          "price":25000,
          "location_id":1398,
          "seller_id":3765,
          "seller_type":0,
          "client_id":165424,
          "service_id": 3978
        }
      ],
      "receipt_type": "invoice"
    },
    {
      "items":
      [
        {"item_type": "new_service",
          "list_price":25000,
          "price":25000,
          "location_id":1398,
          "seller_id":3765,
          "seller_type":0,
          "client_id":165424,
          "service_id": 3978
        }
      ],
      "receipt_type": "invoice"
    }
  ]
}

Responses examples

{
    "id": 3852,
    "payment_date": "2022-01-21T00:00:00.000Z",
    "location_id": 1398,
    "location_name": "Local 1",
    "amount": 25000.0,
    "paid_amount": 25000.0,
    "change_amount": 0.0,
    "employee_code_id": null,
    "employee_code_name": "",
    "client": {
        "id": 165424,
        "first_name": "first name",
        "last_name": "last name",
        "email": "[email protected]",
        "identification_number": "0000...",
        "phone": "phone number",
        "second_phone": "",
        "age": 28,
        "birth_day": 4,
        "birth_month": 10,
        "birth_year": 1993,
        "record_number": "",
        "address": "apoquindo",
        "district": "las condes",
        "city": "santiago"
    },
    "bookings": [],
    "products": [],
    "mock_bookings": [
        {
            "price": 25000.0,
            "discount": 0.0,
            "service": "Service name",
            "provider": null,
            "receipt_id": 4246
        }
    ],
    "memberships": [],
    "giftcards": [],
    "down_payments": [
        {
            "payment_transactions": [
                {
                    "number": "4839",
                    "amount": 25000.0,
                    "installments": 0,
                    "payment_method": "Efectivo",
                    "payment_method_type": "",
                    "bank": ""
                }
            ]
        }
    ],
    "receipts": [
        {
            "id": 4246,
            "amount": 25000.0,
            "date": "2022-01-21",
            "number": null,
            "receipt_type": "Factura"
        }
    ]
}
{
    "id": 3853,
    "payment_date": "2022-01-21T00:00:00.000Z",
    "location_id": 1398,
    "location_name": "Local 1",
    "amount": 50000.0,
    "paid_amount": 50000.0,
    "change_amount": 0.0,
    "employee_code_id": null,
    "employee_code_name": "",
    "client": {
        "id": 165424,
        "first_name": "first name",
        "last_name": "last name",
        "email": "[email protected]",
        "identification_number": "18.616.505-5",
        "phone": "+56 9 3420 3549",
        "second_phone": "",
        "age": 28,
        "birth_day": 4,
        "birth_month": 10,
        "birth_year": 1993,
        "record_number": "",
        "address": "apoquindo",
        "district": "las condes",
        "city": "santiago"
    },
    "bookings": [],
    "products": [],
    "mock_bookings": [
        {
            "price": 25000.0,
            "discount": 0.0,
            "service": "Service name",
            "provider": null,
            "receipt_id": 4247
        },
        {
            "price": 25000.0,
            "discount": 0.0,
            "service": "Service name",
            "provider": null,
            "receipt_id": 4248
        }
    ],
    "memberships": [],
    "giftcards": [],
    "down_payments": [
        {
            "payment_transactions": [
                {
                    "number": "4839",
                    "amount": 50000.0,
                    "installments": 0,
                    "payment_method": "Efectivo",
                    "payment_method_type": "",
                    "bank": ""
                }
            ]
        }
    ],
    "receipts": [
        {
            "id": 4247,
            "amount": 25000.0,
            "date": "2022-01-21",
            "number": null,
            "receipt_type": "Factura"
        },
        {
            "id": 4248,
            "amount": 25000.0,
            "date": "2022-01-21",
            "number": null,
            "receipt_type": "Factura"
        }
    ]
}