SAQ-AEP Reference
Here you can find all needed methods and respective parameters to further enrich your checkout workflow for SAQ-AEP solution.
All methods should be called on PayEngine object (e.g PayEngine.desiredMethod(parameters)).
createPaymentInstrument
Receives a payment identifier from the Bridge API based on the given credit card data.
Name | Mandatory | Type | Default | Description |
---|---|---|---|---|
type | YES | String | N/A | The requested payment instrument type. Possible values are 'creditcard' or 'sepa'. It's recommended to use PayEngine.userVariables.paymentInstrumenTypes definitions. |
paymentData | YES | Object | N/A | All the raw payment data. If type is credit card: 'cardNumber', 'verification', 'expiryMonth', expiryYear' and 'cardHolder' If type is SEPA: 'iban' and 'bic', 'bankName', 'accountHolder' Fore more information please refer to the API definition of the the paymen-instruments endpoint. |
mpid | NO | String | N/A | Unique identifier/slug provided by the merchant, can benull |
callback | YES | function | N/A | Custom function which should handle the async responce from the Bridge API |
validation methods
The Bridge API provides various validation methods. They give the merchant a handy tool to validate the user input and can be attached to various events like blur, onkeydown, etc.
All this checks are always applied when the function
PayEngine.createPaymentInstrument()
is called.
validateCardNumber
Validates the card number. Returns empty object on success or array of errors on failure.
Name | Mandatory | Type | Default | Description |
---|---|---|---|---|
value | YES | String | N/A | The 16 to 19 number sequence on the front side of the card |
getCardType
Returns the type of the card, for example, Visa, MasterCard, JBC, etc.
Name | Mandatory | Type | Default | Description |
---|---|---|---|---|
value | YES | String | N/A | The 16 to 19 number sequence on the front side of the card |
validateVerification
Validates the verification code. Returns empty object on success or array of errors on failure.
Name | Mandatory | Type | Default Value | Description |
---|---|---|---|---|
value | YES | String | N/A | The 3 to 4 number sequence on the back side of the card |
ccNumberOrType | YES | String | N/A | The card type, e.g. VISA, MasterCard, JBC, etc. |
validateCardHolder
Validates the name on the card. Returns empty object on success or array of errors on failure.
Name | Mandatory | Type | Default Value | Description |
---|---|---|---|---|
value | YES | String | N/A | A sequence of characters on the front side of the card |
validateExpiry
Validates the name on the card. Returns empty object on success or array of errors on failure.
Name | Mandatory | Type | Default Value | Description |
---|---|---|---|---|
expiryYear | YES | String | N/A | 2-digits number representing the year |
expiryMonth | YES | String | N/A | 2-digits number representing the month |
validateIban
Validates the given IBAN. Returns empty object on success or array of errors on failure.
Name | Mandatory | Type | Default Value | Description |
---|---|---|---|---|
value | YES | String | N/A | The bank account IBAN |
validateBic
Validates the given BIC. Returns empty object on success or array of errors on failure.
Name | Mandatory | Type | Default Value | Description |
---|---|---|---|---|
value | YES | String | N/A | The bank account BIC/SWIFT |
validateBankName
Validates the given Bank Name. Returns empty object on success or array of errors on failure.
Name | Mandatory | Type | Default Value | Description |
---|---|---|---|---|
value | YES | String | N/A | A sequence of characters |
validateAccountHolder
Validates the name of the account holder. Returns empty object on success or array of errors on failure.
Name | Mandatory | Type | Default Value | Description |
---|---|---|---|---|
value | YES | String | N/A | A sequence of characters |