Isaw Afunnyfish
Isaw Afunnyfish

Reputation: 31

Internal error: Result from Open Invoice service does not contain a redirect URL

Getting this error when executing a klarna payment request.

The request:

curl --location 'https://checkout-test.adyen.com/v68/payments' \
--header 'x-API-key: API_KEY' \
--header 'content-type: application/json' \
--data-raw '{
   "merchantAccount":"MERCHANT_ACCOUNT",
   "reference":"REFERENCE",
   "paymentMethod":{
      "type":"klarna_paynow"
   },
   "amount": { "value": 1000, "currency": "SEK" },
   "shopperLocale":"en-US",
   "countryCode":"SE",
   "telephoneNumber": "+46 840 839 298",
   "shopperEmail":"[email protected]",
   "shopperName":{
      "firstName":"Testperson-se",
      "gender":"UNKNOWN",
      "lastName":"Approved"
   },
   "shopperReference":"12345678",
   "billingAddress":{
      "city":"Ankeborg",
      "country":"SE",
      "houseNumberOrName":"1",
      "postalCode":"12345",
      "street":"Stargatan"
   },
   "deliveryAddress":{
      "city":"Ankeborg",
      "country":"SE",
      "houseNumberOrName":"1",
      "postalCode":"12345",
      "street":"Stargatan"
   },
   "returnUrl":"RETURN_URL",
   "lineItems":[
    {
         "quantity":"1",
         "amountExcludingTax":"331",
         "taxPercentage":"2100",
         "description":"Shoes",
         "id":"Item #1",
         "taxAmount":"69",
         "amountIncludingTax":"400",
         "productUrl": "URL_TO_PURCHASED_ITEM",
         "imageUrl": "URL_TO_PICTURE_OF_PURCHASED_ITEM"
    },
    {
         "quantity":"2",
         "amountExcludingTax":"248",
         "taxPercentage":"2100",
         "description":"Socks",
         "id":"Item #2",
         "taxAmount":"52",
         "amountIncludingTax":"300",
         "productUrl": "URL_TO_PURCHASED_ITEM",
         "imageUrl": "URL_TO_PICTURE_OF_PURCHASED_ITEM"
    }
   ],
   "additionalData" : {
     "openinvoicedata.merchantData" : "eyJjdX..."
   }
}'

The response I'm getting from Adyen:

{
    "status": 500,
    "errorCode": "903",
    "message": "Internal error: Result from Open Invoice service does not contain a redirect URL",
    "errorType": "internal",
    "pspReference": "NC5FTB9LZRRXGN28"
}

I totally fail to fathom what the Open Invoice Service is, how exactly it comes into play in case of this specific request here and who/what is responsible for this service not containing a redirect url.

Additional details:

IntegrationType: Web drop-in.

Upvotes: 2

Views: 473

Answers (1)

Beppe C
Beppe C

Reputation: 13933

It looks like openinvoicedata.merchantData should be skipped, Klarna documentation no longer mentions support or how to use OpenInvoiceData

Upvotes: 1

Related Questions