I’m using the Web Payments SDK to take card payments for my small business. I successfully integrated the sdk and am currently taking payments.
However, the standard setup for taking card payments does not come with any form for taking Billing Contact info of the customer. I could easily make the form myself, but after looking through the Web Payments SDK reference documents, I cannot find how to add billing info to the Token that I generate for cards.
-
The card payment method tokenize returns a TokenResult.
-
Nested inside of the TokenResult’s properties is TokenResults.details.card which is of type CardDetails. The CardDetails object has a “billing” property of type “Contact”.
-
The billing property documentation suggests that “billing information is given during tokenization” and that if it is not provided during tokenization, that only the postal code will be used for billing information. This is congruent with my experience except the object hierarchy is a little different for my TokenResult than what is documented.
-
The tokenize method makes no reference of any parameters where I could add this billing information. There exists an object, CardTokenOptions, with a single property (billing of type Contact) that can serve as an optional parameter to tokenize to provide billing contact info. This seems like exactly what I would want to use, but again the tokenize method makes no mention of this optional parameter.
Is the documentation for the tokenize not up to date? Or is adding billing contact info for card payments not finished for the Web Payments SDK? I’ve tried just slapping an object with the same properties as CardTokenOptions into the tokenize method. I don’t get an error, but I also don’t get any different result than when I don’t include it.
Or is there a completely different way to add this info to the card payment that I am not aware of? I do not want to create customers using the Customer API. That would be overkill for my web app.