Payment resource provides information about payments.
Resource | Description |
---|---|
POST /v1/Payment | Add a new payment |
DELETE /v1/Payment/{id} | Delete a payment |
PUT /v1/Payment | Update selected data of an existing payment |
Name | Type | Description |
---|---|---|
id | int | Unique identifier of payment |
paymentDate | date (YYYY-MM-DD) | Date of payment |
reservationId | int | Id of reservation that payment belongs to |
invoiceId | int | Id of invoice |
paymentMethodId | int | Id of used payment method |
amount | decimal (##.##) | Amount of payment |
amountCurrency | decimal (##.##) | Amount of payment in hotel currency |
currencyCode | string | Currency code of "amount" |
exchangeRate | decimal (##.##) | Exchange rate |
notes | string | Notes |
Add a new payment
Request parameters
paymentDate | Date of payment |
reservationId | Id of reservation that payment belongs to |
invoiceId | Id of invoice |
paymentMethodId | Id of used payment method |
amount | Amount of payment |
amountCurrency | Amount of payment in hotel currency |
currencyCode | Currency code of "amount" |
exchangeRate | Exchange rate |
notes | Notes |
plannedPaymentDescription | Decription of the planned payment that is added to the reservation for which the payment request is made |
Response
The result is the ID of the newly created payment.
Example Request
<?xml version="1.0" encoding="UTF-8"?> <Payment> <PaymentDate>2019-07-15</PaymentDate> <ReservationId>10</ReservationId> <PaymentMethodId>3</PaymentMethodId> <Amount>16.3</Amount> <Notes>Notes for payment</Notes> <AmountCurrency>16.3</AmountCurrency> <CurrencyCode>EUR</CurrencyCode> <ExchangeRate>1.0</ExchangeRate> <InvoiceId>30</InvoiceId> <plannedPaymentDescription>2024-01-01</plannedPaymentDescription> </Payment>
{ "paymentDate": "2019-07-15", "reservationId": 10, "paymentMethodId": 3, "amount": 16.30, "notes": "Notes for payment", "amountCurrency": 16.30, "currencyCode": "EUR", "exchangeRate": 1.0, "invoiceId": 30 "plannedPaymentDescription": "2024-01-01" }
Example Response
<?xml version="1.0" ?> <Id>429</Id>
{ "id": 429 }
Delete a payment.
Request parameters
Name | Value |
---|---|
id | The ID of the requested payment. |
Response
The result is the status code of the request.
Update only selected data of existing payment.
Request parameters
id | Id of payment |
paymentDate | Date of payment |
invoiceId | Id of invoice |
paymentMethodId | Id of used payment method |
amount | Amount of payment |
amountCurrency | Amount of payment in hotel currency |
currencyCode | Currency code of "amount" |
exchangeRate | Exchange rate |
notes | Notes |
Response
The result is the status code of the request.
Example Request
<?xml version="1.0" encoding="UTF-8"?> <Payment> <Id>13</Id> <PaymentDate>2019-07-16</PaymentDate> <Amount>15</Amount> <Notes>Notes for payment 2</Notes> <ExchangeRate>2.0</ExchangeRate> <InvoiceId>31</InvoiceId> </Payment>
{ "id": 13, "paymentDate": "2019-07-16", "amount": 15, "notes": "Notes for payment 2", "exchangeRate": 2.0, "invoiceId": 31 }