MobilePay Online API (v1)
Download OpenAPI specification:Download
This is the API spec for MobilePay Online. This can only be used for MobilePay in Finland and Denmark. See the MobilePay Online guide for more details.
Manage your merchants through the MobilePay PSP API. For details, see the API Guide.
Create merchant
header Parameters
CorrelationId | string CorrelationId used for logging |
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Request Body schema: application/json
externalId required | string non-empty The PSP's unique id of the merchant. |
merchantCategoryCode required | integer <int32> [ 1 .. 9999 ] The merchant category code (MCC) is used to classify a business by the types of goods or services it provides. More information here: MCC. |
name required | string [ 1 .. 255 ] characters The PSP's name of the merchant for billing purposes. |
billingCurrency required | string non-empty Billing currency of the merchant. Possible values are: |
countryCode required | string non-empty Merchant country code e.g. Denmark = DK. Use ISO 3166-1. |
vatNumber required | string non-empty The VAT number of the merchant. |
Responses
Request samples
- Payload
{- "externalId": "aarhus-trading-20018",
- "merchantCategoryCode": 1234,
- "name": "Gedekid og Smoothies",
- "billingCurrency": "DKK",
- "countryCode": "DK",
- "vatNumber": "11102248"
}
Response samples
- 200
{- "merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b"
}
Get merchant
path Parameters
merchantId required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Responses
Response samples
- 200
{- "merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
- "externalId": "string",
- "name": "string",
- "billingCurrency": "string",
- "countryCode": "string",
- "vatNumber": "string",
- "merchantCategoryCode": 0
}
Get merchants
header Parameters
CorrelationId | string CorrelationId used for logging |
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Responses
Response samples
- 200
{- "merchants": [
- {
- "merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
- "externalId": "string",
- "name": "string",
- "billingCurrency": "string",
- "countryCode": "string",
- "vatNumber": "string",
- "merchantCategoryCode": 0
}
]
}
Delete merchant
The merchant can no longer make payments, and is no longer eligible for subscription fee.
path Parameters
merchantId required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Responses
Complete payments through the MobilePay PSP API. For details, see the API Guide.
Initiate payment
A payment or checkout always start by initiating the payment. All provided urls MUST be https with TLS 1.2 or better. merchantName and merchantUrl are mandatory because those are used for Dynamic Linking. See Error codes.
header Parameters
CorrelationId | string CorrelationId used for logging |
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Request Body schema: application/json
merchantId required | string <uuid> Identifier for the Merchant. Originates from the CreateMerchant response. |
merchantName required | string non-empty The display name of the merchant shown to the end-user. Is used for 'Dynamic Linking'. Must be the same as registered with the merchants Acquirer and in schemes. |
merchantLogoUrl required | string non-empty The url of the logo shown to the end-user. Must be: 250x250 pixels, png or jpg served over a secure connection, must be https, and publicly available. |
merchantOrderId required | string non-empty Merchant's order id. |
merchantUrl required | string non-empty Url of the merchant. Max length 150 char. Is used for 'Dynamic Linking'. If the merchant doesn't have a Url, use VAT number (international format) or use the merchantId from MobilePay, as this will also guarantee uniqueness. |
pspReferenceId required | string [ 1 .. 50 ] characters PSP's unique reference to payment. |
amount required | integer <int64> Order amount in minor unit. I.e. 4,95 must be given as 495. |
currencyCode required | string non-empty Currency of the order. Must be alphabetic or numeric ISO 4217 code. Accepted codes: DKK, EUR, NOK, SEK, USD, GBP, 208, 978, 578, 752, 840, 826 |
required | Array of objects (CardType) Allowed card types for the payment, includes callback configuration per card type. |
publicKeyId required | integer <int32> Id of the public key to be used for exchange of card data. |
redirectFromMobilePayUrl required | string non-empty Where to redirect the user when the payment is complete. Must be fully qualified URL. |
failedPaymentCallbackUrl | string or null <uri> Default: null Url to be notified when a payment ends unsuccessful. Must be a fully qualified URL. Must be secured by TLS 1.2. |
autoCapture | boolean Set to true, if the payment will be automatically captured. |
preferVisaPartOfVisaDankort | boolean If set to true, the Visa part of the Danish co-branded Visa/Dankort will be preferred over the Dankort part. The card type given in the callback from MobilePay must still be respected. |
customerLanguageCode | string or null Override the default language code for the payment. |
minimumMobilePayUserAge | integer or null <int32> [ 0 .. 150 ] Optional. The payment will fail if the MobilePay user age is below the given minimum age. |
customerPhoneNumber | string or null Optional. Pre-fill customer phone number for the landing page. Must be provided without whitespace and with either Danish (45) or Finnish (358) prefix. |
Responses
Request samples
- Payload
{- "merchantId": "c3073b9d-edd0-49f2-a28d-b7ded8ff9a8b",
- "merchantName": "string",
- "merchantLogoUrl": "string",
- "merchantOrderId": "string",
- "merchantUrl": "string",
- "pspReferenceId": "string",
- "amount": 0,
- "currencyCode": "string",
- "allowedCardTypes": [
- {
- "name": "string",
- "encryptedPanCallbackUrl": "string",
- "tokenCallbackUrl": "string"
}
], - "publicKeyId": 0,
- "redirectFromMobilePayUrl": "string",
- "failedPaymentCallbackUrl": null,
- "autoCapture": true,
- "preferVisaPartOfVisaDankort": true,
- "customerLanguageCode": "string",
- "minimumMobilePayUserAge": 150,
- "customerPhoneNumber": "4512345678"
}
Response samples
- 200
{- "paymentId": "472e651e-5a1e-424d-8098-23858bf03ad7",
- "redirectToMobilePayUrl": "string",
- "redirectToMobilePayAppUrl": "string"
}
Capture payment
Create a capture. Multiple can be created. Amount must given in minor units of currency.
path Parameters
paymentId required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Request Body schema: application/json
captureIdentifier required | string non-empty The PSP's unique id for the capture to ensure idempotency |
amount required | integer <int64> Captured amount in minor unit. If the amount is lower than the originally authorized amount, it is a partial capture. |
timestamp required | string <date-time> Time of the capture at the PSP. |
authorizationAttemptId | string or null <uuid> Id of the authorization attempt that was authorized. This will ensure that we mark the correct authorization attempt as succeeded. |
Responses
Request samples
- Payload
{- "captureIdentifier": "string",
- "amount": 0,
- "timestamp": "2019-08-24T14:15:22Z",
- "authorizationAttemptId": "52904e8c-5d19-450f-b4c0-1ba3de8b8bca"
}
Response samples
- 200
{- "captureId": "255ed88a-e063-46f6-943a-5ff3e0fe79ed"
}
Cancel payment
path Parameters
paymentId required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Request Body schema: application/json
cancelIdentifier required | string non-empty The PSP's unique id of the cancel to ensure idempotency. |
amount required | integer <int64> Cancelled amount in minor unit. If the amount is lower than the originally authorized amount, it is a partial cancel. |
timestamp required | string <date-time> Time of the cancel at the PSP. |
Responses
Request samples
- Payload
{- "cancelIdentifier": "string",
- "amount": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
Response samples
- 200
{- "cancelId": "43be4d23-a0d9-4b8a-ad81-d5b8587824aa"
}
Refund payment
Creates a refund. Multiple can be created. Amount must given in minor units of currency.
path Parameters
paymentId required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Request Body schema: application/json
refundIdentifier required | string non-empty PSP's unique id of the refund to ensure idempotency. |
amount required | integer <int64> Refunded amount in minor unit. If amount is lower than the originally authorized amount, it is a partial refund. |
timestamp required | string <date-time> Time of the refund at the PSP. |
Responses
Request samples
- Payload
{- "refundIdentifier": "string",
- "amount": 0,
- "timestamp": "2019-08-24T14:15:22Z"
}
Response samples
- 200
{- "refundId": "3324897f-393a-4bf6-b3af-0b999cbc2521"
}
Update payment
This endpoint requires approval before it can be used. Please contact developer@vippsmobilepay.com
path Parameters
paymentId required | string <uuid> |
header Parameters
CorrelationId | string CorrelationId used for logging |
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Request Body schema: application/json
reservationExpireTimestamp | string or null <date-time> The timestamp of where the reservation is known to expire. This must be patched when a successful authorization is made. Also it must be patched should the expiration be prolonged. No need to patch it if reservation is captured or cancelled. |
redirectFromMobilePayUrl | string or null The redirect url for the user when the payment is complete. Must be fully qualified url. |
Responses
Request samples
- Payload
{- "reservationExpireTimestamp": "2019-08-24T14:15:22Z",
- "redirectFromMobilePayUrl": "string"
}
Force Approve payment (Test environment only)
Test environment only. Approves payment for given phone number.
path Parameters
paymentId required | string <uuid> |
header Parameters
x-ibm-client-id required | string Client id for authentication |
x-ibm-client-secret required | string Client secret for authentication |
Request Body schema: application/json
customerPhoneNumber required | string >= 8 characters Customer phone number. Must be provided without whitespace and with either Danish (45) or Finnish (358) prefix. |
Responses
Request samples
- Payload
{- "customerPhoneNumber": 4512345678
}