ePayment API Errors
Here is an overview of errors you may get from the ePayment API. They should be self-explanatory, but please let us know if they can be improved.
Errors responses have this format:
{
"extraDetails": [],
"type": "https://httpstatuses.io/<error-code>",
"title":"string",
"detail":"string",
"traceId":"string"
}
We will change the above format to match the common
HTTP response codes and errors
format by changing traceId
to instance
.
The ePayment documentation will be updated when that is done.
warning
The title
and detail
may be updated at any time, without warning,
to improve the API and make the error messages easier to understand.
Title | Detail | Comment |
---|---|---|
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. |
Attempted refund before reservation | Cannot refund a payment that is not reserved. Check the payment event log. | See GET:/epayment/v1/payments/{reference}/events . |
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. |
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. |
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 . |
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 . |
Cannot cancel pending | Cannot cancel a pending payment. | This error can occur if the CancelTransactionOnly: true in the cancel request. See POST:/epayment/v1/payments/{reference}/cancel . |
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 . |
Cannot capture before reservation | The amount you tried to capture is not reserved. The user must accept the payment before capture can be done. | |
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. | |
Capture idempotency conflict | The capture request in an idempotent retry must be identical to the previous request(s). | See Idempotency. |
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. |
Customer not found | The phone number does not belong to a user, or the user cannot pay to your business. | This means that the customer can't pay, and it can be for any number of reasons. For example, they may not have an account. If you have set the minimum user age, they may be too young. |
Expiration date is too late | The expiration date something-something is too late. The maximum expiry is 60 days into the future. | |
Expiration date is too soon | The expiration date something-something is too soon. The minimum expiry is 10 minutes into the future. | |
Express payment not allowed | Express payment is not allowed for this sales unit. | |
Idempotency error | Idempotency-Key acme-shop-123-order123abc already exists. | See Idempotency. |
Idempotency error | Reference acme-shop-123-order123abc already exists. | See Reference ID. |
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. |
Internal error | Internal error. This may be caused by an incorrect API request. Please check the request. See the status page. | |
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. |
Invalid currency for merchant | You must use the currency which matches your merchants registered market. | See Offering Vipps/MobilePay in the Nordics. |
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. |
Invalid PersonalQr | The parameter PersonalQr is invalid. | See Personal QR. |
Invalid phone number | The phone number is invalid. Phone numbers must be in MSISDN format: Country code and subscriber number, but no prefix. | |
Invalid scope | The scope something-something is invalid. | |
Invalid URL | The parameter http://example.com is invalid. | |
Long living payments require a receipt | If ExpiresAt is set, receipt is mandatory. | See Long-living payment requests. |
Long-living payment not allowed | The sales unit with MSN 123456 is not allowed to perform long-living payment requests. | |
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. | |
Metadata capacity exceeded | The metadata object exceeds the maximum capacity. | |
Metadata duplicate keys not allowed | Duplicate keys are not allowed. | |
Metadata key length exceeded | The key something-something exceeds the maximum allowed key length. | |
Metadata value length exceeded | The value something-something exceeds the maximum allowed value length. | |
Missing required parameter | The parameter something-something is required. | |
Must capture full amount | Partial capture is not allowed on this payment. | See Partial capture. |
Not enough refundable | Cannot refund more than the available amount. Check the payment event log. | See GET:/epayment/v1/payments/{reference}/events . |
Order processing | Too many concurrent requests. The payment is being processed. | |
Payment already captured | The payment has already been captured. | See Capture. |
Payment already refunded | Cannot refund a payment that has already been refunded. Check the payment event log. | See GET:/epayment/v1/payments/{reference}/events . |
Payment cannot be cancelled | Reference acme-shop-123-order123abc cannot be cancelled. Invalid state: something-something . | See Cancellations. |
Payment cannot be captured | Reference acme-shop-123-order123abc cannot be captured. Invalid state: something-something . | |
Payment cannot be created | Reference acme-shop-123-order123abc cannot be created. Invalid state: something-something . | |
Payment cannot be refunded | Reference acme-shop-123-order123abc cannot be refunded. Invalid state: something-something . | |
PUSH_MESSAGE not allowed | The sales unit with MSN 123456 is not allowed to use PUSH_MESSAGE flow. | |
Reference not found | The reference acme-shop-123-order123abc does not exist for MSN 123456. | |
Refund idempotency conflict | The request in an idempotent retry must be identical to the previous request(s). | See Idempotency. |
Refund not possible | Cannot refund single transferred payments. | |
Refund period expired | Payments can only be refunded within 365 days of the reservation. | See Reserve and capture. |
Error messages only encountered in the test environment:
Title | Detail | Comment |
---|---|---|
Approve failed | Force approve payment failed. Reason: something-something . | This for the "force approve" endpoint in the test environment. |
Approve not allowed | The payment is in a state that does not allow approval. | This for the "force approve" endpoint in the test environment. |
Identification required | The user must identify before proceeding. | This for the "force approve" endpoint in the test environment. |
Invalid payment source | The payment source is disabled or does not exist. | |
No cards | The user does not have any payment cards. | The user must add a valid card in the app. |
Operation not supported | The attempted payment operation is not supported. | This for the "force approve" endpoint in the test environment. |
Payment limit exceeded | The merchant's payment request limit is exceeded. |