# How to generate the checkout link for existing Customer

**URL:** <https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328>\
**Category:** Questions\
**Tags:** checkout-api\
**Created:** [August 30, 2021, 9:47am UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328 "2021-08-30T09:47:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![afreen](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@afreen](https://developer.squareup.com/forums/u/afreen)\
**Post date:** [August 30, 2021, 9:47am UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/1 "2021-08-30T09:47:17Z")

</div>

Scenario:  
I have given the Buyer’s email address of the existing Customer, and I have entered the Order details with the Customer Id of the existing Customer whereas Customer Id is optional. I have generated the Checkout link with these details and placed the order.

Actual Output:  
A new Customer is created with the buyer’s email address and Payment linked to the newly created Customer.

Expected OutPut:  
Payment should be linked to the existing Customer (As I have passed the Customer Id in request).

How can I achieve this?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [August 30, 2021, 4:11pm UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/2 "2021-08-30T16:11:29Z")

</div>

With the Checkout API at this time a new customer profile will be created when payment is processed even if you add a `customer_id` to the order of the checkout. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. 🙂

---

<div class="post-metadata">

**Author:** ![Sannith](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Sannith](https://developer.squareup.com/forums/u/Sannith)\
**Post date:** [September 8, 2021, 3:03pm UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/3 "2021-09-08T15:03:05Z")

</div>

Thank you Bryan!

When can we expect that feature to be live?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [September 8, 2021, 3:35pm UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/4 "2021-09-08T15:35:58Z")

</div>

Currently, we don’t have a public roadmaps for feature releases and new products.

---

<div class="post-metadata">

**Author:** ![squarepug](https://avatars.discourse-cdn.com/v4/letter/s/9e8a1a/32.png) [@squarepug](https://developer.squareup.com/forums/u/squarepug)\
**Post date:** [September 22, 2021, 12:48am UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/5 "2021-09-22T00:48:24Z")

</div>

Hi Bryan,

I just ran into this issue myself, so please add me to the list of developers requesting this feature to use the passed-in customer\_id rather than creating a new customer. Hopefully that helps the API team to prioritize it a little higher. 🙂

Given what you said, that a new customer profile will always be created, is there any automated way to fix this via the API? By that I mean to go back and associate the existing (correct) customer with the transaction, rather than the newly created one. This can be done manually via the dashboard on the website, but I’d rather have a way for my processing script to do it automatically upon receiving the redirect\_url request.

- I have the order id, and the order object still contains the correct customer id.

- I have the transaction id (seems to always be the same as the order id), and the transaction object contains a tender object which points to the new customer id. I think I need to make that customer id point to the existing customer, but I see no way to do this in the API.

- Since I have the new customer id, I can delete that useless customer record from the database, but this just orphans the transaction. Even though the order object points to the correct customer, it seems that we really need the transaction to also point to that customer in order to make it look like they did the purchase - as was intended all along.

Again, I can manually fix it on the website, but this is kind of a pain when you have lots of orders. Is there no way to do this programmatically?

Alternatively, does the Web Payments API allow an existing customer to be attached to a payment so that it actually sticks? I’m happy with the flow of the Checkouts API from a user experience perspective - it’s simple and meets our needs, outside of the customer id issue. But I might eventually look into an alternative if this isn’t going to be fixed.

---

<div class="post-metadata">

**Author:** ![Antonette](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@Antonette](https://developer.squareup.com/forums/u/Antonette)\
**Post date:** [September 22, 2021, 4:20pm UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/6 "2021-09-22T16:20:38Z")

</div>

Go to Products, and then click the product that you want to create a checkout link for.From the product details page, click the More actions dropdown menu and then click Create checkout link.Optional: Select a product variant.Click Copy link.

[My Balance Now](https://www.mybalancenow.buzz/)

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [September 22, 2021, 4:20pm UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/7 "2021-09-22T16:20:55Z")

</div>

@squarepug, I’ll definitely share this feedback with the team, but at this time there isn’t a way to programmatically associate the customer in the order to the payment from the Checkout API. 🙂

---

<div class="post-metadata">

**Author:** ![Alvin857](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Alvin857](https://developer.squareup.com/forums/u/Alvin857)\
**Post date:** [September 22, 2021, 4:22pm UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/8 "2021-09-22T16:22:12Z")

</div>

The API of `Stripe::Checkout::Session.create` allows to add a `customer` key which references to a Stripe customer id. This way the payment is added to your existing customer.

> You may specify an existing Customer object for Checkout to use when making one-time payments or subscriptions. If you do so, any Stripe objects that are associated with that Customer[.](https://www.myccpay.bid/)

---

<div class="post-metadata">

**Author:** ![Sannith](https://avatars.discourse-cdn.com/v4/letter/s/aca169/32.png) [@Sannith](https://developer.squareup.com/forums/u/Sannith)\
**Post date:** [October 6, 2021, 3:05pm UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/9 "2021-10-06T15:05:33Z")

</div>

Hi @Bryan-Square

How can we differentiate the newly created Customer from Checkout and Customer created through the Square API?

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [October 6, 2021, 4:36pm UTC](https://developer.squareup.com/forums/t/how-to-generate-the-checkout-link-for-existing-customer/3328/10 "2021-10-06T16:36:04Z")

</div>

Currently there isn’t a way to easily differentiate the customer created with the API and a customer created with the Checkout API. If you are always adding the `customer_id` to the order of a checkout you can then use the [Orders API](https://developer.squareup.com/docs/orders-api/what-it-does) to pull all the customer information associated to the checkouts. 🙂
