#matheu-help
1 messages · Page 1 of 1 (latest)
Hi! Im trying create a subscription in production but returns "The resource ID cannot be null or whitespace."
but I am correctly passing the card token, the promotional code and the plan id
Can you provide the request ID associated with the error?
Request ID: https://stripe.com/docs/api/request_ids
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Should be in the header of the response
Looks like req_xxxx
req_Km994Ux58SVZne
Thanks! Taking a look
Hmm okay that is a customer creation request
Which was successful
But I can find the error on your account based on that, one sec.
Ok, waiting
i'm using like this
$pay = $request->user()
->newSubscription('default', 'price_id')
->withPromotionCode('promo_code')
->create('pm_token');
I'm seeing mismatched key issues on your account.
Where the price was created in testmode for example but you are attempting to use it in livemode
i'm in a live mode
i can pass the price ID for you check
price_1KeSNUFjoquTQj7k0P6L2hRN
In livemode I see 3 failure requests from earlier today where you attempted to create a livemode Customer with a paymentmethod that was created in testmode.
I recommend running the request again, and grabbing the request ID related to the request you just made that errored.
Ok, i'll try again
req_G6kQ2HHn7FcNfB
same error 😦
i'm using a live mode plan = price_1KeSNUFjoquTQj7k0P6L2hRN
and using my personal credit card
Hello. Taking over for bismarck here as they have to step out. Give me a moment to catch up
Ok
im trying do this:
$pay = $request->user()
->newSubscription('default', 'price_id')
->withPromotionCode('promo_code')
->create('pm_token');
Ok then that is the wrong request ID
but returns "The resource ID cannot be null or whitespace."
The one you shared is just for creating a customer
how can I catch the correct req id?
I'm looking at your request logs and I see 200 requests recently. The only errors were on requests that you previously mentioned.
Can you try again, and check your request logs to see if there are really errors?
fail again 😦
$pay = $request->user()
->newSubscription('default', 'price_id')
->withPromotionCode('promo_code')
->create('pm_token');
the same code works in test mode, but when i try in live mode return error
Ah ok. So if we don't get as far as seeing an error in the request logs, this is probably due to some variable or environment variable not being set properly in your live environment. Something you are passing in there is null or whitespace