curl https://api.thanxsandbox.com/receipts \
-X GET \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
{
"receipts": [
{
"id": "92b7b0dac4",
"user_id": "weorufsdf",
"merchant_id": "werouf",
"state": "pending",
"rejection_text": null,
"amount": 13.45,
"payment_type": "cash",
"purchased_at": "2020-09-15T00:52:10.655+00:00",
"submitted_at": "2020-09-15T00:55:11.876+00:00",
"user_comments": "credit card reader was not working",
"card_id": null,
"image": {
"small": "https://d1uv7brpxddy46.cloudfront.net/images/363/thumbnail/thumbnail-612c5e1821440637c0137be46d141e07.jpg?1604507010",
"large": "https://d1uv7brpxddy46.cloudfront.net/images/363/medium/medium-612c5e1821440637c0137be46d141e07.jpg?1604507010",
"default": "https://d1uv7brpxddy46.cloudfront.net/images/363/mobile/mobile-612c5e1821440637c0137be46d141e07.jpg?1604507010"
}
}
]
}
Receipts
Get Receipts
This endpoint describes the receipts in Thanx.
GET
/
receipts
curl https://api.thanxsandbox.com/receipts \
-X GET \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
{
"receipts": [
{
"id": "92b7b0dac4",
"user_id": "weorufsdf",
"merchant_id": "werouf",
"state": "pending",
"rejection_text": null,
"amount": 13.45,
"payment_type": "cash",
"purchased_at": "2020-09-15T00:52:10.655+00:00",
"submitted_at": "2020-09-15T00:55:11.876+00:00",
"user_comments": "credit card reader was not working",
"card_id": null,
"image": {
"small": "https://d1uv7brpxddy46.cloudfront.net/images/363/thumbnail/thumbnail-612c5e1821440637c0137be46d141e07.jpg?1604507010",
"large": "https://d1uv7brpxddy46.cloudfront.net/images/363/medium/medium-612c5e1821440637c0137be46d141e07.jpg?1604507010",
"default": "https://d1uv7brpxddy46.cloudfront.net/images/363/mobile/mobile-612c5e1821440637c0137be46d141e07.jpg?1604507010"
}
}
]
}
Please review proper request headers here.
Parameters
string
User ID. Note: the bearer token will be used to determine which user’s
receipts are being requested when the request is made by a logged in user.
string
Merchant ID
integer
The current page of paginated resources.
- Default:
1.
integer
Number of records to be returned per API request.
- Default:
10 - Minimum:
1 - Maximum:
100
Response
string
The receipt ID
string
Merchant ID
string
User ID
enum
The processing state of the receipt (
pending, processing, applied,
denied)string
If the receipt is denied, the reason provided
decimal
The amount of the receipt
enum
(
card, cash, other)string
The timestamp of the purchase, in ISO8601
string
When the user submitted the receipt, in ISO8601
string
Any user-entered notes
string
The card the user used, if it is registered in Thanx
hash
hash
curl https://api.thanxsandbox.com/receipts \
-X GET \
-H "Content-Type: application/json" \
-H "Accept-Version: v4.0" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${token}" \
-H "X-ClientId: ${client_id}"
{
"receipts": [
{
"id": "92b7b0dac4",
"user_id": "weorufsdf",
"merchant_id": "werouf",
"state": "pending",
"rejection_text": null,
"amount": 13.45,
"payment_type": "cash",
"purchased_at": "2020-09-15T00:52:10.655+00:00",
"submitted_at": "2020-09-15T00:55:11.876+00:00",
"user_comments": "credit card reader was not working",
"card_id": null,
"image": {
"small": "https://d1uv7brpxddy46.cloudfront.net/images/363/thumbnail/thumbnail-612c5e1821440637c0137be46d141e07.jpg?1604507010",
"large": "https://d1uv7brpxddy46.cloudfront.net/images/363/medium/medium-612c5e1821440637c0137be46d141e07.jpg?1604507010",
"default": "https://d1uv7brpxddy46.cloudfront.net/images/363/mobile/mobile-612c5e1821440637c0137be46d141e07.jpg?1604507010"
}
}
]
}