Getting token details
To retrieve the current state and details of a customer token.
Getting token details​
- Request
- Response
- Error
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...
HttpStatusCode: 200 Accepted
{
"id": "ee634b96-f40e-426a-be3f-3533a7f6a400",
"data": {
"status": "Active"
}
}
HttpStatusCode: 404 Not Found (Example error. More errors available below.)
{
"id": "fe8a21bb-6cb5-4d7d-b7f6-c0c335fc4593",
"error": {
"code": 404,
"message": "The resource requested was not found.",
"errors": []
}
}
Request​
Request headers
Header | Required | Explanation |
---|---|---|
Authorization | Yes | Bearer <access_token> . See Authorization. |
Walley-Idempotency-Key | No | A Guid. See Idempotent Requests. |
Response​
All responses return a JSON object with either a data object or an error object.
Property | Type | Explanation |
---|---|---|
id | Guid | Correlation ID for this request |
data | object | Present on success. See Data object. |
error | object | Present on failure. See Error object. |
Data object​
Property | Type | Included | Description |
---|---|---|---|
status | string | Always | Token status. See Status values. |
cancellationDate | date | Maybe | ISO 8601 date-time if the token is cancelled. |
paymentMethod | object | Always | Details of the payment method used by the token |
Status values
Active
- Token is active and can be used for authorizationsPending
- Token is pending approvalDenied
- 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
Property | Type | Included | Description |
---|---|---|---|
type | string | Always | One of Invoice or Card |
invoiceType | string | if Invoice | One of Email , Peppol or Finvoice |
invoiceReference | string | if Invoice | Reference chosen by the customer when registering the token. |
invoiceTag | string | if Invoice | Tag chosen by the customer when registering the token. |
maskedCardNumber | string | if Card | The masked card number like '516020******2127' |
Error object​
Property | Type | Description |
---|---|---|
code | integer | HTTP status code. |
message | string | General description of the error. |
errors | array | List of specific validation errors, if applicable. |
Property | Type | Description |
---|---|---|
reason | string | Error type or category (e.g., ValidationError ). |
message | string | Human-readable explanation of the validation issue. |
field | string | Field name in the request that caused the validation error. |
Error codes
Error code | Cause |
---|---|
400 | Bad request, for example invalid token format |
401 | Incorrect, missing or expired bearer token |
404 | The customer token was not found for the authenticated bearer token |
503 | There was some internal error. Please try again |