cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/payments/customers/{id}/setup/intent/cancel \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.payments.cancel_setup_intent(id="<id>", provider="razorpay")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.payments.cancelSetupIntent("<id>", "razorpay");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/dtos"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Payments.CancelSetupIntent(ctx, "<id>", dtos.CancelSetupIntentProviderRazorpay)
if err != nil {
log.Fatal(err)
}
if res.SetupIntentResponse != nil {
// handle response
}
}{
"checkout_session_id": "<string>",
"checkout_url": "<string>",
"client_secret": "<string>",
"created_at": 123,
"customer_id": "<string>",
"expires_at": 123,
"setup_intent_id": "<string>",
"status": "<string>",
"usage": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Payments
Cancel setup intent
Cancels the customer’s latest setup link if it hasn’t been completed. Razorpay only.
POST
/
payments
/
customers
/
{id}
/
setup
/
intent
/
cancel
cURL
curl --request POST \
--url https://us.api.flexprice.io/v1/payments/customers/{id}/setup/intent/cancel \
--header 'x-api-key: <api-key>'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.payments.cancel_setup_intent(id="<id>", provider="razorpay")
# Handle response
print(res)import { Flexprice } from "@flexprice/sdk";
const flexprice = new Flexprice({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await flexprice.payments.cancelSetupIntent("<id>", "razorpay");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"github.com/flexprice/go-sdk/v2/models/dtos"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Payments.CancelSetupIntent(ctx, "<id>", dtos.CancelSetupIntentProviderRazorpay)
if err != nil {
log.Fatal(err)
}
if res.SetupIntentResponse != nil {
// handle response
}
}{
"checkout_session_id": "<string>",
"checkout_url": "<string>",
"client_secret": "<string>",
"created_at": 123,
"customer_id": "<string>",
"expires_at": 123,
"setup_intent_id": "<string>",
"status": "<string>",
"usage": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}
