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.
Important: The unique identifier of an error is the type
.
When handling errors, you must always identify the type of error by the type
field.
The title
and description
may be updated at any time, without warning,
to improve the API and make the error messages easier to understand.
Title | Description | 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. |
Amount invalid | 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. |
Express payment not allowed | Express payment is not allowed for this sales unit. | |
Missing static shipping details | Express payments with static shipping details require a list of shipping options. | |
No cards | The user does not have any payment cards. | The user must add a valid card in the app. |
Payment limit exceeded | The merchant's payment request limit is exceeded. | |
Operation not supported | The attempted payment operation is not supported. | |
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. | |
Cannot capture before reservation | The amount you tried to capture is not reserved. The user must accept the payment before capture can be done. | |
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 . |
Capture period expired | After reservation, payments can only be captured within the payment capture deadlines. | See Reserve and capture. |
Capture idempotency conflict | The capture request in an idempotent retry must be identical to the previous request(s). | See Idempotency. |
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 . |
Cancel period expired | After reservation, payments can only be canceled within the payment capture deadlines. | See Cancellations. |
Cannot cancel pending | Cannot cancel a pending payment. | See Cancellations. |
Order processing | Too many concurrent requests. The payment is being processed. | |
Internal error | Internal error. This may be caused by an incorrect API request. Please check the request. See the status page. | |
Payment already refunded | Cannot refund a payment that has already been refunded. Check the payment event log. | See GET:/epayment/v1/payments/{reference}/events . |
Not enough refundable | Cannot refund more than the available amount. Check the payment event log. | See GET:/epayment/v1/payments/{reference}/events . |
Refund period expired | Payments can only be refunded within 365 days of the reservation. | See Reserve and capture. |
Refund idempotency conflict | The request in an idempotent retry must be identical to the previous request(s). | See Idempotency. |
Attempted refund before reservation | Cannot refund a payment that is not reserved. Check the payment event log. | See and GET:/epayment/v1/payments/{reference}/events . |
Invalid phone number | The phone number is invalid. Phone numbers must be in MSISDN format: Country code and subscriber number, but no prefix. | |
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. |
Idempotency error | Reference acme-shop-123-order123abc already exists. | See Idempotency. |
Reference not found | The reference acme-shop-123-order123abc does not exist for MSN 123456 | |
Idempotency error | Idempotency-Key 49ca711a-acee-4d01-993b-9487112e1def already exists. | See Idempotency. |
Invalid URL | The parameter http://example.com is invalid. | |
Missing required parameter | The parameter something-something is required. | |
Direct capture not allowed | The sales unit with MSN 123456 is not allowed to use direct capture. | |
Reserve capture not allowed | The sales unit with MSN 123456 is not allowed to use reserve capture. | |
Skip landing page not allowed | The sales unit with MSN 123456 is not allowed to skip the landing page. | |
PUSH_MESSAGE flow not allowed | The sales unit with MSN 123456 is not allowed to use PUSH_MESSAGE flow. | |
Long-living payment not allowed | The sales unit with MSN 123456 is not allowed to perform long-living payment requests. | |
Payment cannot be cancelled | Reference acme-shop-123-order123abc cannot be cancelled. Invalid state: something-something . | See Cancellations. |
Payment cannot be refunded | Reference acme-shop-123-order123abc cannot be refunded. Invalid state: something-something . | |
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 is already reserved | The payment with reference acme-shop-123-order123abc has already been reserved. | |
Invalid scope | The scope something-something is invalid. | |
Illegal scope | The scope something-something is illegal. Are you asking for more than you are allowed to? | |
Approve failed | Force approve payment failed (this is only available in the test environment). Reason: something-something . | |
Expiration date invalid | The expiration date something-something is invalid. | |
ExpiresAt not allowed | Cannot set ExpiresAt for flow something-something . | |
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. |