ACME Payments Fraud Shield Javascript SDK

Modified on Wed, 24 Apr at 8:33 PM

ACME Fraud Shield is your key defense against bad actors when it comes to protecting your ticketing and events-based business from fraud. ACME Payments utilizes best-in-class technology and decisions on over 150 data signals in real-time to ensure that your customers have a safe and easy checkout experience. Shift your transactional risk liability and protect your online transactions today.

ACME Seller account required for API key access — get started today at sales@acmepayments.com.


Installation

NOTE: If you're migrating some of your merchants over from our previous library @acmeticketing/payment-sdk you should review our migration steps.

We've included a test page HTML template to get you started.

ES Module

  • Intended for use with modern bundlers like webpack.
  • This is the recommended approach and will provide the best developer experience.
npm install @acmepayments/fraud-shield

UMD

UMD builds can be used directly in the browser via a <script> tag. Manually add the index.umd.js script tag to the <head> of your site.

<!-- Somewhere in your site's <head> -->
<script src="https://unpkg.com/@acmepayments/fraud-shield@1.0.0/index.umd.js" async></script>

Usage (ES Module)

All of the examples also apply to the UMD version but instead of importing our library as an ES Module it will be available under the global ACME object.

const acmeFraudShield = window.ACME.ACMEFraudShield.create({
  mid: 'your_mid', // Use your provided merchant identification number (MID)
  publishableKey: 'your_publishable_key', // Use your provided publishable
});


Handle Decisioning Data Session

Required data fields to properly decision. Insufficient data may cause improper consumer identification or cause unnecessary friction in the transaction, forcing the user to return and retry.

In release 11.35.1  the  requirements as we understand some venues have optimized less data as part of checkout flows.   However, this may cause additional friction when it comes to identifying card owners to the card issuers.  It is recommended to provide as much data as possible to ensure the least friction.


import { ACMEFraudShield } from '@acmepayments/fraud-shield';

const acmeFraudShield = ACMEFraudShield.create({
  mid: 'your_mid',
  publishableKey: 'your_publishable_key',
});

try {
  const result = await acmeFraudShield.handle3DSSession({
    amount: '',  //string, required
    currencyCode: '840', // ISO 4217 numeric
    externalId: '',  //string, optional
    billingAddress1: '',  //string, optional
    billingAddress2: '', //string, optional
    billingCity: '',  //string, optional
    billingState: '', //string, optional
    billingCountryCode: '', // ISO 3166-1 numeric, optional
    billingFirstName: '', //string, required
    billingLastName: '', //string, required
    billingPostalCode: '', //string, required
    billingPhone: '', //string, optional
    cardExpMonth: '', //string, required
    cardExpYear: '', //string, required
    cardNumber: '', //string, required
    email: '', //string, required

    // This allows you to pass a custom container for the stepup iframe, it will default to `document.body`
    // container: {
    //   selector: () => document.querySelector('...')
    // }
  });
} catch (error) {
  // handle error
}


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article