Flow

  • To create a transaction, the user must post a request (see “POST request” for the full request body)
  • This request is then sent to the service provider
  • A response will be generated according to the service provider’s decision, either enforcing 3DS* or frictionless**


* Enforced 3DS will generate a link to complete the 3DS challenge.

** Frictionless will skip the 3DS challenge

Parameters

Parameter

Type

Required

Description

amount

number

Yes

Transaction Amount

currency

string

Yes

ISO 3 Currency Code

action

string

Yes

Enum: “Authorize”, “Purchase”

statementDescriptor

string <= 35

No

An optional billing descriptor displayed on the account owner’s statement

description

string <= 150

No

Transaction description

reference

string <= 40

No

Merchant reference

ipAddress

string <= 45 characters

Yes

Consumer’s IP Address

userDefinedField1 

string <= 100 characters 

No

No User defined field

userDefinedField2

string <= 100 characters 

No

No User defined field

userDefinedField3

string <= 100 characters 

No

No User defined field

successUrl

string <= 255 characters 

Yes

For redirect payment methods, this overrides the default success redirect URL configured on your account

cancelUrl

string <= 255 characters 

Yes

For redirect payment methods, this overrides the default cancel redirect URL configured on your account

failureUrl

string <= 255 characters 

Yes

For redirect payment methods, this overrides the default failure redirect URL configured on your account

“customer” object

firstName

string

Yes

First name

lastName

string

Yes

Last name

email

string

Yes

Email

phone

string

Yes

Phone number

accountReference

string

Yes

Account Reference

category

string

No

Account category

address

object

Yes

Customer Address (including streetAddress, city, postcode, country & state)

“source” object

paymentMethod

string

Yes

example: “VISA”

holder

string

Yes

Account holder name and surname

cardNumber

string

Yes

Card number

expiryMonth

number

Yes

Card expiry month

expiryYear

number

Yes

Card expiry year

cvc

number

Yes

Card 3 digit CVC

billingAddress

object

Yes

Customer Address (including streetAddress, city, postcode, country & state)

3DS Parameters (Device data)

Parameter

Type

Required

Description

browserAcceptHeader

string <= 255 characters

Yes

Exact content of the HTTP accept headers as sent to the 3DS Requestor from the Cardholder’s browser.

browserLanguage

string <= 8 characters

Yes

Value representing the browser language as defined in IETF BCP47. The value is limited to 1-8 characters. Value is returned from navigator language property.

browserColorDepth

string <= 2 characters

Yes

Value representing the bit depth of the color palette for displaying images, in bits per pixel. Obtained from Cardholder browser using the screen color depth property.

browserScreenHeight

string <= 255 characters

Yes

Total height of the Cardholder’s screen in pixels. Value is returned from the screen height property.

browserScreenWidth

string <= 255 characters

Yes

Total width of the Cardholder’s screen in pixels. Value is returned from the screen width property.

browserTimezone

string <= 255 characters

Yes

Time difference between UTC time and the Cardholder browser local time, in minutes. The field is limited to 1-5 characters where the value is returned from the getTimezoneOffset() method.

browserUserAgent

string <= 255 characters

Yes

Exact content of the HTTP user-agent header. The field is limited to maximum 2048 characters.

POST request

Payment method: Visa, Mastercard

POST https://api.quaife.net/v1/transactions/

JSON Request object
						

{
“amount”:50,
“currency”:”EUR”,
“action”:”Purchase”,
“customer”:{
“firstName”: “{{$randomFirstName}}”,
“lastName”: “{{$randomLastName}}”,
“email”: “{{$randomExampleEmail}}”,
“phone”: “+234323423”,
“accountReference”:”acc-0007″,
“category”: “gaming”
},
“source”:{
“paymentMethod”: “VISA”,
“holder”: “{{$randomFirstName}} {{$randomLastName}}”,
“cardNumber”:”4111111111111111″,
“expiryMonth”: 1,
“expiryYear”: 26,
“cvc”: “123”,
“billingAddress”: {
“streetAddress”:”Street Address”,
“city”: “Boston”,
“postcode”:”01010″,
“country”:”US”
},
“ThreeDsFields”:{
“browserAcceptHeader”:”text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8″,
“browserLanguage”:”en-US”,
“browserColorDepth”:”24″,
“browserScreenHeight”:”942″,
“browserScreenWidth”:”1920″,
“browserTimezone”:”-120″,
“browserUserAgent”:”Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36″
}
},
“statementDescriptor”:”Purchase my-shop.com”,
“description”:”T-Shirt XXL”,
“reference”:”ORD24234″,
“ipAddress”:”43.248.24.130″,
“userDefinedField1”: “blah1”,
“userDefinedField2”: “blah2”,
“userDefinedField3”: “blah3”,
“successUrl”:”https://demo.turnstiles.io/home/success”,
“cancelUrl”:”https://demo.turnstiles.io”,
“failureUrl”:”https://demo.turnstiles.io/home/cancel”
}

Response types

Response Type 1 enforced 3DS

The redirect response type will be returned as a response to a 3DS challenge.

JSON Response Object

{
“id”: “trn_lsbt1or4xy”,
“status”: “Pending”,
“amount”: 100.0,
“currency”: “EUR”,
“source”: {
“id”: “src_u8l7s06px5”,
“paymentMethod”: “VISA”,
“cardNumber”: “510108xxxxxx0009”,
“holder”: “Max Muster”
},
“customer”: {
“id”: “cus_wlydwqmn59”,
“firstName”: “Max”,
“lastName”: “Muster”,
“email”: “max@example.com”
},
“created”: “2020-12-18T15:24:13.8524886Z”,
“links”: [
{
“href”: “https://quaife.net/3d-transactions/allnl1ic9krs2smp6ywmcqwlard9o77dk107zpno”,
“rel”: “redirect”,
“method”: “GET”
}
],
“nextAction”: {
“type”: “RedirectToUrl”
}
}

Response type 2 (Frictionless response)

The redirect response will not return a redirect URL as the transaction would be frictionless.

JSON Response Object

{
“id”: “trn_r38h6juqze”,
“status”: “Pending”,
“amount”: 50.0,
“currency”: “EUR”,
“source”: {
“id”: “src_8zyzdj4cbi”,
“paymentMethod”: “VISA”,
“cardNumber”: “411111xxxxxx1111”,
“holder”: “Trace Hills”
},
“customer”: {
“id”: “cus_axbygy9zii”,
“firstName”: “Stewart”,
“lastName”: “Cartwright”,
“email”: “Mxxxxxxxxxxxxx5@example.net”
},
“created”: “2022-09-19T12:46:34.6992793Z”,
“links”: []
}

MERCHANT

Should you be interested in becoming a merchant, then please fill out the short form below and one of our specialists will be in touch shortly.

SIGN UP

We are delighted that you are considering using Quaife as your payment partner. Fill in the form below & let’s get started.