clojurewerkz

zendevil 2021-02-10T12:00:39.000400Z

I'm getting the following error: com.stripe.exception.InvalidRequestException: This customer has no attached payment source or default payment method. at com.stripe.net.LiveStripeResponseGetter.handleAPIError(LiveStripeResponseGetter.java:591) at com.stripe.net.LiveStripeResponseGetter._request(LiveStripeResponseGetter.java:443) at com.stripe.net.LiveStripeResponseGetter.request(LiveStripeResponseGetter.java:65) at com.stripe.net.APIResource.request(APIResource.java:140) at com.stripe.model.Customer.createSubscription(Customer.java:478) at com.stripe.model.Customer.createSubscription(Customer.java:320) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:167) at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:102) at clojurewerkz.elephant.subscriptions$create.invokeStatic(subscriptions.clj:32) at clojurewerkz.elephant.subscriptions$create.invoke(subscriptions.clj:29) at vendo.routes.home$create_subscription.invokeStatic(home.clj:62) at vendo.routes.home$create_subscription.invoke(home.clj:56) at muuntaja.middleware$wrap_params$fn__8119.invoke(middleware.clj:52) at muuntaja.middleware$wrap_format$fn__8123.invoke(middleware.clj:73) at vendo.middleware$wrap_formats$fn__9256.invoke(middleware.clj:40) at reitit.ring$ring_handler$fn__15124.invoke(ring.cljc:326) at clojure.lang.AFn.applyToHelper(AFn.java:154) at clojure.lang.AFn.applyTo(AFn.java:144) at clojure.lang.AFunction$1.doInvoke(AFunction.java:31) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.lang.Var.invoke(Var.java:384) at ring.middleware.reload$wrap_reload$fn__4448.invoke(reload.clj:39) at selmer.middleware$wrap_error_page$fn__4463.invoke(middleware.clj:18) at prone.middleware$wrap_exceptions$fn__4704.invoke(middleware.clj:159) at ring.middleware.flash$wrap_flash$fn__8361.invoke(flash.clj:39) at ring.middleware.session$wrap_session$fn__8728.invoke(session.clj:108) at ring.middleware.keyword_params$wrap_keyword_params$fn__8774.invoke(keyword_params.clj:53) at ring.middleware.nested_params$wrap_nested_params$fn__8832.invoke(nested_params.clj:89) at ring.middleware.multipart_params$wrap_multipart_params$fn__8964.invoke(multipart_params.clj:171) at ring.middleware.params$wrap_params$fn__8988.invoke(params.clj:67) at ring.middleware.cookies$wrap_cookies$fn__8679.invoke(cookies.clj:214) at ring.middleware.absolute_redirects$wrap_absolute_redirects$fn__9176.invoke(absolute_redirects.clj:47) at ring.middleware.resource$wrap_resource_prefer_resources$fn__9024.invoke(resource.clj:25) at ring.middleware.content_type$wrap_content_type$fn__9124.invoke(content_type.clj:34) at ring.middleware.default_charset$wrap_default_charset$fn__9148.invoke(default_charset.clj:31) at ring.middleware.not_modified$wrap_not_modified$fn__9090.invoke(not_modified.clj:61) at ring.middleware.x_headers$wrap_x_header$fn__8324.invoke(x_headers.clj:22) at ring.middleware.x_headers$wrap_x_header$fn__8324.invoke(x_headers.clj:22) at ring.middleware.x_headers$wrap_x_header$fn__8324.invoke(x_headers.clj:22) at vendo.middleware$wrap_internal_error$fn__9250.invoke(middleware.clj:19) at aleph.http.server$handle_request$fn__29655$f__16451__auto____29656.invoke(server.clj:158) at clojure.lang.AFn.run(AFn.java:22) at io.aleph.dirigiste.Executor$Worker$1.run(Executor.java:62) at manifold.executor$thread_factory$reify__16333$f__16334.invoke(executor.clj:44) at clojure.lang.AFn.run(AFn.java:22) at java.lang.Thread.run(Thread.java:748) When using [clojurewerkz.elephant.customers :as cust] (cust/create {"email" (:email (:params req)) "payment_method" (:payment-method-id (:params req)) }) I have the payment_method key, yet I'm seeing this error. How to fix this?