Skip to main content
POST
/
wallet
/
cards
/
collect
Collect payment card information
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>"
}

Authorizations

x-api-key
string
header
required

Headers

x-user-id
string
required

Body

application/json
cardNumber
string
required

Card number

Pattern: ^[0-9]{12,19}$
Example:

"4242424242424242"

cardExp
string
required

Card expiration date

Pattern: ^[0-9]{2}\/[0-9]{2}$
Example:

"12/29"

cardHolder
string
required

Cardholder name

Minimum string length: 1
Example:

"John Doe"

email
string<email>
required

Billing email address

Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Example:

"john.doe@example.com"

phoneNumber
string
required

Phone number

Pattern: ^\+[1-9]\d{1,14}$
Example:

"+12125551234"

billingAddress
string
required

Billing address

Minimum string length: 1
Example:

"123 Main Street, Apt 4B"

zipCode
string
required

ZIP code

Minimum string length: 1
Example:

"10001"

cardCvv
string
required

Card CVV/CVC security code for validation

Pattern: ^[0-9]{3,4}$
Example:

"123"

city
string

Billing city

Example:

"New York"

state
string

Billing state or province

Example:

"NY"

last4Digits
string

Last 4 digits of the card

Example:

"4242"

isDefault
boolean
default:false

Whether the card is the default card

Example:

true

Response

Card collected successfully

success
boolean
required
status
string
required
message
string
required
data
any
requestId
string
id
string