Issue invoice for payment

Create (and optionally issue) an advance invoice from a payment

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creates an advance invoice from a payment recorded on a reservation, like the Generate invoice action on the payment in MyRent.

The invoice gets the reservation guest as the customer, one advance item with the payment amount and the payment method of the payment. One payment can have only one invoice.

issueResult
N (default)Draft invoice without a number. It can still be edited and issued in MyRent.
YThe invoice is issued: it gets the next number and is locked. It is fiscalized automatically when the payment method has automatic fiscalization turned on in MyRent.

Typical flow

  1. Add payment with "return_id": "Y" and keep the returned payment_id.
  2. Call this endpoint with that payment_id.
  3. Read the invoice with the returned invoice_id (invoices/get/{invoice_id}).

Example request body

{
  "type": "inv_advance",
  "issue": "Y",
  "worker_id": "15"
}

Responses

CodeMeaning
200Invoice created.
400Unknown type, or no valid worker.
401Missing or wrong b2b_guid / user_guid headers.
403sorry: the payment does not belong to the account in the headers.
409The payment already has an invoice. The body contains its invoice_id.
Path Params
int32
required

Payment ID, returned by Add payment with "return_id": "Y".

Body Params
string
Defaults to inv_advance

inv_advance advance invoice to the guest, inv_advance_owner advance invoice in the name of the property owner.

string
Defaults to N

N draft invoice without a number. Y issues the invoice right away: it gets the next number and is locked.

int32

MyRent worker who issues the invoice. Must belong to your account. Without it, the worker set for automatic card-payment invoices on the account is used.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json