Change payment method

Changed on

This endpoint allows you to change the payment method linked to the subscription for future billing attempts.

put/2023-10/subscription/{subscriptionId}/paymentMethod

Request

  • Base URL
    https://api.loopsubscriptions.com/storefront
  • URL
    https://api.loopsubscriptions.com/storefront/2023-10/subscription/{subscriptionId}/paymentMethod
  • Auth
    API key in header Authorization

Path parameters

subscriptionIdinteger required

The unique identifier for a subscription in Loop.

Request body

paymentMethodIdinteger required

The unique identifier for the payment method in Loop.

Response

200

successboolean
messagestring
codestring
pageInfounknown

Example response

{
  "success": true,
  "message": "Payment method edited on contract successfully",
  "data": {
    "id": 131,
    "type": "CustomerCreditCard",
    "status": "expiring_soon",
    "card": {
      "brand": "visa",
      "expiryYear": 23,
      "expiryMonth": 12,
      "lastDigits": "3184"
    },
    "subscription": {
      "id": 2130
    }
  },
  "code": "SUCCESS"
}

Changes

    • breaking

      the response's property type changed from no type to object for status

    • info

      api operation id change-payment-method-on-subscription removed and replaced with change-payment-method

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status