Update Payment Method

Use this endpoint to initiate a payment method update for your subscription. On success, you receive a hosted Stripe URL to which you should be redirected to securely enter your new payment details. No card data passes through your server — the entire payment capture happens on Stripe's hosted page.

This endpoint is typically triggered in two scenarios: when you want to proactively update your card, or when payment_failed: true is returned from the Get All Subscriptions endpoint and you need to fix your billing before access is revoked.

Common use cases:
  • Failed payment recovery — When payment_failed: true is detected on your subscription, call this endpoint and follow the returned URL to update your card before your account is suspended.
  • Proactive card update — Replace an expiring card from your billing settings page before it causes a payment failure.

Authorization: Bearer YOUR_TOKEN


Expected Behavior:


  • On success, you receive a session-scoped url inside data. Follow this URL immediately — the session expires after a short period.
  • After you complete the payment method update on the hosted page, Stripe notifies the system automatically. You do not need to make any additional API calls to confirm the update.
  • If you have no active subscription, a 404 is returned with data.fields.common containing the reason.
  • If authorization fails, a 401 error will be returned.
curl -X PUT "https://api.pinghome.io/payment-cmd/v1/payment-method" \
-H 'Authorization: Bearer YOUR_TOKEN'
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).