Skip to main content

Modifying a token

If you need to update details on an existing customer token you can use the modify endpoint. This allows you to change the customer's email address or mobile phone number associated with the token.

Modifying a customer token​

PUT /purchase/customer-tokens/916f7730-8d24-4dd9-9778-92b75b747382 HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
Content-Type: application/json

{
"email": "updated@example.com",
"mobilePhone": "+46701234567"
}

Request Properties​

Request headers

HeaderRequiredExplanation
AuthorizationYesInstructions on how to generate the authorization header value can be found here.
Walley-Idempotency-KeyNoInstructions on how to use idempotency can be found here.

Request body

PropertyTypeRequiredExplanation
emailstringNoThe new email address for the token's buyer. Must be a valid email address format.
mobilePhonestringNoThe new mobile phone number for the token's buyer.
note

All request body properties are optional. Include only the fields you wish to update.

There is no requirement that the provided values differ from the current ones — the request will be accepted regardless.

Important error responses​

Error codeCause
400Invalid email address format
401Incorrect, missing or expired bearer token
403The customer token has been cancelled
404The customer token was not found for the authenticated bearer token
422Cannot modify buyer information: the token has no buyer