The last step of the partner API process is to create an invoice for the created period. This provides Riverty with the required invoice details and kickstarts the invoicing process. With the provided information, Riverty will generate the invoice and distribute it to the customer. For more information see Invoice Process. Periods can only be invoiced between the start & end date of each period.
The invoice amount needs to be equal to the period price set in the Create a Subscription Period operation.
It is the responsibility of the merchant/partner to raise invoices for each of the created periods. If a
subscription period has passed its end date and an invoice has not been sent, Riverty will chargeback the financed period price.
POST {{PFBaseURL}}/v1/clients/{{ClientID}}/partner-subscriptions/{{PartnerSubscriptionID}}/invoices
{
"periodId": "{{SubscriptionPeriodID}}",
"invoiceLines": [
{
"productId": "{{SubscriptionID}}",
"description": "string",
"imageUrl": "string",
"grossAmount": 100,
"vatPercentage": 50,
"unit": {
"netPrice": 100,
"quantity": 1,
"code": "NOK"
},
"metadata": [
{
"key": "metadata key",
"value": "metadata value"
}
]
}
],
"metadata": [
{
"key": "metadata key",
"value": "metadata value"
}
]
}
{
"invoiceNumber": "PF100002",
"_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"
}
]
}