Re: In App Provisioning - Allow Double Barrell First Names?

conann
Dabbler

In App Provisioning - Allow Double Barrell First Names?

I’m working on integrating the Visa Digital Enablement SDK for In-App Provisioning in my mobile app.

Based on the guide, it seems that the field should only accept alphanumeric characters without special characters but it’s unclear whether spaces are considered special characters.

Are spaces allowed in the first name when submitting the cardholders name in the nameOnAccount field for provisioning?

If not, should I be sanitising to remove spaces or is there any other way to handle multi part names?

Thanks!
2 REPLIES 2
jenn_kh
Community Moderator

Re: In App Provisioning - Allow Double Barrell First Names?

Hi conann, Thank you for reaching out. An agent will get back to you as soon as possible. Until then, if any community member knows the solution, please feel free to reply.

API_Products
Visa Developer Support Specialist

Re: In App Provisioning - Allow Double Barrell First Names?

Hey @conann,

 

For the Visa Digital Enablement SDK's In-App Provisioning, the `nameOnAccount` field typically expects alphanumeric characters. Whether spaces are allowed can be a bit unclear from the documentation, so it’s best to follow a conservative approach unless explicitly stated otherwise.

 

Recommendations

1. Check Documentation:
- Revisit the latest version of the Visa Developer documentation or any updates that might clarify the rules for special characters, including spaces.

2. Sanitize Input:
- If the documentation does not explicitly allow spaces, it is safer to sanitize the input by removing spaces or replacing them with an acceptable character (such as a hyphen).

 

Sanitizing Input Example

Here is a simple example in Python to sanitize the input by removing spaces:

```python
def sanitize_name(name):
return ''.join(e for e in name if e.isalnum())

 

Example usage
original_name = "John Doe-Smith"
sanitized_name = sanitize_name(original_name)
print(f'Sanitized Name: {sanitized_name}')
```

 

Handling Multi-Part Names

 

If you need to handle multi-part names without removing spaces, you might consider replacing spaces with a character that is allowed, like a hyphen:

```python
def handle_multi_part_name(name):
return name.replace(" ", "-")

# Example usage
original_name = "John Doe-Smith"
handled_name = handle_multi_part_name(original_name)
print(f'Handled Name: {handled_name}')
```

 

- Verify with official documentation to confirm if spaces are allowed.
- Sanitize input to remove or replace spaces if not allowed.
- Contact Visa Developer Support for definitive guidance.

 

By following these steps, you can ensure that the `nameOnAccount` field is correctly handled for In-App Provisioning.

 




Thanks,

Diana H.



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.