Cancel a 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.
Body
-
paymentIdentifier string
Unique identifier for the created payment.
POST
/api/payments/cancel-payment
curl \
-X POST https://madora.io/api/payments/cancel-payment \
--user "username:password" \
-H "Content-Type: application/json" \
-d '{"paymentIdentifier":"f390682f-4ded-41d6-adfd-80c54e85d73f"}'
Request example
{
"paymentIdentifier": "f390682f-4ded-41d6-adfd-80c54e85d73f"
}
Request examples
{
"paymentIdentifier": "f390682f-4ded-41d6-adfd-80c54e85d73f"
}
Response examples (200)
{
"paymentIdentifier": "f390682f-4ded-41d6-adfd-80c54e85d73f",
"status": "Waiting",
"isComplete": true,
"createdDatetime": "2023-05-04T09:42:00+00:00",
"orderId": "1",
"orderDescription": "test transaction"
}
Response examples (200)
{
"paymentIdentifier": "f390682f-4ded-41d6-adfd-80c54e85d73f",
"status": "Waiting",
"isComplete": true,
"createdDatetime": "2024-05-04T09:42:00+00:00",
"orderId": "1",
"orderDescription": "test transaction"
}
Response examples (400)
{
"errorCode": "internal",
"errorMessage": "string"
}
Response examples (400)
{
"errorCode": "internal",
"errorMessage": "string"
}
Response examples (401)
{
"errorCode": "internal",
"errorMessage": "string"
}
Response examples (401)
{
"errorCode": "internal",
"errorMessage": "string"
}
Response examples (500)
{
"errorCode": "internal",
"errorMessage": "string"
}
Response examples (500)
{
"errorCode": "internal",
"errorMessage": "string"
}