PurseHeadlessCheckoutToken
Represents a saved payment token in the Purse checkout system.
Tokens are secure references to saved payment methods like stored credit cards or digital wallet accounts.
Example
await token.edit({ name: 'Personal Card' });
await token.delete();
Extends
Extended by
Properties
additionalAssets
additionalAssets: CardSchemeAsset[];
Additional assets associated with this payment item, primarily card scheme logos.
For credit card methods with vault support, this contains one entry per supported
card scheme (e.g. Visa, Mastercard, CB). For all other payment methods the array
is empty.
Each asset provides a CDN URL and a human-readable label suitable for display and
accessibility purposes.
Example
{method.additionalAssets.map(asset => (
<img key={asset.url} src={asset.url} alt={asset.label} />
))}
Inherited from
PurseHeadlessCheckoutPaymentItemBase.additionalAssets
disabled
disabled: Readable<DisabledState | null>;
Indicates if the payment token is disabled with an error code and message
iconUrl
Absolute URL of the payment method icon on the Purse CDN.
The URL is stable and environment-aware (sandbox vs production).
The icon is an SVG file that respects the brand guidelines of the
payment partner. It can be used directly in an <img> tag or as
a CSS background image without any further processing.
Example
<img src={method.iconUrl} alt={method.method} />
Inherited from
PurseHeadlessCheckoutPaymentItemBase.iconUrl
Unique identifier of the payment method
Examples
Inherited from
PurseHeadlessCheckoutPaymentItemBase.id
isSecondary
Indicates if the payment method is a secondary mean of payment
Inherited from
PurseHeadlessCheckoutPaymentItemBase.isSecondary
maxAmount
maxAmount: number | null;
Maximum amount to use the payment method
Inherited from
PurseHeadlessCheckoutPaymentItemBase.maxAmount
method
Type of payment method, it can be a card, a wallet, a bank transfer, etc.
Examples
Inherited from
PurseHeadlessCheckoutPaymentItemBase.method
minAmount
minAmount: number | null;
Minimum amount to use the payment method
Inherited from
PurseHeadlessCheckoutPaymentItemBase.minAmount
name
User-friendly name for the token, provided by the user during registration or by the payment partner.
This name is used for display purposes in the UI to help users identify their saved payment methods.
partner
Partner associated with the payment method
Examples
Inherited from
PurseHeadlessCheckoutPaymentItemBase.partner
type
type: "token" | "temporary_token";
Overrides
PurseHeadlessCheckoutPaymentItemBase.type
Methods
delete()
Delete the token from the user's wallet
Returns
Promise<void>
Throws
Example
Inherited from
PurseHeadlessCheckoutEditable.delete
edit()
edit(payload): Promise<void>;
Edit the token's name
Parameters
| Parameter | Type | Description |
|---|
payload | { name: string; } | - |
payload.name | string | - |
Returns
Promise<void>
Throws
Example
token.edit({ name: 'New Name' });
Inherited from
PurseHeadlessCheckoutEditable.edit