I am currently trying to implement receipts into a Python package that I have created. I am having a bit of difficulty with receipts however.
I have created a receipt only populating the properties that the API documentations states are mandatory. I can see the receipt associated with the transaction in the APP but when I try to fetch or delete the receipt using the API I get the following error
{"code":"bad_response.marshaling","message":"Failed to marshal proto receipt to DTO","params":{"amount_currency":"GBP","client_id":"xxx","external_id":"ABC123","tax_currency":"","user_id":"xxx"},"retryable":{}}
Obviously I have masked the private data in the fields.For a delete I get a 400 status response and for a get I am getting a 406 http response.
Going by the error I suspect the structure of the receipt is wrong but not sure how. Has anyone come across this behaviour and identified the cause?
The following is the payload I used when creating the receipt (again with private data removed):
{
"transaction_id": "tx_123ABC",
"external_id": "ABC123",
"total": 665,
"currency": "GBP",
"taxes": [],
"payments": [],
"merchant": {},
"items": [
{
"amount": 665,
"currency": "GBP",
"description": "testing receipts",
"quantity": 1,
"tax": null,
"unit": null,
"sub_items": []
}
]
}