Skip to main content

tokenize Method

Overview

The tokenize method stores a payment method securely at the processor.

Request Fields

FieldTypeRequiredDescription
paymentMethodPaymentMethodYesCard details
customerIdstringNoCustomer association

Response Fields

FieldTypeDescription
paymentMethodIdstringToken ID
statusstringACTIVE

Example

$request = [
'paymentMethod' => [
'card' => [
'cardNumber' => ['value' => '4242424242424242'],
'cardExpMonth' => ['value' => '12'],
'cardExpYear' => ['value' => '2027']
]
]
];
$response = $paymentMethodClient->tokenize($request);