Skip to main content

Getting token details

To retrieve the current state and details of a customer token.

Getting token details​

GET /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...

Request​

Request headers

HeaderRequiredExplanation
AuthorizationYesBearer <access_token>. See Authorization.
Walley-Idempotency-KeyNoA Guid. See Idempotent Requests.

Response​

All responses return a JSON object with either a data object or an error object.

PropertyTypeExplanation
idGuidCorrelation ID for this request
dataobjectPresent on success. See Data object.
errorobjectPresent on failure. See Error object.

Data object​

PropertyTypeIncludedDescription
statusstringAlwaysToken status. See Status values.
cancellationDatedateMaybeISO 8601 date-time if the token is cancelled.
paymentMethodobjectAlwaysDetails of the payment method used by the token

Status values

  • Active - Token is active and can be used for authorizations
  • Pending - Token is pending approval
  • Denied - Token approval was denied; cannot be used.
  • Revoked - Token approval was revoked; cannot be used.
  • Cancelled - Token has been cancelled via the cancel endpoint; cannot be used

PaymentMethod object

PropertyTypeIncludedDescription
typestringAlwaysOne of Invoice or Card
invoiceTypestringif InvoiceOne of Email, Peppol or Finvoice
invoiceReferencestringif InvoiceReference chosen by the customer when registering the token.
invoiceTagstringif InvoiceTag chosen by the customer when registering the token.
maskedCardNumberstringif CardThe masked card number like '516020******2127'

Error object​

PropertyTypeDescription
codeintegerHTTP status code.
messagestringGeneral description of the error.
errorsarrayList of specific validation errors, if applicable.
PropertyTypeDescription
reasonstringError type or category (e.g., ValidationError).
messagestringHuman-readable explanation of the validation issue.
fieldstringField name in the request that caused the validation error.

Error codes

Error codeCause
400Bad request, for example invalid token format
401Incorrect, missing or expired bearer token
404The customer token was not found for the authenticated bearer token
503There was some internal error. Please try again