Issue
I am trying to create a subscription on Stripe by using the lookup_key
as the initial information.
The API call is made using cURL.
I did not find a way yet to do that without making an additional request to retrieve the price_id
.
So far, I tried to use the following queries via "v1/subscriptions" but they are invalid:
- "items[0][lookup_key]"
- "items[0][price][lookup_key]"
- "items[0][price_lookup_key]"
It would be nice to have the most direct way to create a subscription using the lookup_key.
How would you achieve that?
Solution
You can't, that's not supported. You need to retrieve the Price first then use that, or cache the lookup key to current Price ID relationship in your own systems.
Answered By - Nolan H Answer Checked By - Terry (WPSolving Volunteer)