Tokenize

Overview

The tokenize method stores a payment method securely at the payment processor. It replaces sensitive card data with a secure token.

Business Use Case: A customer wants to save their card for faster checkout. Tokenize the card details to create a secure token.

Purpose

Scenario
Benefit

One-click checkout

No re-entry of card details

Recurring billing

Stored methods for subscriptions

PCI compliance

No raw card storage

Request Fields

Field
Type
Required
Description

payment_method

PaymentMethod

Yes

Card or wallet details

customer_id

str

No

Associate with existing customer

metadata

dict

No

Additional data

Response Fields

Field
Type
Description

payment_method_id

str

Token ID (e.g., pm_xxx)

payment_method_type

str

card, wallet, etc.

status

str

ACTIVE

status_code

int

HTTP status code

Example

SDK Setup

Request

Response

Using Tokenized Payment Methods

Next Steps

Last updated

Was this helpful?