I would like to use one input field for card holder name instead of two inputs for first name and last name. How should I split the input from one card holder name into first and last name? Is there an alternative solution to this problem?
If you're using the API, it's up to you to decide how you want to split it. Matching the card holder name exactly is not crucial for the approval of the transaction. You can split it on the first whitespace character or split it on the last space. Just make sure you have validations to enforce having at least 2 names in the input field.