ePayment API Errors
The standard response body format for our error messages follows
RFC 7807.
For example, an error sent together with a
HTTP 400 Bad Request
:
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json
Content-Language: en
{
"type": "https://httpstatuses.io/400",
"title": "Cannot capture before reservation",
"detail": "The amount you tried to capture is not reserved. The user must accept the payment before capture can be done.",
"instance": "/v1/payments/577531734343670112/capture",
"status": 400,
"extraDetails": [
{
"name": "ErrorCode",
"reason": "6080"
}
],
"traceId": "00-813b63975adcaaeef2b0ec7c103c40e3-706492e906541d31-01",
}
Find more information at: Knowledge base: Errors.
warning
Use the ErrorCode
field to identify the type of error.
The title and details may be updated over time to improve the API and make the error messages easier to understand.
Error types
InternalError
Error Code | Title | Details |
---|---|---|
3010 | Internal error | Internal error. This may be caused by an incorrect API request. Please check the request. See the status pages. |
InvalidRequest
Error messages that convey a problem with how the request was formed.
Error Code | Title | Details |
---|---|---|
4010 | Capture idempotency conflict | The capture request in an idempotent retry must be identical to the previous request(s). See Idempotency. |
4020 | Idempotency error | Idempotency-Key acme-shop-123-order123abc already exists. See Idempotency. |
4040 | Invalid amount | The amount is invalid. Amounts must be integers, no decimals. They are specified in minor units, like øre or cent. A common error is to specify amounts with decimals, sometimes due to rounding errors. |
4050 | Invalid CustomerToken | The parameter CustomerToken is invalid. If you scan your personal QR, you can get a customer token that you can use to start a payment. If this is not valid, this message will be displayed. See Personal QR. |
4060 | Invalid PersonalQr | The parameter PersonalQr is invalid. See Personal QR. |
4070 | Invalid phone number | The phone number is invalid. Phone numbers must be in MSISDN format: Country code and subscriber number, but no prefix. |
4080 | Invalid scope | The scope something-something is invalid. |
4090 | Invalid URL | The parameter http://example.com is invalid. |
4100 | Metadata capacity exceeded | The metadata object exceeds the maximum capacity. |
4110 | Metadata duplicate keys not allowed | Duplicate keys are not allowed. |
4120 | Metadata key length exceeded | The key something-something exceeds the maximum allowed key length. |
4130 | Metadata value length exceeded | The value something-something exceeds the maximum allowed value length. |
4140 | Missing required parameter | The parameter something-something is required. |
4150 | Refund idempotency conflict | The request in an idempotent retry must be identical to the previous request(s). See Idempotency. |
Merchant
Error messages that convey a problem with merchant configuration or permission.
Error Code | Title | Details |
---|---|---|
5010 | Blocking sources not applicable | Not possible to block payment sources for market: 'Norwegian' Block payment sources is only available for Danish and Finnish sales units. |
5020 | Express payment not allowed | Express payment is not allowed for this sales unit. |
5030 | Illegal scope | The scope something-something is illegal. Are you asking for more than you are allowed to? This occurs if the merchant asking for NIN or account number without proper permissions. |
5040 | Invalid currency for merchant | You must use the currency which matches your merchants registered market. See Offering Vipps/MobilePay in the Nordics. |
5050 | Long-living payment not allowed | The sales unit with MSN 123456 is not allowed to perform long-living payment requests. |
5060 | Merchant bank account not verified | The sales unit is active, but the merchant has not yet verified its bank account, and the sales unit cannot receive payments. |
5070 | Payment cannot be created | Reference acme-shop-123-order123abc cannot be created. Invalid state: something-something , missing precondition, or incorrect merchant setup. |
5080 | PUSH_MESSAGE not allowed | The sales unit with MSN 123456 is not allowed to use PUSH_MESSAGE flow. |
5090 | Reference not found | The reference acme-shop-123-order123abc does not exist for MSN 123456. |
5100 | Refund not possible | Cannot refund payment due to a configuration problem. |
Payment
Error messages that convey a problem with a payment.
Error Code | Title | Details |
---|---|---|
6010 | Amount too small | The amount is too small. Amounts are specified in minor units, like øre or cent. The minimum amounts allowed are NOK 100 øre, DKK 1 øre, EUR 1 cent. |
6020 | Attempted refund before reservation | Cannot refund a payment that is not reserved. Check the payment event log. See GET:/epayment/v1/payments/{reference}/events . |
6030 | Cancel period expired | Payments can only be canceled within 180 days of the reservation. After reservation, payments can only be canceled within the payment capture deadlines. |
6040 | Cannot cancel a captured payment | Cannot cancel a payment that has been captured. Check the payment event log. See Cancellations and GET:/epayment/v1/payments/{reference}/events . |
6050 | Cannot cancel a non-reserved payment | Cannot cancel a payment that is not reserved. Check the payment event log. See Cancellations and GET:/epayment/v1/payments/{reference}/events . |
6060 | Cannot cancel authorized payment | This payment is authorized and cannot be cancelled when CancelTransactionOnly is set. This error can occur if the CancelTransactionOnly: true in the cancel request. See POST:/epayment/v1/payments/{reference}/cancel . |
6070 | Cannot capture a cancelled payment | Cannot capture a payment that has been cancelled. Check the payment event log. See Cancellations and GET:/epayment/v1/payments/{reference}/events . |
6080 | Cannot capture before reservation | The amount you tried to capture is not reserved. The user must accept the payment before capture can be done. |
6090 | Capture amount too high | The total capture amount exceeds the reserved amount. Cannot capture a higher amount than the amount the user has accepted. Check the payment details. |
6100 | Capture period expired | Cannot capture because the payment's capture period has passed. After reservation, payments can only be captured within the payment capture deadlines. See Reserve and capture. |
6110 | Expiration date is too late | The expiration date something-something is too late. The maximum expiry is 60 days into the future. |
6120 | Expiration date is too soon | The expiration date something-something is too soon. The minimum expiry is 10 minutes into the future. |
6130 | Long living payments require a receipt | If ExpiresAt is set, receipt is mandatory. See Long-living payment requests. |
6140 | Must capture full amount | Partial capture is not allowed on this payment. See Partial capture. |
6150 | Not enough refundable | Cannot refund more than the available amount. Check the payment event log. See GET:/epayment/v1/payments/{reference}/events . |
6160 | Order processing | Order locked and is already processing. |
6170 | Payment already captured | The payment has already been captured. See Capture. |
6180 | Payment already refunded | Cannot refund a payment that has already been refunded. Check the payment event log. See GET:/epayment/v1/payments/{reference}/events . |
6190 | Payment cannot be cancelled | Reference acme-shop-123-order123abc cannot be cancelled. Invalid state: something-something . See Cancellations. |
6200 | Payment cannot be captured | Reference acme-shop-123-order123abc cannot be captured. Invalid state: something-something . |
6210 | Payment cannot be refunded | Reference acme-shop-123-order123abc cannot be refunded. Invalid state: something-something . |
6220 | Refund period expired | Payments can only be refunded within 365 days of the reservation. See Reserve and capture. |
6230 | Payment is already reserved | The payment with reference acme-shop-123-order123abc has already been reserved. |
6240 | Shipping details required | Express payments with static shipping details require a list of shipping options. |
Test environment
Error messages only encountered in the test environment.
Error Code | Title | Details |
---|---|---|
10010 | Approve failed | Force approve payment failed. Reason: something-something . This for the "force approve" endpoint in the test environment. |
10020 | Approve not allowed | The payment is in a state that does not allow approval. This for the "force approve" endpoint in the test environment. |
10030 | Identification required | The user must identify before proceeding. This for the "force approve" endpoint in the test environment. |
10040 | Invalid payment source | The payment source is disabled or does not exist. |
10050 | No cards | The user does not have any payment cards. The user must add a valid card in the app. |
10060 | Operation not supported | The attempted payment operation is not supported. This for the "force approve" endpoint in the test environment. |
10070 | Payment limit exceeded | The merchant's payment request limit is exceeded. |