This is a client-side JavaScript SDK method, not a REST endpoint. It has no OpenAPI spec and no request playground; the contract is documented here.
Summary
GlobalE.UpdatePaymentMethod starts the update-payment-method flow for a subscription. It loads a dynamic script, injects an iframe into a DOM container that you provide, and runs callbacks when the flow succeeds, is cancelled by the user, or fails. API source:globale.merchant.client.js (GEClient instance exposed as GlobalE).
Signature
Parameters
Callbacks
onSuccess(data)– After the customer returns from redirect, when the flow completes successfully:datais usually an object:{ statusCode, subscriptionId }— e.g.{ statusCode: "Settled", subscriptionId: "your-subscription-id" }.- In some cases
datamay still be a status string only (e.g."Settled"). Integrators should support both: iftypeof data === "object" && data !== null && data.statusCode, usedata.statusCodeanddata.subscriptionId; otherwise treatdataas the status string. onCancelation(info)–infomay be a status string (e.g.'UserCanceled').onFailure(error)–errorusually containserror.errororerror.messageand possiblyerror.details.
Callback responses
Return from redirect
- On a final status, the matching callback runs (onSuccess, onCancelation, or onFailure)
- Global‑e then redirects the customer to your return URL (
merchantReturnUrlif you supplied one, otherwiseChangePaymentMethodFormReturnUrl)
Clearing the flow
GlobalE.ClearUpdatePaymentMethod() – removes the iframe and resets the state. Use when closing the flow or switching containers.
Common errors
'subscriptionId is required'– subscriptionId was not provided.- Invalid
cultureCodeorcurrencyCode– must be non‑empty strings if provided. - Failed to initialize/execute UpdatePaymentMethod – script load or runtime error.

