Update Subscription
Update the plan, quantity, or other attributes of an existing subscription. Supports switching to different plans with optional prorated billing.
subscriptions.write
scope.Authorizations
Bearer authentication header in the format `Bearer <token>`, where `<token>` is your authentication token.
Headers
Merchant account ID for this request.
""default""
Unique identifier to prevent duplicate update requests.
""550e8400-e29b-41d4-a716-446655440001""
Path Parameters
Unique identifier of the subscription to update.
"sub_0001"
Body
application/jsonNew subscription plan details.
Subscription quantity (for per-seat pricing).
"5"
Whether to prorate subscription changes.
true
"true"
"false"
Billing cycle anchor: unchanged, now.
"unchanged"
"now"
New payment method details.
Updated subscription description.
"Upgraded to yearly plan"
Custom key-value pairs for additional information.
"{"plan_type": "yearly", "upgraded_by": "customer"}"
Response
Successful Response
Unique subscription identifier.
"sub_0001"
Object type, always "subscription".
"subscription"
Subscription creation time (ISO 8601).
"2025-08-12T09:00:00Z"
Last update time (ISO 8601).
"2025-08-15T14:30:00Z"
Customer information with generated ID.
Subscription plan details.
Payment method details.
Subscription status.
"active"
Subscription quantity.
"1"
Current billing period start time.
"2025-08-15T14:30:00Z"
Current billing period end time.
"2026-08-15T14:30:00Z"
Next billing date (YYYY-MM-DD format).
"2026-08-15"
Trial period start time (if applicable).
"null"
Trial period end time (if applicable).
"null"
Subscription description.
"Upgraded to yearly plan"
Custom metadata.
"{}"
Proration details (if applicable).
Whether this is a production mode subscription.
"false"
curl --request POST \--url https://api.efundpay.com/v4/subscriptions/sub_0001 \--header 'Authorization: Bearer <token>' \--header 'x-merchant-account-id: <x-merchant-account-id>' \--header 'Content-Type: application/json' \--header 'Idempotency-Key: 550e8400-e29b-41d4-a716-446655440001' \--data '{"plan": {"name": "Premium Yearly","currency": "USD","amount": 9999,"interval": "year","trial_period_days": 30,"billing_cycle_anchor": "first_of_month"},"prorate": true,"metadata": {"plan_type": "yearly","upgraded_by": "customer"}}'
{"id": "sub_0001","object": "subscription","created": "2025-08-12T09:00:00Z","updated": "2025-08-15T14:30:00Z","customer": {"id": "cus_abc123","display_name": "John Doe","external_identifier": "customer-12345","first_name": "John","last_name": "Doe","email_address": "john@example.com","phone_number": "+1234567890","account_number": "123456789"},"plan": {"name": "Premium Yearly","currency": "USD","amount": 9999,"interval": "year","trial_period_days": 30,"billing_cycle_anchor": "first_of_month"},"payment_method": {"token_id": "tok_a1b2c3d4","type": "card","card": {"number": "4111111111111111","expiration_date": "12/27","security_code": "123"}},"status": "active","quantity": 1,"current_period_start": "2025-08-15T14:30:00Z","current_period_end": "2026-08-15T14:30:00Z","next_billing_date": "2026-08-15","trial_start": null,"trial_end": null,"description": "Upgraded to yearly plan","metadata": {"plan_type": "yearly","upgraded_by": "customer"},"proration_details": {"credit_amount": 2500,"debit_amount": 9999,"net_amount": 7499,"invoice_id": "in_proration_001"},"livemode": false}