What attaching a customer does
Passcustomer_id or external_customer_id to checkouts.create and Macropay will:
- Pre-fill the customer’s known details into the checkout form.
- Lock the email field so the buyer can’t edit it.
- Bind the resulting order to that exact customer record — no duplicates, clean reconciliation.
Because Macropay is the Merchant of Record, that locked customer record is also what we use to assess the right sales tax/VAT and to put the correct legal seller on the buyer’s statement. One trustworthy identity in, one clean tax-compliant order out.
Pick the right identifier
Option A — link by your own user ID (recommended)
If you already manage users, hand us your internal ID asexternal_customer_id. Macropay looks for a customer with that external ID; if one exists it links to it and pre-fills their data, and either way the order ends up attributed to that ID.
1
Create the checkout with external_customer_id
Pass your application’s user ID. Here a logged-in user upgrades to the
pro-annual plan:2
Send the buyer to checkout
Redirect to the
url in the response. The email arrives pre-filled and read-only, and the order comes back stamped with user_8f3a91.Option B — link by Macropay customer ID
If the customer already lives in Macropay and you have our UUID, link to it directly.1
Grab the customer ID
Find it in your dashboard’s customer list or via the API. It’s a UUID, for example
992fae2a-2a17-4b7a-8d9e-e287cf90131b.2
Create the checkout with customer_id
3
Send the buyer to checkout
Redirect to the returned
url. The email field is pre-filled and locked, and the order links back to that customer.