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": {}
}
This functionality is for use in case of erroneous payment creation.
Prefer updating existing payments if the payment details have changed.
Path Parameters
Id of the Business the payment is associated with.
Response
Returns the updated Payment Object
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" \
The API will respond with the previous state of the now deleted payment.