Register your own identifier for a customer
Names a customer by your own identifier, before they have an account with us. Returns the URL to send them to so they can attach it to their account; once they have, you can act for them by sending the same identifier as the `User-Identifier` header. An identifier that is never linked is discarded after 24 hours, so an abandoned flow does not hold the value permanently. Registering the same identifier again is safe and returns the same registration.
POST/api/v3/users/identifiers
Send two credentials: your own, and the customer's.
How authentication works- Yours
x-api-keyorAuthorization: Bearer- The customer's
User-Authorization: BearerorUser-Identifier
Language
Environment
Credentials
Your credential
The customer's credential
Choose an environment first.
curl -X POST https://api.btcdirect.eu/api/v3/users/identifiers \ -H "x-api-key: $BTCD_API_KEY" \ -H "User-Authorization: Bearer $BTCD_USER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "identifier": "your-customer-8842", "returnUrl": "https://your.app/account/linked", "locale": "nl-nl" }'Response
{ "linkUrl": "https://your.app/callback", "alreadyLinked": true}Request
identifierstringrequired
Your own identifier for this customer. Unique within your partner account; two partners may use the same string for different people.
returnUrluri
Where to send the customer once they have linked. Replayed to you verbatim.
Examplehttps://your.app/checkout/return
localestring
Which locale the link URL should be in. Falls back to the default when unrecognised.
Examplenl-nl
Responses
200Registered.400Invalid request.401Bad credentials.503`maintenance` — full maintenance is on, and every endpoint refuses every request until it ends (`endsAt`, when it has an end). Nothing is wrong with the request and nothing was done; the same request is accepted afterwards. Told apart from any other 503 by `code`.Body of the success response
linkUrlurirequired
Send the customer here to attach the identifier to their account.
Examplehttps://your.app/callback
alreadyLinkedbooleanrequired
True when this identifier already belongs to an account.
Every failure answers with a message and a code. Switch on the code — messages are written for people and can change.