App payments
All dates use the (ISO 8601-1:2019
) format.
Date-time format - YYYY-MM-DDTHH:mm:ssZ
or YYYY-MM-DDTHH:mm:ss+00:00
.
initiate new payment
Authorizations:
header Parameters
CorrelationId | string <uuid> Correlation id used for logging (if you don't pass any value, we'll generate it) |
Request Body schema: application/json
amount required | integer <int32> The amount of money to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge €1.00). The minimum amount is 1. The maximum amount is defined by user's daily/yearly limits. |
idempotencyKey required | string <uuid> A unique value that identifies this InitiatePayment request. Must be a valid GUID, and is used to protect against accidental duplicate calls. Multiple requests with the same idempotency key have the same result. |
paymentPointId required | string <uuid> The Payment Point ID to associate with a payment. |
redirectUri required | string [ 0 .. 2000 ] characters MobilePay will use the redirectUri URL to redirect the MobilePay user to the merchant's confirmation page once user action is completed in MobilePay app. Must be a valid URI. |
reference required | string [ 0 .. 64 ] characters An ID to associate with the payment. Max length: 64 characters. |
description | string or null [ 0 .. 200 ] characters Optional payment information to be displayed in MobilePay app to the customer. Max length: 100 characters. |
customerPhoneNumber | string or null [ 0 .. 15 ] characters MobilePay will use the (international) phone number to prefill the landing page for dual device flows. Ex. +4512345678 |
Responses
Request samples
- Payload
{- "amount": 1250,
- "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "paymentPointId": "7347ba06-95c5-4181-82e5-7c7a23609a0e",
- "reference": "My-Payment-1",
- "idempotencyKey": "fae7680f-9875-4ba9-8910-2f2e1791f390",
- "redirectUri": "myapp://redirect",
- "customerPhoneNumber": null
}
Response samples
- 200
- 400
- 409
{- "paymentId": "186d2b31-ff25-4414-9fd1-bfe9807fa8b7",
}
fetch a list of payments Deprecated
Returns a list of all merchant's payments if no filters are provided in query parameters. Can also return only payments of a specific payment point if paymentPointId
is provided.
Authorizations:
query Parameters
paymentPointId | string <uuid> Filter payments of a specific payment point |
pageNumber | integer <int32> >= 1 Default: 1 |
pageSize | integer <int32> [ 1 .. 1000 ] Default: 100 Number of payments to be returned. |
stateFilter | Array of strings Items Enum: "initiated" "reserved" "captureStarted" "captured" "cancelledByMerchant" "cancelledByUser" "cancelledBySystem" Filter payments by state. |
startDate | string <date-time> Filter payments by |
endDate | string <date-time> Filter payments by |
header Parameters
CorrelationId | string <uuid> Correlation id used for logging (if you don't pass any value, we'll generate it) |
Responses
Response samples
- 200
- 400
{- "pageSize": 1,
- "nextPageNumber": 2,
- "payments": [
- {
- "PaymentId": "186d2b31-ff25-4414-9fd1-bfe9807fa8b7",
- "Amount": 1250,
- "Description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "PaymentPointId": "7347ba06-95c5-4181-82e5-7c7a23609a0e",
- "Reference": "My-Payment-1",
- "RedirectUri": "myapp://redirect",
- "State": "initiated",
- "InitiatedOn": "2022-05-26T13:13:49.700746+03:00",
- "LastUpdatedOn": "2022-05-26T13:13:49.700747+03:00",
- "MerchantId": "655ad36f-70b0-4add-a123-b943daca50e8",
- "IsoCurrencyCode": "DKK",
- "PaymentPointName": "MyPaymentPoint"
}
]
}
fetch single payment
Authorizations:
path Parameters
paymentid required | string <uuid> |
header Parameters
CorrelationId | string <uuid> Correlation id used for logging (if you don't pass any value, we'll generate it) |
Responses
Response samples
- 200
{- "paymentId": "186d2b31-ff25-4414-9fd1-bfe9807fa8b7",
- "amount": 1250,
- "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "paymentPointId": "7347ba06-95c5-4181-82e5-7c7a23609a0e",
- "reference": "My-Payment-1",
- "redirectUri": "myapp://redirect",
- "state": "initiated",
- "initiatedOn": "2022-05-26T13:13:49.700315+03:00",
- "lastUpdatedOn": "2022-05-26T13:13:49.700318+03:00",
- "merchantId": "655ad36f-70b0-4add-a123-b943daca50e8",
- "isoCurrencyCode": "DKK",
- "paymentPointName": "MyPaymentPoint"
}
capture payment
Authorizations:
path Parameters
paymentid required | string <uuid> |
header Parameters
CorrelationId | string <uuid> Correlation id used for logging (if you don't pass any value, we'll generate it) |
Request Body schema: application/json
amount required | integer <int32> The amount to be captured. A positive integer representing how much to capture in the smallest currency unit (e.g., 100 cents to capture €1.00). The minimum amount is 1. |
Responses
Request samples
- Payload
{- "amount": 0
}
Response samples
- 400
- 409
{- "code": "1234",
- "message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "correlationId": "91f2b05f-2171-4cea-9d5a-1cdbed6ae2cd",
- "origin": "MPY"
}
cancel payment
Authorizations:
path Parameters
paymentid required | string <uuid> |
header Parameters
CorrelationId | string <uuid> Correlation id used for logging (if you don't pass any value, we'll generate it) |
Responses
Response samples
- 400
- 409
{- "code": "1234",
- "message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "correlationId": "91f2b05f-2171-4cea-9d5a-1cdbed6ae2cd",
- "origin": "MPY"
}
cancel payment using idempotency key
Authorizations:
header Parameters
CorrelationId | string <uuid> Correlation id used for logging (if you don't pass any value, we'll generate it) |
Request Body schema: application/json
idempotencyKey required | string <uuid> The idempotency key identifying the payment to be canceled. Only payments in the |
Responses
Request samples
- Payload
{- "idempotencyKey": "0c14c6a6-6f50-4d1e-b0c4-b46ff43ba6a1"
}
Response samples
- 400
- 409
{- "code": "1234",
- "message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "correlationId": "91f2b05f-2171-4cea-9d5a-1cdbed6ae2cd",
- "origin": "MPY"
}
simulates payment confirmation
Simulate user swiping and confirming the payment (available only in sandbox environment).
Authorizations:
header Parameters
CorrelationId | string <uuid> Correlation id used for logging (if you don't pass any value, we'll generate it) |
Request Body schema: application/json
paymentSourceId required | string <uuid> The id of payment source which should be used to obtain funds. |
userId required | string <uuid> The id of the user on whose behalf funds will be reserved. |
Responses
Request samples
- Payload
{- "paymentSourceId": "8b1def75-8f77-4a48-8924-bf2ab22251e6",
- "userId": "be1e6d64-b73d-481a-9947-55e57ccbe4cf"
}
Response samples
- 400
- 409
{- "code": "1234",
- "message": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "correlationId": "91f2b05f-2171-4cea-9d5a-1cdbed6ae2cd",
- "origin": "MPY"
}
fetch a list of payment points
Returns a list of all merchant's payment points.
Authorizations:
query Parameters
pageNumber | integer <int32> >= 1 Default: 1 Values that are less than 1 will be replaced by 1. |
pageSize | integer <int32> [ 1 .. 1000 ] Default: 100 Number of payment points to be returned. |
header Parameters
CorrelationId | string <uuid> Correlation id used for logging (if you don't pass any value, we'll generate it) |
Responses
Response samples
- 200
- 400
{- "pageSize": 1,
- "nextPageNumber": 2,
- "paymentPoints": [
- {
- "PaymentPointId": "7347ba06-95c5-4181-82e5-7c7a23609a0e",
- "PaymentPointName": "MyPaymentPoint",
- "State": "active"
}
]
}
Refunds API makes it easy for you to refund payments to your customers. You can refund only those payments that were created via payments API above.
issue new refund
Authorizations:
Request Body schema: application/json
amount required | integer The amount of money to refund. A positive integer representing how much to refund in the smallest currency unit (e.g., 100 cents to charge €1.00). The minimum amount is 1. The maximum amount is equal to full payment's amount. |
idempotencyKey required | string <uuid> A unique value that identifies this request. Must be a valid GUID, and is used to protect against accidental duplicate calls. Multiple requests with the same idempotency key have the same result. |
paymentId required | string <uuid> The ID of payment for which refund will be issued. |
reference required | string [ 0 .. 64 ] characters An ID to associate with the refund. Max length: 64 characters. |
description | string or null [ 0 .. 200 ] characters Optional refund information to be displayed in MobilePay app to the customer. Max length: 200 characters. |
Responses
Request samples
- Payload
{- "paymentId": "186d2b31-ff25-4414-9fd1-bfe9807fa8b7",
- "amount": 1250,
- "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "reference": "My-Refund-1",
- "idempotencyKey": "fae7680f-9875-4ba9-8910-2f2e1791f390"
}
Response samples
- 200
- 409
{- "refundId": "7576910d-9789-4fef-a72e-877d89afec94",
- "paymentId": "186d2b31-ff25-4414-9fd1-bfe9807fa8b7",
- "amount": 1250,
- "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "reference": "My-Refund-1",
- "createdOn": "2021-07-19T12:42:38+00:00",
- "remainingAmount": 250
}
fetch a list of refunds Deprecated
Authorizations:
query Parameters
paymentId | string <uuid> Filter refunds of specific payment |
paymentPointId | string <uuid> Filter refunds of specific payment point |
pageNumber | integer >= 1 Default: 1 Values that are less than 1 will be replaced by 1. |
pageSize | integer [ 1 .. 1000 ] Default: 100 Number of refunds to be returned. |
createdBefore | string <date-time> Filter refunds by CreatedOn property. |
createdAfter | string <date-time> Filter refunds by CreatedOn property. |
Responses
Response samples
- 200
- 400
{- "pageSize": 0,
- "nextPageNumber": 0,
- "refunds": [
- {
- "refundId": "7576910d-9789-4fef-a72e-877d89afec94",
- "paymentId": "186d2b31-ff25-4414-9fd1-bfe9807fa8b7",
- "amount": 1250,
- "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "reference": "My-Refund-1",
- "createdOn": "2021-07-19T12:42:38+00:00",
- "paymentPointId": "7347ba06-95c5-4181-82e5-7c7a23609a0e",
- "merchantId": "655ad36f-70b0-4add-a123-b943daca50e8",
- "isoCurrencyCode": "DKK"
}
]
}
fetch single refund
Authorizations:
path Parameters
refundid required | string <uuid> |
Responses
Response samples
- 200
{- "refundId": "7576910d-9789-4fef-a72e-877d89afec94",
- "paymentId": "186d2b31-ff25-4414-9fd1-bfe9807fa8b7",
- "amount": 1250,
- "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
- "reference": "My-Refund-1",
- "createdOn": "2021-07-19T12:42:38+00:00",
- "paymentPointId": "7347ba06-95c5-4181-82e5-7c7a23609a0e",
- "merchantId": "655ad36f-70b0-4add-a123-b943daca50e8",
- "isoCurrencyCode": "DKK"
}