curl --request POST \
--url https://api.henrylabs.ai/v0/wallet/cards/collect \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-user-id: <x-user-id>' \
--data '
{
"cardNumber": "4242424242424242",
"cardExp": "12/29",
"cardHolder": "John Doe",
"email": "john.doe@example.com",
"phoneNumber": "+12125551234",
"billingAddress": "123 Main Street, Apt 4B",
"zipCode": "10001",
"cardCvv": "123",
"city": "New York",
"state": "NY",
"last4Digits": "4242",
"isDefault": true
}
'{
"success": true,
"status": "<string>",
"message": "<string>",
"data": "<unknown>",
"requestId": "<string>",
"id": "<string>"
}Store a user’s payment card information securely
curl --request POST \
--url https://api.henrylabs.ai/v0/wallet/cards/collect \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--header 'x-user-id: <x-user-id>' \
--data '
{
"cardNumber": "4242424242424242",
"cardExp": "12/29",
"cardHolder": "John Doe",
"email": "john.doe@example.com",
"phoneNumber": "+12125551234",
"billingAddress": "123 Main Street, Apt 4B",
"zipCode": "10001",
"cardCvv": "123",
"city": "New York",
"state": "NY",
"last4Digits": "4242",
"isDefault": true
}
'{
"success": true,
"status": "<string>",
"message": "<string>",
"data": "<unknown>",
"requestId": "<string>",
"id": "<string>"
}Card number
^[0-9]{12,19}$"4242424242424242"
Card expiration date
^[0-9]{2}\/[0-9]{2}$"12/29"
Cardholder name
1"John Doe"
Billing email address
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$"john.doe@example.com"
Phone number
^\+[1-9]\d{1,14}$"+12125551234"
Billing address
1"123 Main Street, Apt 4B"
ZIP code
1"10001"
Card CVV/CVC security code for validation
^[0-9]{3,4}$"123"
Billing city
"New York"
Billing state or province
"NY"
Last 4 digits of the card
"4242"
Whether the card is the default card
true
Was this page helpful?