question

brokenoval avatar image
brokenoval asked brokenoval answered

Can I amend the payment time on an order?

I'm trying to backdate a payment on an order so that accounting can record the payment for a previous period.

I can apply a payment to an order using the v3 API:
POST /v3/merchants/{mId}/orders/{orderId}/payments

I've filtered down the required POST parameters to the following:
{
  "modifiedTime": "1504613000000",
  "createdTime": "1504613000000",
  "tender": {
    "instructions": "",
    "visible": false,
    "editable": false,
    "id": "{tender_id}",
    "label": "{tender_label}",
    "labelKey": "{package}",
    "opensCashDrawer": false,
    "supportsTipping": false,
    "enabled": false
  },
  "amount": "200",
  "clientCreatedTime": "1504613000000"
}	

The order was created on the 5th Sept, it is currently the 7th. I'm trying to apply this payment so that the payment also appears as the 5th Sept so that the Payment reports from the 5th of september are correct.
Payments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

brokenoval avatar image
brokenoval answered
Looks like I found the answer myself - the above does actually work from a reporting point of view. Back dating the "modifiedTime" seems to change the date the payment is reported on.

The order will always state the time of the payment however as the time when the server recieves it - so at the bottom of a receipt it will still state the time now, but in payment reports the payment will be recorded whenever you set the date.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community