Skip to Content
Docs
Customer claims

Claim a guest customer

POST/customer_claims

Links a guest customer to the account in your app. When your reference already has a customer, Pay.com moves the guest's subscriptions, orders and entitlements to it. Nothing about the payments changes.

  • From your server, when your system can prove the app account started the purchase: send the guest's guest_customer and your customer_reference_id.
  • With the emailed link: Pay.com emails the customer a single-use link to your claim page, valid for 30 days. After they sign in, send its token and your customer_reference_id.

Pay.com never claims a purchase by matching an email address. Claiming again with the same reference does nothing new. Another reference returns 409 with already_claimed.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.
idempotency-keystring

A unique key, such as a UUID, that makes a POST safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace. A retry with the same key, endpoint and body gets the first response. Another endpoint or body gets 400 idempotency_error, and a retry while the first is running gets 409.

Parameters

customer_reference_idstringRequired

Your ID for the app account.

guest_customerstring

The guest's customer ID (cust_).

tokenstring

The single-use token from the emailed link.

Returns

The claim.

idstring
resourcestring
customerstring
customer_reference_idstring
methodstring

One of server or email_link.

createdstring
test_modeboolean

Errors

400
The request is invalid.
401
The API key is missing or wrong.
403
The key's permissions don't allow this route.
404
No such object in this workspace and environment.
409
A request with this idempotency key is still running.
Was this page helpful?