Barclaycard ePDQ
coming soon

Barclaycard (ePDQ)

Obtaining a Test Account

While we try our best to ensure the following details are up to date, if you run into any issues creating a test account for Barclaycard, please reach out to the Barclaycard support team for assistance with getting an account set up.

  1. Sign up for a test account with Barclaycard via their website.
  2. After logging in with your new account (and setting a new password if required), you'll land on the dashboard with a list of “Activation steps”.
  3. Select “Your payment methods” from the “Activation steps”, and then “Choose new payment methods”.
  4. Click “Add” on the “Visa” payment method.
  5. On the add screen, leave the first two options for “Do you have a contract?” and “Select an acquirer” as they are by default. Within the Acquirer specific data“ section, enter “1234567” in the “Affiliation number” text input.
  6. Press “Submit”.
  7. Once the payment type has been added, select “PM activation” in the green navigation bar.
  8. Change the radio button to “Yes” and select “Submit”.
  9. If you wish, you can also add other card payment methods like Mastercard to allow you to test with other payment card types.
  10. Click “Home” to return to the “Activation steps” and then select “Your technical settings”.
  11. Initially, all you need to do to get the account activated is to configure the SHA-IN pass phrase located in the “Data and origin verification” tab in the first group titled “Checks for e-Commerce & Alias Gateway”. This pass phrase must be alpha numeric and at least 16 characters long. This can be changed if required at a later point.
  12. Leave the options within the group titled “Checks for Barclaycard Direct Link” blank.
  13. Once you have added a SHA-IN pass phrase, select “Save”.
  14. On the “Global transaction parameters” tab, set the “Processing for individual transactions” setting to “Always online (Immediate), and press “Save”.
  15. Return to the “Home” section again, and click the new “Activate your account” option at the bottom of the “Activation steps” and activate your account.

Creating API users

Once your Barclaycard test account is configured and activated, it's now time to create a user for Foxy to use to connect to Barclaycard for payments.

  1. In the Barclaycard administration, navigate to “Configuration” > “Users”. If you don't see this option yet, ensure your account is activated, and try logging out and back into your account again.
  2. Select “New User” from the “Users” section
  3. Enter a “UserID”, “User's name”, “Email address” and “Timezone”.
  4. For the “Profile” select “Admin”
  5. Check the checkbox for “Special user for API (no access to admin.)”
  6. Enter your admin account password in the final field and click “Create”.
  7. On the following screen, you'll need to enter a password for this user. Enter your own account's password in the first field, and then the new password for the API user in the next two fields. Make note of this password as we'll need it to enter into the Foxy administration in the next section.

Connecting Barclaycard to Foxy

With your account and API user created, it's time to connect it to your Foxy store so you can start testing payments!

  1. Login to your store's Foxy administration, and head to the “payments” section.
  2. Ensure that the “Payment Servers” option is set to “Test Servers”
  3. Within the “Let customers pay with a Credit or Debit Card” section, select “Barclaycard” from the “bank card payment method” option.
  4. Into the “test pspid” field enter your Barclaycard account's PSPID value - you can find it referenced in the footer of their administration, and it will be what you specified when signing up for the test account.
  5. In the “test user” field, enter the UserID you specified when creating the API user.
  6. In the “test password” field enter the password you set for the API user.
  7. Save the payment settings.

You will also need to ensure that your store is configured to use a GBP (British Pound), as that is the currency used for the test account. To do that, head to the “template sets” section in the administration and select a locale that uses GBP such as “English locale for Britain”.


After connecting Barclaycard with Foxy - you're now ready to test it out! By default, Barclaycard will be set to provide transaction responses based on the total amount of the order. If the order total is between £0 and £9000 the transaction will be successful, or if it's between £9001 and £9999 the transaction will be declined. Any card numbers can be used, as long as you've enabled support for them in your payment methods configuration earlier.

Some example test card numbers:

  • Visa 4111 1111 1111 1111
  • MasterCard 5399 9999 9999 9999
  • American Express 3741 1111 1111 111

You can also switch the test results to be based off of the card number used, and you can do that from the Barclaycard administration. Go to “Configuration” > “Technical information” > “Test info” to alter that and see more details on test details.

Switching your Barclaycard account to production

Once you've completed your testing, you'll then need to switch your Barclaycard account into production mode so you can start taking live payments from customers. You'll need to reach out to the Barclaycard support team to discuss your account and confirm any configurations that need to be made.

Once your account is switched to production, you'll then also need to switch your Foxy payment settings to live servers. You can do that from the “Payment” section in your store's Foxy administration. If you haven't yet started your Foxy store subscription, you'll need to also do that before switching to live payment servers.

After switching to live, enter in your production Barclaycard credentials and save the payment settings. Your store is now live and ready to accept payments from customers!

Special Consideration: Prepayment Webhook

If you have 3D Secure enabled for your Barclaycard account and Foxy store, an additional trigger will occur for the prepayment webhook if enabled for your store. It will have a Foxy-Webhook-Event header of validation/3ds instead of validation/payment.

Barclaycard approach capturing payments when 3DS is enabled differently that other gateways, in that they capture the payment as soon as the 3DS process is completed, rather than simply responding that the customer was validating and allowing us to capture as a separate request.

This means that if you are using the prepayment webhook to prevent transactions from completing, you will need to return false with the validation/3ds webhook trigger too. This ultimately doesn't require any specific special handling, but be aware that there will be multiple requests to your webhook endpoint and only the first one for the validation/3ds event will block a transaction that is using 3D Secure.

Troubleshooting & Interpreting Response Codes

The data you entered is not correct. Please retry.

If you experience a gateway error of “There was an error processing your payment: The data you entered is not correct. Please retry.”, this will generally point to your gateway credentials being incorrect. Double check that the PSPID, User and Password fields are correct for the respective data in your accounts.

User Notes and Experiences

If you have tips, experience, or helpful notes related to this gateway that would benefit others, please add them below, including your name and the date. We reserve the right to edit or remove comments that don't add value to this page.

Site Tools