magento2 – No such entity cartId when send POST on /rest/default/V1/carts/mine/payment-information


According to documentation – https://devdocs.magento.com/guides/v2.4/rest/tutorials/orders/order-create-order.html

I’m trying to make call on /rest/default/V1/carts/mine/payment-information with body:

{
  "paymentMethod": {
      "method": "stripe_payments"
  },
  "billing_address": {
    "email": "jdoe@example.com",
    "region": "New York",
    "region_id": 43,
    "region_code": "NY",
    "country_id": "US",
    "street": (
      "123 Oak Ave"
    ),
    "postcode": "10577",
    "city": "Purchase",
    "telephone": "512-555-1111",
    "firstname": "Jane",
    "lastname": "Doe"
  }
}

and getting error:

{
"message": "No such entity with %fieldName = %fieldValue",
    "parameters": {
        "fieldName": "cartId",
        "fieldValue": 0
    },
    "trace": "#0 /bitnami/magento/htdocs/vendor/magento/module-quote/Model/QuoteRepository.php(232): Magento\Framework\Exception\NoSuchEntityException::singleField('cartId', 0)n#1 /bitnami/magento/htdocs/vendor/magento/module-quote/Model/QuoteRepository.php(136): Magento\Quote\Model\QuoteRepository->loadQuote('loadByIdWithout...', 'cartId', 0, Array)n#2 /bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Quote\Model\QuoteRepository->get(0)n#3 /bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Quote\Model\QuoteRepository\Interceptor->___callParent('get', Array)n#4 /bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure}(0)n#5 /bitnami/magento/htdocs/generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php(26): Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins('get', Array, Array)n#6 /bitnami/magento/htdocs/vendor/magento/module-sales/Model/Service/PaymentFailuresService.php(102): Magento\Quote\Model\QuoteRepository\Interceptor->get(0)n#7 /bitnami/magento/htdocs/vendor/magento/module-checkout/Helper/Data.php(231): Magento\Sales\Model\Service\PaymentFailuresService->handle(0, 'Please check th...', 'onepage')n#8 /bitnami/magento/htdocs/vendor/stripe/module-payments/Plugin/PaymentInformationManagement.php(68): Magento\Checkout\Helper\Data->sendPaymentFailedEmail(Object(Magento\Quote\Model\Quote\Interceptor), 'Please check th...')n#9 /bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(135): StripeIntegration\Payments\Plugin\PaymentInformationManagement->aroundSavePaymentInformationAndPlaceOrder(Object(Magento\Checkout\Model\PaymentInformationManagement\Interceptor), Object(Closure), 6, Object(Magento\Quote\Model\Quote\Payment\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))n#10 /bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->Magento\Framework\Interception\{closure}(6, Object(Magento\Quote\Model\Quote\Payment\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))n#11 /bitnami/magento/htdocs/generated/code/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(26): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, NULL)n#12 (internal function): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder(6, Object(Magento\Quote\Model\Quote\Payment\Interceptor), Object(Magento\Quote\Model\Quote\Address\Interceptor))n#13 /bitnami/magento/htdocs/vendor/magento/module-webapi/Controller/Rest/SynchronousRequestProcessor.php(95): call_user_func_array(Array, Array)n#14 /bitnami/magento/htdocs/vendor/magento/module-webapi/Controller/Rest.php(188): Magento\Webapi\Controller\Rest\SynchronousRequestProcessor->process(Object(Magento\Framework\Webapi\Rest\Request\Proxy))n#15 /bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))n#16 /bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->___callParent('dispatch', Array)n#17 /bitnami/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))n#18 /bitnami/magento/htdocs/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(26): Magento\Webapi\Controller\Rest\Interceptor->___callPlugins('dispatch', Array, Array)n#19 /bitnami/magento/htdocs/vendor/magento/framework/App/Http.php(116): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))n#20 /bitnami/magento/htdocs/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()n#21 /bitnami/magento/htdocs/vendor/magento/framework/App/Bootstrap.php(263): Magento\Framework\App\Http\Interceptor->launch()n#22 /bitnami/magento/htdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))n#23 {main}"
}
}

I was trying to put “cartId” with id of shopping-card created by magento rest api, but result was the same.