Back to blog

Solution: WHMCS 7 and Stripe Card Processor Failed payments

Yesterday evening we started receiving reports of failed/declined payments from our card payment system via Stripe,  we searched around finding some people with the same issue many of them giving up and switching to another payment processor until there is a solution.

Upon investigation in the logs of stripe it offers this explanation:

  "error": {
    "type": "invalid_request_error",
    "message": "You passed an empty string for 'statement_descriptor'. We assume empty values are an attempt to unset a parameter; however 'statement_descriptor' cannot be unset. You should remove 'statement_descriptor' from your request or supply a non-empty value.",
    "param": "statement_descriptor"

The Param “statement_descriptor” is what is written on the customer’s bank statement as to what company the payment was taken.

WHMCS ( Billing and invoice system ) allows this field to be populated dynamically using {CompanyName} {InvoiceNumber} in the statement descriptor field.   So as far as we were concerned, it should be entering the data provided in our “company name” field on the main setup page.

WHMCS billing system

We suddenly realised that the statement descriptor requires a maximum of 22 characters, looking our company name being dynamically inserted from the main settings page, it was apparent it was more than 22 characters; hence payments were being declined as a blank field.

Solution: Replacing {CompanyName} with our shortened version of the name “Rivmedia” fixes the issue. 

Something so simple, something it seems many people seem to be suffering with.

Strangely it only started happening yesterday to only a couple of clients.