PayFacto API - v1.0 - Feature : 3D Secure
PayFacto API - v1.0 - Feature : 3D Secure
3D Secure (3DS) adds an extra layer of authentication to your online transactions. This page covers how to enable 3DS with Secure Hosted Checkout (SHC), how PayFacto handles the required fields automatically, and the full set of test card numbers for every 3DS scenario.
🔒
Enabling 3D Secure with SHC
To use 3D Secure with SHC, pass three additional properties in the options argument:
| Field | Description |
|---|
| purchaseAmount | A number (not a string) representing the purchase cost denominated in cents. For example, $100 would be 10000. |
| purchaseDate | A string containing the timestamp representing when the purchase took place, using the ISO 8601 format (YYYY-MM-DDTHH:mm:ss.sssZ). |
| purchaseCurrency | A string containing the ISO 4217 currency code that the transaction is in. Currently, only Canadian dollars (CAD) are supported. |
Calling SHC with the 3D Secure arguments would look similar to the following example:
JavaScript — Calling SHC with 3D Secure
const options = {
purchaseAmount: amountAsInteger,
purchaseDate: new Date().toISOString(),
purchaseCurrency: 'CAD'
};
merchantGetShcToken(shcToken => {
shc(shcToken, response => merchantProcessResponse(response), options);
});⚙️
Automatic Addition of Required Fields
When using 3D Secure, the PayFacto API will automatically include any additional required fields necessary to process a 3D Secure transaction.
ℹ️
There is no additional coding required to display these fields, regardless of which card brand is being used with 3D Secure.
To test your 3D Secure implementation, use the card numbers below to trigger each of the six possible 3DS response scenarios. All test cards share the same cardholder name, expiry date, and CVV.
✅
Frictionless Authentication without 3DS
Returns success without engaging 3D Secure at all.
| Brand | Card Number |
|---|
| Visa | 4100000000000100 |
| Mastercard | 5100000000000107 |
| Amex | 340000000000108 |
Cardholder Name: Test CardExpiry: 08/28CVV: 123 or 1234
✅
Frictionless Authentication with 3DS
Performs a 3D Secure validation and returns success without a challenge.
| Brand | Card Number |
|---|
| Visa | 4100000000600008 |
| Mastercard | 5100000000600005 |
| Amex | 340000000600006 |
Cardholder Name: Test CardExpiry: 08/28CVV: 123 or 1234
🔒
Challenge Authentication with 3DS
Displays a challenge page. Enter the password 123456 to complete authentication successfully.
| Brand | Card Number |
|---|
| Visa | 4100000000005000 |
| Mastercard | 5100000000005007 |
| Amex | 340000000005008 |
Cardholder Name: Test CardExpiry: 08/28CVV: 123 or 1234
❌
Failed Authentication with 3DS
Displays a challenge page that fails when the password 111111 is entered, simulating an authentication failure.
| Brand | Card Number |
|---|
| Visa | 4100000000300005 |
| Mastercard | 5100000000300002 |
| Amex | 340000000300003 |
Cardholder Name: Test CardExpiry: 08/28CVV: 123 or 1234
❓
Authentication Unavailable
Simulates a scenario where 3D Secure authentication is unavailable for the card.
| Brand | Card Number |
|---|
| Visa | 4100000000400003 |
| Mastercard | 5100000000400000 |
| Amex | 340000000400001 |
Cardholder Name: Test CardExpiry: 08/28CVV: 123 or 1234
Simulates a scenario where the 3D Secure authentication is rejected.
| Brand | Card Number |
|---|
| Visa | 4100000000500000 |
| Mastercard | 5100000000500007 |
| Amex | 340000000500008 |
Cardholder Name: Test CardExpiry: 08/28CVV: 123 or 1234