Subscriptions: Update

Request

PATCH https://api../stores/{storeId}/subscriptions/{subscriptionId}

Parameters:

Parameters
transaction_token_idstring (UUID)
Specify the transaction token used for subscription. For example, it is used for switching other cards when the credit card’s expiration date expires.
metadatajson
Metadata associated with the subscription.

Headers:

Content-Type: application/json
Authorization: Bearer {secret}.{jwt}

Body:

curl --request PATCH \
--url https://api../stores/37ff5664-18c6-11e7-8221-ff4914d76afc/subscriptions/66598d16-18e6-11e7-9651-7fa7e8a309b1 \
--header 'Authorization: Bearer {secret}.{jwt}' \
--header 'content-type: application/json' \
--data '{
  "metadata":{
      "ServiceId": 7843568
  },
  "transaction_token_id": "81c6fd76-18ec-11e7-85f3-1bd5cafc6101"
}'

Response

Code: 200

Headers:

Content-Type: application/json

Body:

{
  "id": "66598d16-18e6-11e7-9651-7fa7e8a309b1",
  "merchant_id": "371f512c-18c6-11e7-b12b-53d631f886c5",
  "store_id": "37ff5664-18c6-11e7-8221-ff4914d76afc",
  "amount": 3350,
  "currency": "USD",
  "amount_formatted": 33.5,
  "period": "daily",
  "status": "unverified",
  "metadata": {
    "ServiceId": 7843568
  },
  "mode": "test",
  "created_on": 1491276349677
}