Everything you need to know about the descriptor property in Paylike
npm install --save @paylike/descriptor
var descriptor = require('@paylike/descriptor');
descriptor.isValid('paylike.io'); // true
descriptor.isValid('£'); // false
descriptor.errorMessage
descriptor.maxLength
descriptor.regex
var descriptor = require('@paylike/descriptor');
var $input = document.querySelector('input.descriptor');
$input.pattern = descriptor.regex.source;
$input.maxLength = descriptor.maxLength;
The descriptor is shown on a credit card bill, a bank statement or in an online banking account as the text accompanying the charged amount. Learn more about the descriptor on our website.
-
It can only have a length of 22 or less
-
It can only contain ASCII printable characters
a-z A-Z 0-9 ! # $ % & ( ) * + , - . / : ; < = > ? @ [ ] ^ _ ` { | } ~
A descriptor is set in the following places:
- On your merchant account
- On a transaction for the reservation
- On each capture of a transaction
- On each refund of a transaction
The descriptor on the account (1) acts as a default if you do not supply a descriptor for the transaction (2).
If you omit the descriptor for a capture (3) or refund (4) it will default to that on the transaction (2).
As such, only the merchant account's descriptor is mandatory.