Transaction

To request a recommendation for the transaction, use query parameter to specify the pspBeforeAuth checkpoint: checkpoint=pspBeforeAuth

Jump to Response (200)

Jump to Response (400)

POST api.ravelin.com/psp/transaction

The address of the cardholder, as used to pass AVS checks. It is common to have fewer location details for this address, but provide what you have.

Show definition
customer object

The customer instigating this transaction, if available.

Show definition
device object

The customer's phone, tablet or computer used to trigger this update to the transaction. Do not include device information if the device is known to be a shared device, for example an in-store terminal.

Show definition
paymentMethod object

A primary payment method to be charged in completing the checkout process.

Show definition

The delivery or drop-off location of the order.

Show definition
threeds object

This object describes the result of 3DS authentication if attempted.

Show definition
timestamp integer required

A Unix timestamp preferably as an integer count of milliseconds since 1970-01-01T00:00 UTC (nanoseconds are also accepted).

transaction object

A transaction is an attempt to charge a payment method or refund money to a payment method. When charging a payment method funds need to be authorised and then captured for payment. Authorisation and capture may take place in one step, or authorisation can take place well in advance of capture.

In some situations the authorised amount can be updated over time. Equally the captured amount can be incremented.

To support this you can send multiple updates to the same transaction, and ask for fraud scoring at any point within the transaction lifecycle.

Show definition
POST https://api.ravelin.com/psp/transaction HTTP/1.1
Authorization: token ...
Content-Type: application/json

{
  "billingAddress": {
    "additional": "Prestbury",
    "addressee": "John Smith",
    "country": "GBR",
    "locality": "Macclesfield",
    "postalCode": "SK10 4JQ",
    "region": "Cheshire",
    "source": "E_WALLET",
    "street1": "Flat 16",
    "street2": "7 Acacia Avenue"
  },
  "customer": {
    "customerId": "string",
    "email": "sales@ravelin.com",
    "telephone": "+16045555555"
  },
  "device": {
    "deviceId": "string",
    "ipAddress": "81.152.92.84",
    "lang": "en-US",
    "manufacturer": "apple",
    "model": "iPhone15,3",
    "os": "ios",
    "type": "phone",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
  },
  "paymentMethod": {
    "countryIssued": "GBR",
    "eWallet": "applepay",
    "expiryMonth": 7,
    "expiryYear": 2024,
    "iin": "454303",
    "instrumentId": "fp_abc123",
    "issuer": "rabobank",
    "lastFour": "0001",
    "methodType": "card",
    "nameOnCard": "John Smith",
    "prepaid": false,
    "scheme": "visa"
  },
  "shippingAddress": {
    "additional": "Prestbury",
    "addressee": "John Smith",
    "country": "GBR",
    "locality": "Macclesfield",
    "postalCode": "SK10 4JQ",
    "region": "Cheshire",
    "source": "E_WALLET",
    "street1": "Flat 16",
    "street2": "7 Acacia Avenue"
  },
  "threeds": {
    "challengeCancel": "01",
    "deviceChannel": "01",
    "endTime": 1512828989826,
    "liabilityShifted": true,
    "requestorChallengeInd": "01",
    "startTime": 1512828988826,
    "transStatus": "Y",
    "transStatusReason": "01",
    "version": "2.2.0",
    "whiteListStatus": "Y",
    "whiteListStatusSource": "01"
  },
  "timestamp": 1667387532297,
  "transaction": {
    "acquirerBin": "454303",
    "acquirerCountryCode": "GBR",
    "acquirerId": "adyen",
    "amount": 1337,
    "arn": "string",
    "avsResultCode": {
      "postalCode": "STRONG_MATCH",
      "street": "STRONG_MATCH"
    },
    "currency": "GBP",
    "cvvResultCode": "PASS",
    "declineCode": "LOST_OR_STOLEN",
    "gateway": "braintree",
    "gatewayReference": "string",
    "mcc": "string",
    "merchantCountryCode": "GBR",
    "merchantName": "string",
    "mid": "string",
    "parentTransactionId": "string",
    "partial": false,
    "stepId": "string",
    "success": true,
    "transactionId": "string",
    "type": "auth"
  }
}

Response (200)

data object

Holds information about Ravelin's recommendation for this transaction if requested.

Show definition
message string optional

If an error has occurred, a description of the error.

status integer optional

HTTP response status code.

timestamp integer optional

UNIX timestamp when Ravelin finished handling the request

HTTP/1.1 200 OK
Content-Type: applicaton/json

{
  "data": {
    "action": "ALLOW",
    "rules": {
      "passiveAction": "PREVENT",
      "triggered": [
        {
          "action": "REVIEW",
          "description": "Psp.secondsSinceEmailFirstSeen is less than 200.",
          "ruleId": 14384,
          "ruleVersion": 7,
          "state": "active"
        }
      ]
    },
    "score": 76,
    "scoreId": "b4a88559-5090-44fb-8a31-eff8a00a79dd",
    "transactionId": "6cbe7636-3c15-45e8-bf29-2f010ae829bf"
  },
  "status": 200,
  "timestamp": 1512828988826
}

Response (400)

message string optional

A text description of the problem that triggered the error

status integer optional

HTTP response status code.

timestamp integer optional

UNIX timestamp when Ravelin finished handling the request

traceId string optional

A unique identifier for the request

HTTP/1.1 200 OK
Content-Type: applicaton/json

{
  "data": {
    "action": "ALLOW",
    "rules": {
      "passiveAction": "PREVENT",
      "triggered": [
        {
          "action": "REVIEW",
          "description": "Psp.secondsSinceEmailFirstSeen is less than 200.",
          "ruleId": 14384,
          "ruleVersion": 7,
          "state": "active"
        }
      ]
    },
    "score": 76,
    "scoreId": "b4a88559-5090-44fb-8a31-eff8a00a79dd",
    "transactionId": "6cbe7636-3c15-45e8-bf29-2f010ae829bf"
  },
  "status": 200,
  "timestamp": 1512828988826
}

Feedback