I want to create an authorization on a payment, which I have already created. Here is the response after I created the payment by sending a POST request to /v3/merchants/{mId}/orders/{orderId}/payments
- {
- "tender": {
- "href": "https://sandbox.dev.clover.com/v3/merchants/G1PVG5TC9X0S1/tenders/HJGF4PFYWXK9T",
- "id": "HJGF4PFYWXK9T"
- },
- "result": "SUCCESS",
- "clientCreatedTime": 1658979308000,
- "modifiedTime": 1658979308000,
- "amount": 10000,
- "tipAmount": 500,
- "createdTime": 1658979308000,
- "id": "APZDBV7DH049R",
- "employee": {
- "id": "6XCRT98CMYTP0"
- },
- "order": {
- "id": "FWDW938RZ63P4"
- }
- }
Now I want to create an authorization on that payment by sending a POST request to /v3/merchants/{mId}/authorizations referencing the payment object I just made.
- {
- "payment": {
- "tender": {
- "href": "https://sandbox.dev.clover.com/v3/merchants/G1PVG5TC9X0S1/tenders/HJGF4PFYWXK9T",
- "id": "HJGF4PFYWXK9T"
- },
- "result": "SUCCESS",
- "clientCreatedTime": 1658979308000,
- "modifiedTime": 1658979308000,
- "amount": 10000,
- "tipAmount": 500,
- "createdTime": 1658979308000,
- "id": "APZDBV7DH049R",
- "employee": {
- "id": "6XCRT98CMYTP0"
- },
- "order": {
- "id": "FWDW938RZ63P4"
- }
- },
- "amount": 20000,
- "type": "TAB"
- }
However, I am getting an invalid payment error. Does anyone know how to properly send an payment authorization request? I suspect that an issue is that my payment object has its "result" attribute set to "SUCCESS" when I probably want it to be "AUTH".