curl -X POST https://sandbox.layerfi.com/v1/businesses/{business_id}/payments/${payment_id}/delete \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: application/json" \
{ "data": { "type": "Payment", "id": "e67c216b-28f4-4a0e-9a21-7f05c19e4c66", "external_id": "payment-1", "at": "2024-02-27T02:16:40.369432Z", "method": "CREDIT_CARD", "fee": 20, "amount": 90, "processor": "STRIPE", "imported_at": "2024-02-27T02:16:40.389772Z", "allocations": [ { "invoice_id": "57f0fada-bb56-4f3e-9afa-2a222b68009e", "payment_id": "e67c216b-28f4-4a0e-9a21-7f05c19e4c66", "amount": 90, "transaction_tags": [] } ], "transaction_tags": [] }, "meta": {} }
Deleting a payment should be used when a payment was improperly created.
The API will respond with the previous state of the now deleted payment.