Update Subscription

POST {{baseUrl}}/v1/payments/subscriptions/:subscriptionId

Update the details of a subscription.

Request Body

{"billing"=>"<string>", "billing_cycle_anchor"=>"<string>", "cancel_at_period_end"=>"<boolean>", "coupon"=>"<string>", "days_until_due"=>"<number>", "payment_fields"=>{"address"=>{"canton"=>"<string>", "city"=>"<string>", "country"=>"NR", "created_at"=>"<number>", "district"=>"<string>", "id"=>"<string>", "line_1"=>"<string>", "line_2"=>"<string>", "line_3"=>"<string>", "name"=>"<string>", "phone_number"=>"<string>", "state"=>"<string>", "zip"=>"<string>"}, "amount_range_per_currency"=>[{"maximum_amount"=>"<number>", "minimum_amount"=>"<number>", "currency"=>"BWP"}], "bin_details"=>{"brand"=>"<string>", "bin_number"=>"<string>", "type"=>"<string>", "issuer"=>"<string>", "country"=>"AD", "level"=>"<string>"}, "category"=>"bank_transfer", "conditions"=>[{"description"=>"<string>", "element_name"=>"<string>", "operator"=>"<string>", "threshold_value"=>"<string>"}], "country"=>"LK", "currencies"=>["TWD"], "customer"=>{"name"=>"<string>", "addresses"=>[{"canton"=>"<string>", "city"=>"<string>", "country"=>"NE", "created_at"=>"<number>", "district"=>"<string>", "id"=>"<string>", "line_1"=>"<string>", "line_2"=>"<string>", "line_3"=>"<string>", "name"=>"<string>", "phone_number"=>"<string>", "state"=>"<string>", "zip"=>"<string>"}], "business_vat_id"=>"<string>", "created_at"=>"<integer>", "default_payment_method"=>"<string>", "delinquent"=>"<boolean>", "description"=>"<string>", "discount"=>{"coupon"=>{"amount_off"=>"<number>", "created"=>"<number>", "currency"=>"/AED", "description"=>"<string>", "discount_duration_in_uses"=>"<number>", "discount_valid_until"=>"<number>", "discount_validity_in_months"=>"<number>", "duration"=>"repeating", "duration_in_months"=>"<number>", "id"=>"<string>", "max_redemptions"=>"<number>", "percent_off"=>4, "redeem_by"=>"<number>", "times_redeemed"=>"<number>", "valid"=>"<boolean>"}, "customer"=>"<string>", "end"=>"<number>", "id"=>"<string>", "number_of_uses"=>"<number>", "start"=>"<number>", "subscription"=>"<string>", "valid"=>"<boolean>"}, "email"=>"<string>", "ewallet"=>"<string>", "id"=>"<string>", "invoice_prefix"=>"<string>", "payment_methods"=>{"data"=>[{"id"=>"<string>", "type"=>"<string>", "category"=>"rapyd_ewallet", "image"=>"<string>", "webhook_url"=>"<string>", "supporting_documentation"=>"<string>", "next_action"=>"not_applicable", "bic_swift"=>"<string>", "account_last4"=>"<string>"}], "has_more"=>"<boolean>", "total_count"=>"<integer>", "url"=>"<string>"}, "phone_number"=>"<string>", "subscriptions"=>[{"billing"=>"<string>", "billing_cycle_anchor"=>"<string>", "cancel_at_period_end"=>"<boolean>", "canceled_at"=>"<number>", "created_at"=>"<number>", "current_period_end"=>"<number>", "current_period_start"=>"<number>", "customer_token"=>"<string>", "days_until_due"=>"<number>", "discount"=>{"coupon"=>{"amount_off"=>"<number>", "created"=>"<number>", "currency"=>"GGP", "description"=>"<string>", "discount_duration_in_uses"=>"<number>", "discount_valid_until"=>"<number>", "discount_validity_in_months"=>"<number>", "duration"=>"repeating", "duration_in_months"=>"<number>", "id"=>"<string>", "max_redemptions"=>"<number>", "percent_off"=>100, "redeem_by"=>"<number>", "times_redeemed"=>"<number>", "valid"=>"<boolean>"}, "end"=>"<number>", "id"=>"<string>", "number_of_uses"=>"<number>", "start"=>"<number>", "subscription"=>"<string>", "valid"=>"<boolean>"}, "ended_at"=>"<number>", "id"=>"<string>", "payment_method"=>"<string>", "simultaneous_invoice"=>"<boolean>", "status"=>"unpaid", "subscription_items"=>{"data"=>[{"created"=>"<number>", "id"=>"<string>", "plan"=>{"active"=>"<boolean>", "aggregate_usage"=>"last_ever", "amount"=>"<number>", "billing_scheme"=>"tiered", "created_at"=>"<number>", "currency"=>"VEF", "id"=>"<string>", "interval"=>"month", "interval_count"=>"<number>", "nickname"=>"<string>", "product"=>{"active"=>"<boolean>", "attributes"=>["<string>"], "created_at"=>"<number>", "description"=>"<string>", "id"=>"<string>", "images"=>["<string>"], "name"=>"<string>", "package_dimensions"=>{"height"=>"<number>", "length"=>"<number>", "weight"=>"<number>", "width"=>"<number>"}, "shippable"=>"<boolean>", "skus"=>[{"active"=>"<boolean>", "created_at"=>"<number>", "currency"=>"AOA", "id"=>"<string>", "image"=>"<string>", "package_dimensions"=>{"height"=>"<number>", "length"=>"<number>", "weight"=>"<number>", "width"=>"<number>"}, "price"=>"<number>", "product"=>"<string>", "updated_at"=>"<number>"}], "statement_descriptor"=>"<string>", "type"=>"goods", "unit_label"=>"<string>", "updated_at"=>"<number>"}, "tiers"=>[{"amount"=>"<number>", "flat_amount"=>"<number>", "up_to"=>"<string>"}], "tiers_mode"=>"graduated", "transform_usage"=>{"divide_by"=>"<number>", "round"=>"<string>"}, "trial_period_days"=>"<number>", "usage_type"=>"licensed"}, "quantity"=>"<number>", "subscription_id"=>"<string>"}], "has_more"=>"<boolean>", "total_count"=>"<number>", "url"=>"<string>"}, "tax_percent"=>"<number>", "trial_end"=>"<number>", "trial_start"=>"<number>", "type"=>"payout"}]}, "fingerprint"=>"<string>", "image"=>"<string>", "instructions"=>"<string>", "is_cancelable"=>"<boolean>", "is_expirable"=>"<boolean>", "is_online"=>"<boolean>", "is_refundable"=>"<boolean>", "is_required"=>"<boolean>", "is_tokenizable"=>"<boolean>", "is_virtual"=>"<boolean>", "last4"=>"3448", "maximum_expiration_seconds"=>"<integer>", "minimum_expiration_seconds"=>"<integer>", "multiple_overage_allowed"=>"<boolean>", "name"=>"<string>", "payment_flow_type"=>"ewallet_payout"}, "payment_method"=>"<string>", "simultaneous_invoice"=>"<boolean>", "subscription_items"=>["<string>"], "tax_percent"=>"<number>", "trial_end"=>"<number>", "trial_from_plan"=>"<boolean>", "trial_period_days"=>"<number>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;data&quot;:{&quot;billing&quot;:&quot;\u003cstring\u003e&quot;,&quot;billing_cycle_anchor&quot;:&quot;\u003cstring\u003e&quot;,&quot;cancel_at_period_end&quot;:&quot;\u003cboolean\u003e&quot;,&quot;canceled_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;current_period_end&quot;:&quot;\u003cnumber\u003e&quot;,&quot;current_period_start&quot;:&quot;\u003cnumber\u003e&quot;,&quot;customer_token&quot;:&quot;\u003cstring\u003e&quot;,&quot;days_until_due&quot;:&quot;\u003cnumber\u003e&quot;,&quot;discount&quot;:{&quot;coupon&quot;:{&quot;amount_off&quot;:&quot;\u003cnumber\u003e&quot;,&quot;created&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;GTQ&quot;,&quot;description&quot;:&quot;\u003cstring\u003e&quot;,&quot;discount_duration_in_uses&quot;:&quot;\u003cnumber\u003e&quot;,&quot;discount_valid_until&quot;:&quot;\u003cnumber\u003e&quot;,&quot;discount_validity_in_months&quot;:&quot;\u003cnumber\u003e&quot;,&quot;duration&quot;:&quot;repeating&quot;,&quot;duration_in_months&quot;:&quot;\u003cnumber\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;max_redemptions&quot;:&quot;\u003cnumber\u003e&quot;,&quot;metadata&quot;:{},&quot;percent_off&quot;:9,&quot;redeem_by&quot;:&quot;\u003cnumber\u003e&quot;,&quot;times_redeemed&quot;:&quot;\u003cnumber\u003e&quot;,&quot;valid&quot;:&quot;\u003cboolean\u003e&quot;},&quot;end&quot;:&quot;\u003cnumber\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;number_of_uses&quot;:&quot;\u003cnumber\u003e&quot;,&quot;start&quot;:&quot;\u003cnumber\u003e&quot;,&quot;subscription&quot;:&quot;\u003cstring\u003e&quot;,&quot;valid&quot;:&quot;\u003cboolean\u003e&quot;},&quot;ended_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;metadata&quot;:{},&quot;payment_fields&quot;:{},&quot;payment_method&quot;:&quot;\u003cstring\u003e&quot;,&quot;payout_fields&quot;:{},&quot;simultaneous_invoice&quot;:&quot;\u003cboolean\u003e&quot;,&quot;status&quot;:&quot;active&quot;,&quot;subscription_items&quot;:{&quot;data&quot;:[{&quot;created&quot;:&quot;\u003cnumber\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;metadata&quot;:{},&quot;plan&quot;:{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;aggregate_usage&quot;:&quot;max&quot;,&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;billing_scheme&quot;:&quot;per_unit&quot;,&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;TOP&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;interval&quot;:&quot;month&quot;,&quot;interval_count&quot;:&quot;\u003cnumber\u003e&quot;,&quot;metadata&quot;:{},&quot;nickname&quot;:&quot;\u003cstring\u003e&quot;,&quot;product&quot;:{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;attributes&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;description&quot;:&quot;\u003cstring\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;images&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;metadata&quot;:{},&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;package_dimensions&quot;:{&quot;height&quot;:&quot;\u003cnumber\u003e&quot;,&quot;length&quot;:&quot;\u003cnumber\u003e&quot;,&quot;weight&quot;:&quot;\u003cnumber\u003e&quot;,&quot;width&quot;:&quot;\u003cnumber\u003e&quot;},&quot;shippable&quot;:&quot;\u003cboolean\u003e&quot;,&quot;skus&quot;:[{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;attributes&quot;:{},&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;COP&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;image&quot;:&quot;\u003cstring\u003e&quot;,&quot;inventory&quot;:{},&quot;metadata&quot;:{},&quot;package_dimensions&quot;:{&quot;height&quot;:&quot;\u003cnumber\u003e&quot;,&quot;length&quot;:&quot;\u003cnumber\u003e&quot;,&quot;weight&quot;:&quot;\u003cnumber\u003e&quot;,&quot;width&quot;:&quot;\u003cnumber\u003e&quot;},&quot;price&quot;:&quot;\u003cnumber\u003e&quot;,&quot;product&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cnumber\u003e&quot;},{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;attributes&quot;:{},&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;CHF&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;image&quot;:&quot;\u003cstring\u003e&quot;,&quot;inventory&quot;:{},&quot;metadata&quot;:{},&quot;package_dimensions&quot;:{&quot;height&quot;:&quot;\u003cnumber\u003e&quot;,&quot;length&quot;:&quot;\u003cnumber\u003e&quot;,&quot;weight&quot;:&quot;\u003cnumber\u003e&quot;,&quot;width&quot;:&quot;\u003cnumber\u003e&quot;},&quot;price&quot;:&quot;\u003cnumber\u003e&quot;,&quot;product&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cnumber\u003e&quot;}],&quot;statement_descriptor&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;goods&quot;,&quot;unit_label&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cnumber\u003e&quot;},&quot;tiers&quot;:[{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;flat_amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;up_to&quot;:&quot;\u003cstring\u003e&quot;},{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;flat_amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;up_to&quot;:&quot;\u003cstring\u003e&quot;}],&quot;tiers_mode&quot;:&quot;volume&quot;,&quot;transform_usage&quot;:{&quot;divide_by&quot;:&quot;\u003cnumber\u003e&quot;,&quot;round&quot;:&quot;\u003cstring\u003e&quot;},&quot;trial_period_days&quot;:&quot;\u003cnumber\u003e&quot;,&quot;usage_type&quot;:&quot;metered&quot;},&quot;quantity&quot;:&quot;\u003cnumber\u003e&quot;,&quot;subscription_id&quot;:&quot;\u003cstring\u003e&quot;},{&quot;created&quot;:&quot;\u003cnumber\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;metadata&quot;:{},&quot;plan&quot;:{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;aggregate_usage&quot;:&quot;last_ever&quot;,&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;billing_scheme&quot;:&quot;per_unit&quot;,&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;KRW&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;interval&quot;:&quot;month&quot;,&quot;interval_count&quot;:&quot;\u003cnumber\u003e&quot;,&quot;metadata&quot;:{},&quot;nickname&quot;:&quot;\u003cstring\u003e&quot;,&quot;product&quot;:{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;attributes&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;description&quot;:&quot;\u003cstring\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;images&quot;:[&quot;\u003cstring\u003e&quot;,&quot;\u003cstring\u003e&quot;],&quot;metadata&quot;:{},&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;package_dimensions&quot;:{&quot;height&quot;:&quot;\u003cnumber\u003e&quot;,&quot;length&quot;:&quot;\u003cnumber\u003e&quot;,&quot;weight&quot;:&quot;\u003cnumber\u003e&quot;,&quot;width&quot;:&quot;\u003cnumber\u003e&quot;},&quot;shippable&quot;:&quot;\u003cboolean\u003e&quot;,&quot;skus&quot;:[{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;attributes&quot;:{},&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;BSD&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;image&quot;:&quot;\u003cstring\u003e&quot;,&quot;inventory&quot;:{},&quot;metadata&quot;:{},&quot;package_dimensions&quot;:{&quot;height&quot;:&quot;\u003cnumber\u003e&quot;,&quot;length&quot;:&quot;\u003cnumber\u003e&quot;,&quot;weight&quot;:&quot;\u003cnumber\u003e&quot;,&quot;width&quot;:&quot;\u003cnumber\u003e&quot;},&quot;price&quot;:&quot;\u003cnumber\u003e&quot;,&quot;product&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cnumber\u003e&quot;},{&quot;active&quot;:&quot;\u003cboolean\u003e&quot;,&quot;attributes&quot;:{},&quot;created_at&quot;:&quot;\u003cnumber\u003e&quot;,&quot;currency&quot;:&quot;IRR&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;image&quot;:&quot;\u003cstring\u003e&quot;,&quot;inventory&quot;:{},&quot;metadata&quot;:{},&quot;package_dimensions&quot;:{&quot;height&quot;:&quot;\u003cnumber\u003e&quot;,&quot;length&quot;:&quot;\u003cnumber\u003e&quot;,&quot;weight&quot;:&quot;\u003cnumber\u003e&quot;,&quot;width&quot;:&quot;\u003cnumber\u003e&quot;},&quot;price&quot;:&quot;\u003cnumber\u003e&quot;,&quot;product&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cnumber\u003e&quot;}],&quot;statement_descriptor&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;goods&quot;,&quot;unit_label&quot;:&quot;\u003cstring\u003e&quot;,&quot;updated_at&quot;:&quot;\u003cnumber\u003e&quot;},&quot;tiers&quot;:[{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;flat_amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;up_to&quot;:&quot;\u003cstring\u003e&quot;},{&quot;amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;flat_amount&quot;:&quot;\u003cnumber\u003e&quot;,&quot;up_to&quot;:&quot;\u003cstring\u003e&quot;}],&quot;tiers_mode&quot;:&quot;volume&quot;,&quot;transform_usage&quot;:{&quot;divide_by&quot;:&quot;\u003cnumber\u003e&quot;,&quot;round&quot;:&quot;\u003cstring\u003e&quot;},&quot;trial_period_days&quot;:&quot;\u003cnumber\u003e&quot;,&quot;usage_type&quot;:&quot;metered&quot;},&quot;quantity&quot;:&quot;\u003cnumber\u003e&quot;,&quot;subscription_id&quot;:&quot;\u003cstring\u003e&quot;}],&quot;has_more&quot;:&quot;\u003cboolean\u003e&quot;,&quot;total_count&quot;:&quot;\u003cnumber\u003e&quot;,&quot;url&quot;:&quot;\u003cstring\u003e&quot;},&quot;tax_percent&quot;:&quot;\u003cnumber\u003e&quot;,&quot;trial_end&quot;:&quot;\u003cnumber\u003e&quot;,&quot;trial_start&quot;:&quot;\u003cnumber\u003e&quot;,&quot;type&quot;:&quot;payment&quot;},&quot;status&quot;:{&quot;error_code&quot;:&quot;\u003cstring\u003e&quot;,&quot;message&quot;:&quot;\u003cstring\u003e&quot;,&quot;operation_id&quot;:&quot;\u003cstring\u003e&quot;,&quot;response_code&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;\u003cstring\u003e&quot;}}