Tokenize
Overview
The tokenize method stores a payment method securely.
Request Fields
Field
Type
Required
Description
paymentMethod
PaymentMethod
Yes
Card details
customerId
String
No
Customer ID
Response Fields
Field
Type
Description
paymentMethodId
String
Token ID
status
String
ACTIVE
Example
Map<String, Object> card = new HashMap<>();
card.put("cardNumber", Map.of("value", "4242424242424242"));
card.put("cardExpMonth", Map.of("value", "12"));
card.put("cardExpYear", Map.of("value", "2027"));
Map<String, Object> request = new HashMap<>();
request.put("paymentMethod", Map.of("card", card));
Map<String, Object> response = paymentMethodClient.tokenize(request);Last updated
Was this helpful?

