What is an Invoice Issuer?
Invoice issuer represents merchant’s company information. Each invoice issuer contains its own address information, account data and logo. The merchant is the customer company and the Invoice Issuer is the actual service provider name under which they create invoices. Read more here
How do we administrate MobilePay Invoice?
Before using MobilePay Invoices, the merchant must have at least one invoice issuer which can be created via MobilePay Portal Denmark or Finland.
Do not confuse Invoice Issuer with merchant. The merchant is the customer company and the Invoice Issuer is the actual service provider name under which they create invoices
GET /api/v1/merchants/{merchantId}/invoiceissuers
Response
HTTP 200 OK
{
"InvoiceIssuers":[
{
"Id":"6a33d969-fa86-44af-a23b-731da0e4d50d",
"Name":"MyAwesomeStore",
"AccountType":"Account",
"Status":"enabled",
"Address":"Paradisæblevej 13",
"City":"Andeby",
"ZipCode":"1234"
}
]
}
What do I use MerchantID for?
MerchantId
is a unique identifier of a merchant in our system. After you retrieve an access token from OpenID flow use the following endpoint to retrieve your MerchantId
.
GET /api/v1/merchants/me
Response
HTTP 200 OK
{"MerchantId":"e3465d75-8fd4-4ea4-8881-304c464f1d24"}
Once you have the MerchantId
you can then specify a invoice callback url. You will use MerchantId
in the endpoints towards the Invoice API.
Method 1. Basic
Using basic
All the REST callbacks will be sent to CallbackUrl
and contain basic credentials in Authorization
HTTP header:
Authorization: Basic [Base64 encoded username:password]
PUT /api/v1/merchants/{merchantId}/auth/basic
{
"username":"Username",
"password":"MySecretPswd",
"callbackurl":"https://your.url/callbacks/invoice"
}
Method 2. ApiKey
PUT /api/v1/merchants/{merchantId}/auth/apikey
{
"api_key":"SomeSecretApiKey123",
"callbackurl":"https://your.url/callbacks/invoice"
}
Using ApiKey
authentication method your provided API key will be simply added to Authorization
header.