# Storefront Api- Error if we do not upload an image for payment option

**URL:** <https://forum.litium.com/t/storefront-api-error-if-we-do-not-upload-an-image-for-payment-option/3369>\
**Category:** Questions\
**Tags:** litium-8\
**Created:** [October 18, 2024, 8:06am UTC](https://forum.litium.com/t/storefront-api-error-if-we-do-not-upload-an-image-for-payment-option/3369 "2024-10-18T08:06:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishnu\_kj](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/vishnu_kj/32/685_2.png) [@vishnu\_kj](https://forum.litium.com/u/vishnu_kj)\
**Post date:** [October 18, 2024, 8:06am UTC](https://forum.litium.com/t/storefront-api-error-if-we-do-not-upload-an-image-for-payment-option/3369/1 "2024-10-18T08:06:00Z")

</div>

Storefront api returns exception if we do not upload an image for payment option

this is the request

```auto
mutation createCheckoutSession {
  createCheckoutSession(
    input: {
      checkoutFlowInfo: {
        checkoutPageUrl: "https://localhost:3001/en/checkout"
        cancelPageUrl: "https://localhost:3001/en/checkout"
        receiptPageUrl: "https://localhost:3001/en/checkout/order-confirmation-page"
        allowSeparateShippingAddress: true
        disablePaymentShippingOptions: true
      }
      notifications: {
        orderConfirmedUrl: "https://localhost:3001/api/email/orderConfirmation/en/checkout"
      }
    }
  ) {
    checkout {
      ...Checkout
      __typename
      paymentOptions {
        description
        id
        integrationType
        name
        price
        selected
      }
    }
    errors {
      ... on ValidationError {
        message
        __typename
      }
      __typename
    }
    __typename
  }
}

fragment Checkout on Checkout {
  shippingAddress {
    __typename
  }
  additionalInfo {
    key
    value
  }
  shippingOptions {
    id
    name
    price
    selected
    description
    integrationType
    image {
      url
    }
  }
  billingAddress {
    firstName
  }
  paymentOptions {
    id
    name
    price
    selected
    description
    integrationType
    image {
      url
    }
  }
  paymentHtmlSnippet
  checkoutFlowInfo {
    receiptPageUrl
  }
  notifications {
    orderConfirmedUrl
  }
}
```

and this is the response

```auto
{
  "errors": [
    {
      "message": "Could not resolve the actual object type from `System.Threading.Tasks.ValueTask`1[[System.Object, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]` for the abstract type `image`.",
      "locations": [
        {
          "line": 68,
          "column": 5
        }
      ],
      "path": [
        "createCheckoutSession",
        "checkout",
        "paymentOptions",
        0,
        "image"
      ]
    }
  ],
  "data": {
    "createCheckoutSession": {
      "checkout": {
        "shippingAddress": {
          "__typename": "OrderAddress"
        },
        "additionalInfo": [],
        "shippingOptions": [
          {
            "id": "U2hpcHBpbmdPcHRpb24KZENoYW5uZWxTeXN0ZW1JZD00M2Q3NTZkYzMwMDU0ZmQ0OGQ1NjIxZWE1YmFhODVjYSZDb3VudHJ5U3lzdGVtSWQ9OTg4NDEzYjZhMTM3NDE4YmFmODQyYTk1NDE2NzMxNDkmQ2FydENvbnRleHRTeXN0ZW1JZD1mZWU5NDZjZjhjZTY0NTI1OTA4NjIwNjVmYTM1OGQ0YyZPcHRpb25JZD1EaXJlY3RTaGlwbWVudCUzQXN0YW5kYXJkUGFja2FnZQ==",
            "name": "Direct Shipment",
            "price": 5,
            "selected": true,
            "description": null,
            "integrationType": "INLINE",
            "image": {
              "url": "/storage/945FB10D864846727C62AD00925343E60483E13F1CB4C7EA094989248DC2912E/74f8a15be85b4cdabd18a4e107a60e54/png/media/3030cc2533ff4ec2a9721f7817f9a41a/Logo%20%282%29.png"
            }
          }
        ],
        "billingAddress": {
          "firstName": null
        },
        "paymentOptions": [
          {
            "id": "UGF5bWVudE9wdGlvbgpkQ2hhbm5lbFN5c3RlbUlkPTQzZDc1NmRjMzAwNTRmZDQ4ZDU2MjFlYTViYWE4NWNhJkNvdW50cnlTeXN0ZW1JZD05ODg0MTNiNmExMzc0MThiYWY4NDJhOTU0MTY3MzE0OSZPcHRpb25JZD1kaXJlY3RwYXltZW50JTNBRGlyZWN0UGF5",
            "name": "DirectPay",
            "price": 0,
            "selected": true,
            "description": null,
            "integrationType": "DIRECT_PAYMENT",
            "image": null
          }
        ],
        "paymentHtmlSnippet": null,
        "checkoutFlowInfo": {
          "receiptPageUrl": "https://localhost:3001/en/checkout/order-confirmation-page"
        },
        "notifications": {
          "orderConfirmedUrl": "https://localhost:3001/api/email/orderConfirmation/en/checkout"
        },
        "__typename": "Checkout"
      },
      "errors": null,
      "__typename": "CreateCheckoutSessionPayload"
    }
  }
}
```

Litium version: _[8.18.1]_

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [November 15, 2024, 8:06am UTC](https://forum.litium.com/t/storefront-api-error-if-we-do-not-upload-an-image-for-payment-option/3369/2 "2024-11-15T08:06:51Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
