cURL
curl --request DELETE \
--url https://us.api.flexprice.io/v1/creditgrants/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"effective_date": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.credit_grants.delete_credit_grant(id="<id>")
# 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.creditGrants.deleteCreditGrant("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.CreditGrants.DeleteCreditGrant(ctx, "<id>", nil)
if err != nil {
log.Fatal(err)
}
if res.SuccessResponse != nil {
// handle response
}
}{
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Credit Grants
Delete credit grant
Use when removing or ending a credit grant (e.g. revoke promo or close prepaid). Plan-scoped grants are archived; subscription-scoped supports optional effective_date in body.
DELETE
/
creditgrants
/
{id}
cURL
curl --request DELETE \
--url https://us.api.flexprice.io/v1/creditgrants/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"effective_date": "2023-11-07T05:31:56Z"
}
'from flexprice import Flexprice
with Flexprice(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.credit_grants.delete_credit_grant(id="<id>")
# 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.creditGrants.deleteCreditGrant("<id>");
console.log(result);
}
run();package main
import(
"context"
flexprice "github.com/flexprice/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := flexprice.New(
flexprice.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.CreditGrants.DeleteCreditGrant(ctx, "<id>", nil)
if err != nil {
log.Fatal(err)
}
if res.SuccessResponse != nil {
// handle response
}
}{
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Authorizations
Enter your API key in the format x-api-key <api-key>*
Path Parameters
Credit Grant ID
Body
application/json
Optional: effective_date for subscription-scoped grants
EffectiveDate is optional; when set (subscription scope) the grant end date is set to this time.
Response
OK

