Limiting duplicate subscriptions via API
Problem Statement
You want to avoid duplicate customer records when customers checkout via hosted pages, and you need to merge existing duplicates.
Solution
Use the List customers API to check for an existing customer before creating a subscription. If one exists, either block creation or create the subscription under that customer.
Steps to Set It Up
- Capture and save the customer's email on your custom form.
- Call the List customers API to see if a customer with that email exists.
- If a customer exists:
- Option A: Return an error and stop subscription creation.
- Option B: Create the subscription under the existing customer using the Checkout new hosted page or Create subscription for customer API.
- If no customer exists: Use the create new subscription or checkout new hosted page API.
Additional Information
To merge existing duplicate customer records, use the Merge customers API.
Related Articles
Show more
Was this article helpful?