Skip to main content

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

Merchants

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:
Bearer
path Parameters
merchantid
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

Request Body schema:
Array
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

Content type
[
  • {
    }
]

Response samples

Content type
{
  "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:
Bearer
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

Content type
{
  • "InvoiceIssuer": "efd08c19-24cf-4833-a4a4-bfa7bd58fbb2",
  • "ConsumerAlias": {
    },
  • "ConsumerName": "Eric Cartman",
  • "TotalAmount": 360,
  • "TotalVATAmount": 72,
  • "ConsumerAddressLines": [
    ],
  • "DeliveryAddressLines": [
    ],
  • "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": [
    ],
}

Response samples

Content type
{
  "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:
Bearer
path Parameters
merchantid
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

Request Body schema:
Array
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

Content type
[
  • {
    }
]

Response samples

Content type
{
  "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:
Bearer
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

Content type
{
  • "InvoiceIssuer": "efd08c19-24cf-4833-a4a4-bfa7bd58fbb2",
  • "ConsumerAlias": {
    },
  • "ConsumerName": "Eric Cartman",
  • "TotalAmount": 360,
  • "TotalVATAmount": 72,
  • "ConsumerAddressLines": [
    ],
  • "DeliveryAddressLines": [
    ],
  • "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": [
    ],
}

Response samples

Content type
{
  "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"
    }
  ]
}

Cancel invoice.

Authorizations:
Bearer
path Parameters
merchantid
required
string <uuid>
invoiceid
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

Responses

Get all the details of an invoice.

Authorizations:
Bearer
path Parameters
merchantid
required
string <uuid>
invoiceid
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

Responses

Response samples

Content type
No sample

Get the current status of an invoice.

Possible statuses:

  • Created
  • Invalid
  • Accepted
  • Paid
  • Rejected
  • Expired

Explanations for these statuses can be found here.

Authorizations:
Bearer
path Parameters
merchantid
required
string <uuid>
invoiceid
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

Responses

Response samples

Content type
{
  "InvoiceId": "32b73932-836a-4491-bd3c-7969be3dc921",
  "Status": "Accepted"
}

Get all your invoice issuers.

More information can be found here.

Authorizations:
Bearer
path Parameters
merchantid
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

Responses

Response samples

Content type
{
  "InvoiceIssuers": [
    {
      "Id": "12b9e080-1bb7-43fb-bc98-b49d12e6d806",
      "Name": "YourInvoiceIssuer",
      "AccountType": "Account",
      "Status": null,
      "Address": null,
      "City": null,
      "ZipCode": null
    }
  ]
}

Get your merchant id.

Authorizations:
Bearer
header Parameters
CorrelationId
string

CorrelationId used for logging

Responses

Response samples

Content type
{
  "MerchantId": "12b9e080-1bb7-43fb-bc98-b49d12e6d806"
}

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:
Bearer
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

Content type
{}

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:
Bearer
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

Content type
{}

Response samples

Content type
{
  "correlation_id": "19589bc4-a3de-4bb3-8e1b-f06f32f8f99e",
  "error": "DomainError",
  "error_code": "10104",
  "error_description": "Invoice already exists",
  "error_context": "Invoices"
}

Direct Invoice Consents

Attach a request of consent to send direct invoices to a particular invoice.

Authorizations:
Bearer
header Parameters
CorrelationId
string

CorrelationId used for logging

Request Body schema:
invoiceId
required
string <uuid>

Responses

Request samples

Content type
{
  • "invoiceId": "4f163819-178d-470c-a246-d6768476a6ec"
}

Response samples

Content type
No sample

Get the list of consents that are granted to particular invoice issuer.

Authorizations:
Bearer
query Parameters
invoiceIssuerId
string <uuid>
state
string or null
pagingState
string or null
header Parameters
CorrelationId
string

CorrelationId used for logging

Responses

Response samples

Content type
No sample

Get a single consent.

Authorizations:
Bearer
path Parameters
consentid
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

Responses

Response samples

Content type
No sample

Invoice User Simulation

This API is used to simulate app functionality for testing your implementation of MobilePay Invoice.

Delete direct invoice consent.

Authorizations:
Bearer
path Parameters
consentid
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

AuthenticatedUser
string <uuid>

AuthenticatedUser used for user simulation

Responses

Get Invoice pdf.

path Parameters
id
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

AuthenticatedUser
string <uuid>

AuthenticatedUser used for user simulation

Responses

Response samples

Content type
No sample

Reject invoice.

path Parameters
id
required
string <uuid>
header Parameters
CorrelationId
string

CorrelationId used for logging

AuthenticatedUser
string <uuid>

AuthenticatedUser used for user simulation

Responses

Response samples

Content type
{
  "InvoiceId": "89a140f4-8433-4196-b25f-690871be5b3d"
}

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

Content type
{
  • "paymentDate": "2019-08-24T14:15:22Z",
  • "ConsumerCard": "19b5f30f-0b73-41b9-898f-697e3bb5c354"
}

Response samples

Content type
No sample

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

Content type
{
  • "isConsentGranted": true
}