OneBasket

Update the payment method of several subscriptions

POST
/subscriptions/subscriptions/update-payment-method

Changes the saved payment method of several subscriptions of the contact in one request. See Update the payment method for how to obtain the signed payment method id.

The response has one result for each subscription id in the request. The request returns 200 even when some subscriptions could not be updated, so check updated on every result.

Authorization

BearerAuth ApiKeyAuth
AuthorizationBearer <token>

In: header

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/subscriptions/subscriptions/update-payment-method" \  -H "Content-Type: application/json" \  -d '{    "signedPaymentMethodId": "string",    "subscriptionIds": [      "d7c6653c-7b30-49bd-a65d-75dd2b114541"    ]  }'
[  {    "subscriptionId": "d079718b-ff63-45dd-947b-4950c023750f",    "updated": true  }]