v1

latestOpenAPI 3.0.02026-07-26167441.9 MB

Update Subscription

patch/subscriptions/{id}

Path parameters

idstring required

The unique identifier of the subscription.

Request body

namestring

The subscription plan name (MAX 255; MIN 3).

descriptionstring

The subscription plan description (MAX 255; MIN 3).

account_idstring

The unique identifier of the account that will have the subscription plan available to use (MAX 64 ; MIN 36).

merchant_referencestring

Identification of the subscription plan (MAX 255; MIN 3).

soft_descriptorstring

Statement descriptor shown on the cardholder's bank statement. Updating it changes the descriptor applied to subsequent rebills generated by the subscription engine. Length and formatting limits vary by provider (for example, Unlimit truncates to 22 characters and Airwallex to 30). Worldpay does not read this field; it builds the statement narrative from payment_description instead.

countrystring

The subscription's country.

Response

200

idstring
namestring
account_idstring
countrystring
descriptionstring
merchant_referencestring
soft_descriptorstring
statusstring
{"stackTrail":"paths:/subscriptions/{id}:patch:responses:200:content:application/json:schema:properties:metadata","oasType":"schema","type":"unknown"}
created_atstring
updated_atstring

Example response

{
  "id": "0c7fed3e-ee0d-4d34-9547-778be4ec0798",
  "name": "Test Subscription",
  "account_id": "493e9374-510a-4201-9e09-de669d75f256",
  "country": "US",
  "description": "Subscription Test",
  "merchant_reference": "subscription-ref-merchant-AA01",
  "soft_descriptor": "ACME SUBSCRIPTION",
  "status": "ACTIVE",
  "amount": {
    "currency": "USD",
    "value": 15000
  },
  "frequency": {
    "type": "MONTH",
    "value": 1
  },
  "billing_cycles": {
    "total": 12,
    "current": 1,
    "next_at": "2024-09-30T12:04:23.265393Z"
  },
  "customer_payer": {
    "id": "a1d3b664-e32a-4508-9da1-9ede3e62a60c"
  },
  "payment_method": {
    "type": "CARD",
    "vaulted_token": "d4aa3586-def2-4705-b7cd-fe064bb764e6"
  },
  "availability": {
    "start_at": "2024-09-30T12:04:23.265393Z"
  },
  "created_at": "2024-09-30T12:04:23.265372Z",
  "updated_at": "2024-09-30T12:04:23.265372Z"
}