Last updated

Post-Acceptance Workflow

With a post-acceptance integration, you'll run the fraud check after requesting payment and accepting the order. If the fraud check fails, you should cancel the order and contact the customer.

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:

  • Email
  • 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: Accept order

Assuming the payment request is successful, serve the customer a "Thank You" order confirmation page or some kind of positive response.

Step 4: Run NoFraud check

Assuming the transaction is successful, send the customer and order details to NoFraud using the Create Transaction endpoint. NoFraud will respond with a pass, fail, or review decision.

If fraud check passes, you can proceed with capturing the payment and/or fulfilling the order depending on your business requirements.

If fraud check fails, you should void/refund the payment, cancel the order, and contact the customer. All this must happen before fulfillment.

Transactions in Review

Transactions in review should be held until a final decision is made. There are two options for receiving transaction status updates:

  1. Listen for transaction status webhooks
  2. Poll the Get Transaction Status endpoint

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://api.nofraud.com/status/YOUR_KEY_HERE/6628666c-d198-5cfa-a892-18713a10a9cf'

Response

{
    "id": "47042736-70ba-5618-86ac-14ef3728365e",
    "decision": "pass"
}