# Cancel a payment. **POST /api/payments/cancel-payment** Cancel a pending payment of the provided payment identifier. Will fail if the payment has already been cancelled, errored, or completed. Payments will automatically cancel if they are not completed after 15 minutes, which will mark them as errored. ## Servers ## Authentication methods - Basic auth ## Parameters ### Body: (object) - **paymentIdentifier** (string) Unique identifier for the created payment. ## Responses ### 200 200 OK #### Body: (object) - **paymentIdentifier** (string) Unique identifier for the created payment. - **status** (string) Unique identifier for the created payment. Successful transactions will be marked as completed. Transactions that have failed due to technical reasons will be marked Error, while transactions that were flagged and denied by our Anti-Money Laundering program will be marked as AMLError. Transactions that are flagged will always automatically return money to the user. - **isComplete** (boolean) Simple boolean to determine if a payment has successfully completed. - **createdDatetime** (string(date-time)) Datetime of when the payment was first created, in the format: uuuu-MM-dd'T'HH:mm:ss - **orderId** (string) Optional identifier for the transaction for merchant use. Not used by Madora. - **orderDescription** (string) Optional description for the transaction for merchant use. Not used by Madora. ### 400 400 Bad Request #### Body: (object) - **errorCode** (string) - **errorMessage** (string) ### 401 401 Unauthorized #### Body: (object) - **errorCode** (string) - **errorMessage** (string) ### 500 500 Internal Server Error #### Body: (object) - **errorCode** (string) - **errorMessage** (string) [Powered by Bump.sh](https://bump.sh)