Pre-Acceptance Workflow
With a pre-acceptance integration, you'll run the the fraud check immediately after the customer's purchase attempt, but before accepting the order or serving a "Thank You" page to the customer. Under this workflow, you can serve the customer an error and give them an opportunity to change any details if the fraud check fails.
The pre-acceptance workflow is our recommended workflow for most merchants. This is generally a preferred solution because of the following:
- More secure: You don't need to send the full credit card details.
- Smoother customer experience: Customer is told at checkout if their order failed and can be given an opportunity to correct details.
- Better fraud insights: The customer may make legitimate or fraudulent changes. Seeing and analyzing these changes improves NoFraud's ability to detect fraud long-term.
Steps
Step 1: Collect customer details
Customer arrives at the checkout page to enter their details. At a minimum, NoFraud requires the following for a pre-capture integration:
- Last 4 credit card digits
- AVS Result Code
- CVV Result Code
- Billing Address
- IP Address
The full list of possible fields is available in the Transaction documentation.
For fraud check purposes, the more data collected the better, but must be balanced with optimizing for checkout completion.
Step 2: Request payment via gateway
After the customer submits their details, request payment through the credit card gateway. This may be a payment authorization or full capture depending on your business.
Step 3: Run NoFraud check
Assuming the payment request is successful, send the customer and order details to NoFraud. NoFraud will respond with a pass
, fail
, or review
decision.
If fraud check passes, you can proceed to the next step.
If fraud check fails, you should serve the customer an error. You can potentially give them an opportunity to change details and try again.
Transactions in Review
Transactions in review should be held until a final decision is made. There are two options for receiving transaction status updates:
- Listen for transaction status webhooks
- Poll the Get Transaction Status endpoint
Step 4: Accept order
Accept the order and serve the customer a "Thank You" order confirmation page. Proceed to payment capture and/or fulfillment depending on your business requirements.
Sample API Calls
Samples use the test domain apitest.nofraud.com
. Use api.nofraud.com
for production calls.
Create Transaction
See Create Transaction for full details on this API.
curl --location 'https://apitest.nofraud.com/' \ --header 'Content-Type: application/json' \ --data-raw '{ "nfToken": "YOUR_KEY_HERE", "customer": { "email": "example@email.com" }, "billTo": { "firstName": "John", "lastName": "Smith", "address": "123 Broadway Apt #1", "city": "New York", "state": "NY", "zip": "11001", "country": "US", "phoneNumber": "1112223333" }, "customerIP": "127.0.0.1", "avsResultCode": "U", "cvvResultCode": "1", "payment": { "creditCard": { "last4": "9999" } } }'
Response
{ "id": "47042736-70ba-5618-86ac-14ef3728365e", "decision": "review" }
Get Transaction Status
See Get Transaction Status for full details on this API.
curl --location 'https://apitest.nofraud.com/status/YOUR_KEY_HERE/6628666c-d198-5cfa-a892-18713a10a9cf'
Response
{ "id": "47042736-70ba-5618-86ac-14ef3728365e", "decision": "pass" }