Skip to main content
POST
Change External Subscription Payment Method
Use this endpoint with Stripe Billing subscriptions to switch a subscription to another vaulted payment method of the same customer.
No payment is madeYuno does not charge the customer and does not run a $0 verification or 3DS. Yuno sets the new payment method as the subscription’s default in Stripe, and the next renewals charge it.

Request

The X-Idempotency-Key header is required. Replaying the same key with the same request returns the first result. Sending the payment method the subscription already charges returns 200 and changes nothing. This API is enabled per account. Contact your Key Account Manager to request access.

Errors

Authorizations

public-api-key
string
header
required
private-secret-key
string
header
required

Headers

X-Idempotency-Key
string
required

Unique key for this change, for example a UUID. Required: a request without it returns 400 INVALID_PARAMETERS. Replaying the same key with the same request returns the result of the first request. Reusing a key for another subscription or payment method returns 400 INVALID_PARAMETERS. To retry after a 502, send a new key.

Path Parameters

external_subscription_id
string
required

The ID of the subscription in the billing platform, for example the Stripe subscription ID (sub_...). Between 3 and 255 characters.

Required string length: 3 - 255

Body

application/json
account_id
string<uuid>
required

The unique identifier (UUID) of the Yuno account onboarded to the billing bridge.

Example:

"9104911d-5df9-429e-8488-ad41abea1a4b"

customer_payer
object
required

The customer who owns the subscription and the payment method.

vaulted_token
string<uuid>
required

The vaulted token (UUID) of one of the customer's enrolled payment methods. The subscription charges it from now on.

Example:

"2deff5c9-da62-4888-8f05-df76ab2967a5"

Response

The subscription now uses the payment method in vaulted_token. Also returned, with no change, when that payment method is the one the subscription already uses.

external_subscription_id
string

The ID of the subscription in the external billing platform.

account_id
string<uuid>

The Yuno account ID from the request.

customer_payer
object
vaulted_token
string<uuid>

The vaulted token the subscription charges from now on.