riverty logo

Docs

Create an Invoice

Path

POST /v1/clients/{clientId}/partner-subscriptions/{subscriptionId}/invoices
Successful RequestUnsuccessful Request, Incorrect/Missing Information

Request Example

    
        {
 "periodId": "period-id-1",
 "invoiceLines": [
  {
   "productId": "product-id-1",
   "description": "Home services, Internet 100M / 25M, monthly fee",
   "imageUrl": "https://telecommunicationcompany.com/images/internet-100-25.png",
   "grossAmount": 39.99,
   "vatPercentage": 20,
   "unit": {
    "netPrice": 33.325,
    "quantity": 1,
    "code": "PCS"
   },
   "metaData": [
    {
     "key": "order-id",
     "value": "a9ee9996-e941-4aa8-90b9-4b047c4afe87"
    }
   ]
  }
 ],
 "metadata": [
  {
   "key": "invoice-custom-data",
   "value": "3937501"
  }
 ]
}
    

Response Example

    
        {
 "invoiceNumber": "PF100001",
 "_links": [
  {
   "method": "GET",
   "href": "https://api.riverty.io/partner-financing/v1/clients/1234/partner-subscriptions/subscription-id-1/invoices/PF100001",
   "rel": "self",
   "target": "API"
  },
  {
   "method": "GET",
   "href": "https://consumer.riverty.io/p/apgD/24pOlNDL7zKrKzjzF5ba",
   "rel": "manage-payments",
   "target": "BROWSER"
  }
 ]
}