MarcinusX / flutter_stripe_demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

resource_missing error

opened this issue · comments

I am getting the following error:

flutter: {"error":{"code":"resource_missing","doc_url":"https://stripe.com/docs/error-codes/resource-missing","message":"No such price: 'price_1HFw3QAQHy2zYPZft7bbrtWZ'","param":"line_items[0][price]","type":"invalid_request_error"}} [VERBOSE-2:ui_dart_state.cc(177)] Unhandled Exception: DioError [DioErrorType.RESPONSE]: Http status error [400] #0 Server.createCheckout (package:flutter_stripe_demo/checkout/server_stub.dart:37:7) <asynchronous suspension> #1 redirectToCheckout (package:flutter_stripe_demo/checkout/stripe_checkout_mobile.dart:8:21) <asynchronous suspension>

What could I do to fix this issue?

You have it written in the code. The price id you used is not registered in your stripe account.

How do I register the price id in my stripe account?

You do it in stripe dashboard - price=product

im getting the same issue as

{error: {code: resource_missing, doc_url: https://stripe.com/docs/error-codes/resource-missing, message: No such customer: 'cus_PD6LSQd0tEf6Dh', param: id, request_log_url: https://dashboard.stripe.com/test/logs/req_zgxnSj0ZmjQvcL?t=1702903325, type: invalid_request_error}}

how can i solve please help