Creates a new payment method (currently only CARD type is supported). The payment method can be associated with a customer by providing customerId. If persist is true, customerId is required.
API key for authentication (required)
Merchant ID for identifying the merchant (required)
Payment method type (currently only CARD is supported)
CARD "CARD"
Customer ID to associate this payment method with
"123e4567-e89b-12d3-a456-426614174000"
Merchant ID (optional, defaults to global merchant ID)
"merchant_123"
Whether this is the default payment method for the customer
false
Optional nickname for the payment method
"My Visa Card"
Billing first name
"John"
Billing last name
"Doe"
Billing phone number
"+525512345678"
Billing email address
Billing address line 1
"123 Main St"
Billing address line 2
"Apt 4B"
Billing city
"Mexico City"
Billing state
"CDMX"
Billing postal code
"12345"
Billing country code (2 characters)
2"MX"
Whether to persist the payment method (requires customerId if true)
true
Payment method created successfully
Payment method ID
"123e4567-e89b-12d3-a456-426614174000"
Payment method type
"CARD"
Whether this is the default payment method
false
Creation timestamp
"2025-01-15T10:00:00.000Z"
Last update timestamp
"2025-01-15T10:00:00.000Z"
Payment method nickname
"My Visa Card"
Billing first name
"John"
Billing last name
"Doe"
Billing phone number
"+525512345678"
Billing email address
Billing address line 1
"123 Main St"
Billing address line 2
"Apt 4B"
Billing city
"Mexico City"
Billing state
"CDMX"
Billing postal code
"12345"
Billing country code
"MX"