delete__subscription_pending-payment
DELETE /subscriptions/pending-payment
Cancel Pending Payment
Cancel a pending payment for the authenticated user's organization. This endpoint cancels any ongoing payment process and expires the associated Stripe checkout session.
Parameters
No parameters required.
TypeScript Client Library
public cancelPendingPayment = async (): Promise<CancelPendingPaymentResponse> => {
return this.makeRequest<CancelPendingPaymentResponse>('subscriptions/pending-payment', 'DELETE', null);
};Code Samples
curl -X DELETE https://backend.flashback.tech/subscriptions/pending-payment \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'DELETE https://backend.flashback.tech/subscriptions/pending-payment HTTP/1.1
Host: backend.flashback.tech
Accept: application/json
Authorization: Bearer {access-token}const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};
fetch('https://backend.flashback.tech/subscriptions/pending-payment',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});Example responses
200 Response
{
"success": true,
"message": "Pending payment cancelled successfully",
"data": {
"paymentId": "pay_1234567890abcdef",
"stripePaymentId": "cs_test_1234567890abcdef",
"cancelledAt": "2024-01-15T10:35:00Z"
}
}400 Response
404 Response (User Not Found)
404 Response (No Pending Payment)
500 Response
Responses
Response Schema
Status Code 200
» success
boolean
false
none
Indicates if the request was successful
» message
string
false
none
Success message
» data
object
false
none
Cancellation details
»» paymentId
string
false
none
Unique payment identifier
»» stripePaymentId
string
false
none
Stripe checkout session identifier
»» cancelledAt
string
false
none
Cancellation timestamp (ISO 8601)
Status Code 400
» success
boolean
false
none
Will be false for error responses
» error_code
string
false
none
Machine-readable error code
» message
string
false
none
Human-readable error message
Status Code 404
» success
boolean
false
none
Will be false for error responses
» error_code
string
false
none
Machine-readable error code
» message
string
false
none
Human-readable error message
Status Code 500
» success
boolean
false
none
Will be false for error responses
» error_code
string
false
none
Machine-readable error code
» message
string
false
none
Human-readable error message
Last updated
Was this helpful?