Invoice
MobilePay Invoice allow you to send Invoices directly to your customers using our APIs. The MobilePay Invoice API use OAuth 2.0 protocol for authentication and authorization and contains endpoints needed to implement MobilePay Invoice in your system. This API is for the technical integrator acting on behalf of merchant, or merchant creating their own integrations.
Documentation
Change of Invoice in 2024
Please notice that as part of the merger between MobilePay and Norwegian Vipps, we will consolidate products on one joint platform. In the beginning of 2024 we will therefore replace the current Invoice API with a new and scalable version. We will update this page as soon as documentation for the new API is available. See more here
Create multiple invoices.
ConsumerAlias.AliasType should be set to "Phone".
CountryCode allowed values:
- DK
- FI
CurrencyCode allowed values:
- DKK
- EUR
More information can be found here.
Authorizations:
path Parameters
merchantid required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
Request Body schema:
required | object (RestAPI.Models.Invoice.ConsumerAliasModel) |
dueDate required | string <date-time> |
invoiceIssuer required | string <uuid> |
totalAmount required | number <double> |
consumerName | string or null |
totalVATAmount | number or null <double> |
consumerAddressLines | Array of strings or null |
deliveryAddressLines | Array of strings or null |
invoiceNumber | string or null |
issueDate | string or null <date-time> |
orderDate | string or null <date-time> |
deliveryDate | string or null <date-time> |
comment | string or null |
merchantContactName | string or null |
merchantOrderNumber | string or null |
buyerOrderNumber | string or null |
paymentReference | string or null |
Array of objects or null (RestAPI.Models.Invoice.InvoiceArticleModel) | |
invoiceUrl | string or null |
Responses
Request samples
- Payload
[- {
- "invoiceIssuer": "7beef991-193d-4246-bba5-0f59951b7ce4",
- "consumerAlias": {
- "alias": "string",
- "aliasType": "string"
}, - "consumerName": "string",
- "totalAmount": 0.1,
- "totalVATAmount": 0.1,
- "consumerAddressLines": [
- "string"
], - "deliveryAddressLines": [
- "string"
], - "invoiceNumber": "string",
- "issueDate": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "orderDate": "2019-08-24T14:15:22Z",
- "deliveryDate": "2019-08-24T14:15:22Z",
- "comment": "string",
- "merchantContactName": "string",
- "merchantOrderNumber": "string",
- "buyerOrderNumber": "string",
- "paymentReference": "string",
- "invoiceArticles": [
- {
- "articleNumber": "string",
- "articleDescription": "string",
- "vatRate": 0.1,
- "totalVATAmount": 0.1,
- "totalPriceIncludingVat": 0.1,
- "unit": "string",
- "quantity": 0.1,
- "pricePerUnit": 0.1,
- "priceReduction": 0.1,
- "priceDiscount": 0.1,
- "bonus": 0.1
}
], - "invoiceUrl": "string"
}
]
Response samples
- 202
{ "Accepted": [ { "InvoiceNumber": "58652", "InvoiceId": "72c28be5-dfbe-48b2-bce5-ac7769c157d9" } ], "Rejected": [ { "InvoiceNumber": "58694", "Errors": [ { "ErrorText": "Invoice already exists", "ErrorCode": 10104 } ] } ] }
Create an invoice.
ConsumerAlias.AliasType should be set to "Phone".
CountryCode allowed values:
- DK
- FI
CurrencyCode allowed values:
- DKK
- EUR
More information can be found here.
Authorizations:
path Parameters
merchantid required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
Request Body schema:
required | object (RestAPI.Models.Invoice.ConsumerAliasModel) |
dueDate required | string <date-time> |
invoiceIssuer required | string <uuid> |
totalAmount required | number <double> |
consumerName | string or null |
totalVATAmount | number or null <double> |
consumerAddressLines | Array of strings or null |
deliveryAddressLines | Array of strings or null |
invoiceNumber | string or null |
issueDate | string or null <date-time> |
orderDate | string or null <date-time> |
deliveryDate | string or null <date-time> |
comment | string or null |
merchantContactName | string or null |
merchantOrderNumber | string or null |
buyerOrderNumber | string or null |
paymentReference | string or null |
Array of objects or null (RestAPI.Models.Invoice.InvoiceArticleModel) | |
invoiceUrl | string or null |
Responses
Request samples
- Payload
{- "InvoiceIssuer": "efd08c19-24cf-4833-a4a4-bfa7bd58fbb2",
- "ConsumerAlias": {
- "Alias": "+4544667788",
- "AliasType": "Phone"
}, - "ConsumerName": "Eric Cartman",
- "TotalAmount": 360,
- "TotalVATAmount": 72,
- "ConsumerAddressLines": [
- "Paradisæblevej 13",
- "CC-1234 Andeby",
- "Wonderland"
], - "DeliveryAddressLines": [
- "Østerbrogade 120",
- "CC-1234 Andeby",
- "Wonderland"
], - "InvoiceNumber": "58652",
- "IssueDate": "2022-09-14T14:51:11.783969+03:00",
- "DueDate": "2022-09-22T14:51:11.783972+03:00",
- "OrderDate": "2022-09-14T14:51:11.783973+03:00",
- "DeliveryDate": "2022-09-17T14:51:11.783973+03:00",
- "Comment": "Lorem ipsum dolor sit amet, eros faucibus aliqua erat aliquam odio vitae.",
- "MerchantContactName": "Some Company",
- "MerchantOrderNumber": "859",
- "BuyerOrderNumber": "456",
- "PaymentReference": "186",
- "InvoiceArticles": [
- {
- "ArticleNumber": "456",
- "ArticleDescription": "Lorem ipsum dolor sit amet",
- "VATRate": 25,
- "TotalVATAmount": 72,
- "TotalPriceIncludingVat": 360,
- "Unit": "Lorem ipsum",
- "Quantity": 6,
- "PricePerUnit": 60,
- "PriceReduction": 1.2,
- "PriceDiscount": 2,
- "Bonus": 5
}
],
}
Response samples
- 200
- 409
{ "InvoiceId": "89a140f4-8433-4196-b25f-690871be5b3d" }
Create multiple invoice links.
ConsumerAlias.AliasType should be set to "Phone" (not required for InvoiceLink).
CountryCode allowed values:
- DK
- FI
CurrencyCode allowed values:
- DKK
- EUR
More information can be found here.
Authorizations:
path Parameters
merchantid required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
Request Body schema:
dueDate required | string <date-time> |
invoiceIssuer required | string <uuid> |
totalAmount required | number <double> |
object (RestAPI.Models.Invoice.ConsumerAliasModel) | |
consumerName | string or null |
totalVATAmount | number or null <double> |
consumerAddressLines | Array of strings or null |
deliveryAddressLines | Array of strings or null |
invoiceNumber | string or null |
issueDate | string or null <date-time> |
orderDate | string or null <date-time> |
deliveryDate | string or null <date-time> |
comment | string or null |
merchantContactName | string or null |
merchantOrderNumber | string or null |
buyerOrderNumber | string or null |
paymentReference | string or null |
Array of objects or null (RestAPI.Models.Invoice.InvoiceArticleModel) | |
invoiceUrl | string or null |
redirectUrl | string or null |
Responses
Request samples
- Payload
[- {
- "invoiceIssuer": "7beef991-193d-4246-bba5-0f59951b7ce4",
- "consumerAlias": {
- "alias": "string",
- "aliasType": "string"
}, - "consumerName": "string",
- "totalAmount": 0.1,
- "totalVATAmount": 0.1,
- "consumerAddressLines": [
- "string"
], - "deliveryAddressLines": [
- "string"
], - "invoiceNumber": "string",
- "issueDate": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "orderDate": "2019-08-24T14:15:22Z",
- "deliveryDate": "2019-08-24T14:15:22Z",
- "comment": "string",
- "merchantContactName": "string",
- "merchantOrderNumber": "string",
- "buyerOrderNumber": "string",
- "paymentReference": "string",
- "invoiceArticles": [
- {
- "articleNumber": "string",
- "articleDescription": "string",
- "vatRate": 0.1,
- "totalVATAmount": 0.1,
- "totalPriceIncludingVat": 0.1,
- "unit": "string",
- "quantity": 0.1,
- "pricePerUnit": 0.1,
- "priceReduction": 0.1,
- "priceDiscount": 0.1,
- "bonus": 0.1
}
], - "invoiceUrl": "string",
- "redirectUrl": "string"
}
]
Response samples
- 202
{ "Accepted": [ { "InvoiceNumber": "58652", "InvoiceId": "72c28be5-dfbe-48b2-bce5-ac7769c157d9" } ], "Rejected": [ { "InvoiceNumber": "58694", "Errors": [ { "ErrorText": "Invoice already exists", "ErrorCode": 10104 } ] } ] }
Create an invoice link.
ConsumerAlias.AliasType should be set to "Phone".
CountryCode allowed values:
- DK
- FI
CurrencyCode allowed values:
- DKK
- EUR
More information can be found here.
Authorizations:
path Parameters
merchantid required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
Request Body schema:
dueDate required | string <date-time> |
invoiceIssuer required | string <uuid> |
totalAmount required | number <double> |
object (RestAPI.Models.Invoice.ConsumerAliasModel) | |
consumerName | string or null |
totalVATAmount | number or null <double> |
consumerAddressLines | Array of strings or null |
deliveryAddressLines | Array of strings or null |
invoiceNumber | string or null |
issueDate | string or null <date-time> |
orderDate | string or null <date-time> |
deliveryDate | string or null <date-time> |
comment | string or null |
merchantContactName | string or null |
merchantOrderNumber | string or null |
buyerOrderNumber | string or null |
paymentReference | string or null |
Array of objects or null (RestAPI.Models.Invoice.InvoiceArticleModel) | |
invoiceUrl | string or null |
redirectUrl | string or null |
Responses
Request samples
- Payload
{- "InvoiceIssuer": "efd08c19-24cf-4833-a4a4-bfa7bd58fbb2",
- "ConsumerAlias": {
- "Alias": "+4544667788",
- "AliasType": "Phone"
}, - "ConsumerName": "Eric Cartman",
- "TotalAmount": 360,
- "TotalVATAmount": 72,
- "ConsumerAddressLines": [
- "Paradisæblevej 13",
- "CC-1234 Andeby",
- "Wonderland"
], - "DeliveryAddressLines": [
- "Østerbrogade 120",
- "CC-1234 Andeby",
- "Wonderland"
], - "InvoiceNumber": "58652",
- "IssueDate": "2022-09-14T14:51:11.790137+03:00",
- "DueDate": "2022-09-22T14:51:11.79014+03:00",
- "OrderDate": "2022-09-14T14:51:11.790141+03:00",
- "DeliveryDate": "2022-09-17T14:51:11.790141+03:00",
- "Comment": "Lorem ipsum dolor sit amet, eros faucibus aliqua erat aliquam odio vitae.",
- "MerchantContactName": "Some Company",
- "MerchantOrderNumber": "859",
- "BuyerOrderNumber": "456",
- "PaymentReference": "186",
- "InvoiceArticles": [
- {
- "ArticleNumber": "456",
- "ArticleDescription": "Lorem ipsum dolor sit amet",
- "VATRate": 25,
- "TotalVATAmount": 72,
- "TotalPriceIncludingVat": 360,
- "Unit": "Lorem ipsum",
- "Quantity": 6,
- "PricePerUnit": 60,
- "PriceReduction": 1.2,
- "PriceDiscount": 2,
- "Bonus": 5
}
],
}
Response samples
- 200
- 400
- 409
{ "InvoiceId": "89a140f4-8433-4196-b25f-690871be5b3d", "Links": [ { "Rel": "user-redirect", "Href": "https://sandprod-open.mobilepay.dk/usersettings-landing-website/?token=eb406472-fdfa-4612-9df2-ec4dd83b7812&countryCode=DK&product=Invoice" } ] }
Get the current status of an invoice.
Possible statuses:
- Created
- Invalid
- Accepted
- Paid
- Rejected
- Expired
Explanations for these statuses can be found here.
Authorizations:
path Parameters
merchantid required | string <uuid> |
invoiceid required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
Responses
Response samples
- 200
{ "InvoiceId": "32b73932-836a-4491-bd3c-7969be3dc921", "Status": "Accepted" }
Get all your invoice issuers.
More information can be found here.
Authorizations:
path Parameters
merchantid required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
Responses
Response samples
- 200
{ "InvoiceIssuers": [ { "Id": "12b9e080-1bb7-43fb-bc98-b49d12e6d806", "Name": "YourInvoiceIssuer", "AccountType": "Account", "Status": null, "Address": null, "City": null, "ZipCode": null } ] }
Change REST callback authentication scheme to basic.
All the REST callbacks will be sent to CallbackUrl
and contain basic credentials in Authorization
HTTP header:
Authorization: Basic [Base64 encoded username:password]
More information about callbacks can be found here.
Authorizations:
path Parameters
merchantid required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
Request Body schema:
callbackUrl required | string <uri> |
password required | string |
username required | string |
Responses
Request samples
- Payload
{- "Username": "invoiceclient",
- "Password": "DGjPdm5n",
}
Change REST callback authentication scheme to API Key.
All the REST callbacks will be sent to CallbackUrl
and provided API key will be added to Authorization
HTTP
header.
More information about callbacks can be found here.
Authorizations:
path Parameters
merchantid required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
Request Body schema:
apiKey required | string |
callbackUrl required | string <uri> |
Responses
Request samples
- Payload
{- "ApiKey": "M8z4KWNc2v4rKMKT",
}
Response samples
- 400
{ "correlation_id": "19589bc4-a3de-4bb3-8e1b-f06f32f8f99e", "error": "DomainError", "error_code": "10104", "error_description": "Invoice already exists", "error_context": "Invoices" }
Attach a request of consent to send direct invoices to a particular invoice.
Authorizations:
header Parameters
CorrelationId | string CorrelationId used for logging |
Request Body schema:
invoiceId required | string <uuid> |
Responses
Request samples
- Payload
{- "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec"
}
Response samples
- 200
Get the list of consents that are granted to particular invoice issuer.
Authorizations:
query Parameters
invoiceIssuerId | string <uuid> |
state | string or null |
pagingState | string or null |
header Parameters
CorrelationId | string CorrelationId used for logging |
Responses
Response samples
- 200
This API is used to simulate app functionality for testing your implementation of MobilePay Invoice.
Accept invoice.
path Parameters
id required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
AuthenticatedUser | string <uuid> AuthenticatedUser used for user simulation |
Request Body schema:
paymentDate | string <date-time> |
ConsumerCard | string <uuid> |
Responses
Request samples
- Payload
{- "paymentDate": "2019-08-24T14:15:22Z",
- "ConsumerCard": "19b5f30f-0b73-41b9-898f-697e3bb5c354"
}
Response samples
- 200
- 400
Update direct invoice consent.
path Parameters
consentid required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
AuthenticatedUser | string <uuid> AuthenticatedUser used for user simulation |
Request Body schema:
isConsentGranted required | boolean A flag representing if user granted direct invoice consent |
Responses
Request samples
- Payload
{- "isConsentGranted": true
}