Statement Descriptor Validation

117 views
Skip to first unread message

Jonathan Parker

unread,
May 22, 2015, 9:22:12 AM5/22/15
to api-d...@lists.stripe.com
Recently one of our customers had an issue regarding their statement descriptor.

When we create a payment on our customer's behalf, we call out to Stripe to get the statement descriptor from the account and then append it will some additional information from our application. The problem is through the API, there is validation to ensure that only alphanumeric characters are specified, but through the dashboard users are allowed to enter whatever they want as the statement descriptor on the account. This customer had a ' in their statement descriptor, so all of the charges were failing because we simply passed through that value in the create charge API call.

I have updated our code to handle this, but would be helpful to ensure that data entered directly into Stripe goes through the same validation as the API calls do.

Kyle Conroy

unread,
May 26, 2015, 7:45:14 PM5/26/15
to api-d...@lists.stripe.com
Jonathan,

Thanks for pointing this out! As you've discovered, statement
descriptors can't contain <>'" characters. For now, you'll want to
filter out those four characters from any statement descriptor you set
on a per-charge basis. We're making a change to ensure that new
account statement descriptors go through the same validation.

Cheers,
Kyle
> --
> You received this message because you are subscribed to the Google Groups
> "Stripe API Discussion" group.
> To post to this group, send email to api-d...@lists.stripe.com.
> Visit this group at
> http://groups.google.com/a/lists.stripe.com/group/api-discuss/.
>
> To unsubscribe from this group and stop receiving emails from it, send an
> email to api-discuss...@lists.stripe.com.

Bradley Sobie

unread,
May 20, 2016, 5:01:44 PM5/20/16
to Stripe API Discussion
Can we please fix this, it's causing lots of issues for our customers... Should take like 5 minutes

Remi J.

unread,
May 20, 2016, 5:04:46 PM5/20/16
to api-d...@lists.stripe.com
Hey Bradley,

As far as I know we already fixed this. In the dashboard, if you attempt to set a statement descriptor with such characters it would return an error. If that's not the case, I'd recommend reaching out to support directly here [1] to discuss this and provide some concrete examples where this happened.

All the best,
Remi


Bradley Sobie

unread,
May 21, 2016, 11:13:59 AM5/21/16
to Stripe API Discussion

Definitely still lets me put an apostrophe


Remi J.

unread,
May 21, 2016, 11:17:24 AM5/21/16
to api-d...@lists.stripe.com
Hey Bradley,

The UI blocks it on my end as soon as you leave that field:

Inline image 1

If that's not the case for you, that definitely looks like a bug. I'd recommend contacting support directly from our contact form [1] so that we can have a look further into what happened in your account.

All the best,
Remi

Reply all
Reply to author
Forward
0 new messages