Customer IDs with the CreatePaymentLink endpoint are derived based on the entered customer information, so the customer_id
field in an order won’t apply here.
As far as passing metadata goes, I’d recommend trying something like this:
- In your CreatePaymentLink request, set the metadata field in your order. Alternatively, if you’re specifically looking to set an internal customer ID, you can consider using reference_id. Please note that the order created here is an order template, which is not the same order that gets paid in a subscription’s invoice.
- Listen for the subscription.created webhook, which will fire when a new subscription is created.
- In that webhook body, you’ll find an
order_template_id
field. - If you retrieve that
order_template_id
via the Orders API, you’ll get back the order you created for your Payment Link, includingmetadata
andreference_id
if those were set.
Let us know if you have any follow up questions!