#matheu-help

1 messages · Page 1 of 1 (latest)

molten turtle
#

Hi! Feel free to ask your question in this thread.

edgy gate
#

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

molten turtle
#

Can you provide the request ID associated with the error?

edgy gate
#

sorry but which request ID?

#

can i send example code?

molten turtle
#

Should be in the header of the response

#

Looks like req_xxxx

edgy gate
#

req_Km994Ux58SVZne

molten turtle
#

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.

edgy gate
#

Ok, waiting

#

i'm using like this

#

$pay = $request->user()
->newSubscription('default', 'price_id')
->withPromotionCode('promo_code')
->create('pm_token');

molten turtle
#

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

edgy gate
#

i'm in a live mode

#

i can pass the price ID for you check

#

price_1KeSNUFjoquTQj7k0P6L2hRN

molten turtle
#

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.

edgy gate
#

Ok, i'll try again

#

req_G6kQ2HHn7FcNfB

#

same error 😦

#

i'm using a live mode plan = price_1KeSNUFjoquTQj7k0P6L2hRN

#

and using my personal credit card

long tendon
#

Hello. Taking over for bismarck here as they have to step out. Give me a moment to catch up

edgy gate
#

Ok

long tendon
#

That req_id is just a customer creation request

#

What operation is failing exactly?

edgy gate
#

im trying do this:

$pay = $request->user()
->newSubscription('default', 'price_id')
->withPromotionCode('promo_code')
->create('pm_token');

long tendon
#

Ok then that is the wrong request ID

edgy gate
#

but returns "The resource ID cannot be null or whitespace."

long tendon
#

The one you shared is just for creating a customer

edgy gate
#

how can I catch the correct req id?

long tendon
#

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?

edgy gate
#

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

long tendon
#

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