I would like to create a payment link for my customer and send it to my customer to subscribe. I cannot use default payment links because I need to pass custom metadata for each and every order that the buyer cannot see.
I have created SUBSCRIPTION_PLAN with ID 26VSWGYP6PEWR55ATI5LEIRT.
Then I have created SUBSCRIPTION_PLAN_VARIATION with ID W6R3JYCK6P5CIWYB6XB2CN6W.
When I try to create a draft order for this SUBSCRIPTION_PLAN_VARIATION
I get this
{:code=>"NOT_FOUND", :detail=>"Item variation with catalog object ID W6R3JYCK6P5CIWYB6XB2CN6W not found.", :category=>"INVALID_REQUEST_ERROR"}
To get the payment link, I must create an order, it seems. I tried using quick_pay but failed, because it creates a fixed payment instead of subscription. If quick_pay can create subscriptions, that would be an option…
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
After passing payment_note where shall I expect it? I cannot find it in Order, Subscription, Invoice and Payment objects. It should be in the Payment object, isn’t it?
I found it. It appears that payment_note is attached to PaymentLink rather than Payment which makes documentation misleading.
How do get PaymentLink if I have only Payment or Order?
I am really having a hard time here. I have created a link with ID LA2O6MO5W7DFRTCM and it has order ID ZGJxPICvxhuShwOF5gpnS7ibERGZY. When I paid for it, in the webhook I received had order ID Lzl4Il0isEJwkW2z0b0pr6pUUz8YY which is different from what was in the payment link.
The question remains. Once I create a payment link and send it to my customer, how do I retrieve the payment link from successful payment event?