QuadPay

QuadPay Integration

Welcome! Integrating QuadPay into your online store is straightforward. Here you'll find comprehensive guides and documentation to support integrating QuadPay into your site as quickly as possible. Let's jump right in!

Guides
Suggest Edits

/configuration

Retrieves Merchant Configuration

 
gethttps://api.quadpay.com/configuration
curl -X get https://api.quadpay.com/configuration 
  -H 'Accept: application/json' 
  -H 'Authorization: Bearer [access_token]'
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
  "minimumAmount": 50,
  "maximumAmount": 950,
  "deferFundsCapture": true
}
 

Response Data Types

Key
Value Data Type

minimumAmount

decimal, maximum of 18 digits, including at most 2 decimal places

maximumAmount

decimal, maximum of 18 digits, including at most 2 decimal places

deferFundsCapture

boolean

Suggest Edits

/order

Creates Order in QuadPay

If the merchant is configured with deferFundsCapture set to false, the entire order amount will be Captured immediately.

If this configuration is set to true, you are required to manually call the /capture endpoint when you want funds to be released.

 
posthttps://api.quadpay.com/order
curl -X post https://api.quadpay.com/order
  -H 'content-type: application/json' 
  -H 'authorization: Bearer [access_token]'
  -d '{
  "amount": 105.00,
  "consumer": {
    "phoneNumber": "9175551234",
    "givenNames": "Alycia",
    "surname": "Washington",
    "email": "alycia.washington@example.com"
  },
  "billing": {
    "addressLine1": "123 Main St",
    "addressLine2": "Apt 3",
    "city": "New York",
    "postcode": "10001",
    "state": "NY"
  },
  "shipping": {
    "addressLine1": "123 Main St",
    "addressLine2": "Apt 3",
    "city": "New York",
    "postcode": "10001",
    "state": "NY"
  },
  "description": "Order #98765",
  "items": [
    {
      "description": "Classic white sneakers",
      "name": "White sneakers",
      "sku": "white-snkr-123",
      "quantity": 1,
      "price": 100.00
    }
  ],
  "merchant": {
    "redirectConfirmUrl": "http://merchantsite.com/confirm",
    "redirectCancelUrl": "http://merchantsite.com/cancel"
  },
  "merchantReference": "order-98765",
  "taxAmount": 0,
  "shippingAmount": 5
}'
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "expiryDateTime": "2017-08-02T03:35:32.9915516Z",
    "redirectUrl": "https://checkout.quadpay.com/checkout?token=00fbfe84...",
    "orderId": "ee7..."
}
Malformed request
Unauthorized

Body Params

amount
float
required

Order Amount, must be greater than 0. Maximum of 18 digits, including at most 2 decimal places.

consumer
object

Basic information about the customer. (Optional)

consumer.phoneNumber
string

must contain exactly 10 digits, representing a valid US mobile number starting with the area code

consumer.givenNames
string

must contain at least 2, at most 50 characters, only letters, spaces, and dashes

consumer.surname
string

must contain at least 2, at most 50 characters, only letters, spaces, and dashes

consumer.email
string

A valid email address, must contain at most 250 characters

billing
object

Customer billing address. (Optional)

billing.addressLine1
string
required

must contain at least 3, at most 50 characters

billing.addressLine2
string

must contain at least 0, at most 50 characters

billing.city
string
required

must contain at least 3, at most 50 characters

billing.state
string
required

must contain exactly 2 characters

billing.postcode
string
required

must contain exactly 5 characters

shipping
object

Customer shipping address. (Optional)

shipping.addressLine1
string
required

must contain at least 3, at most 50 characters

shipping.addressLine2
string

must contain at least 0, at most 50 characters

shipping.city
string
required

must contain at least 3, at most 50 characters

shipping.state
string
required

must contain exactly 2 characters

shipping.postcode
string
required

must contain exactly 5 characters

description
string

Description of the order

items
array of objects

An array of line items. See sample JSON for item definition. Item names must be between 0 and 1,000 characters. Item SKUs must be between 0 and 100 characters.

merchant
object
required
merchant.redirectConfirmUrl
string
required

URL QuadPay will redirect customer to after successful payment.

merchant.redirectCancelUrl
string
required

URL QuadPay will redirect customer to after unsuccessful payment.

merchantReference
string
required

Your internal order reference. Must be between 0 and 100 characters.

taxAmount
float

Amount of taxes (included in Order Amount). Maximum of 18 digits, including at most 2 decimal places.

shippingAmount
float

Amount of Shipping (included in Order Amount). Maximum of 18 digits, including at most 2 decimal places.

 

Response Data Types

Key
Value Data Type

expiryDateTime

string

redirectUrl

string

orderId

string

Suggest Edits

/order/{orderId}

Returns basic order information as well as an orderStatus field that should be used to confirm payment via QuadPay.

 
gethttps://api.quadpay.com/order/orderId
curl -X get https://api.quadpay.com/order/{orderId} \
  -H 'Accept: application/json'
  -H 'Authorization: Bearer [access_token]'
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "orderId": "8eb068f..",
    "orderStatus": "Created",
    "amount": 105,
    "consumer": null,
    "billing": {
        "addressLine1": "127 Cemetery Road",
        "addressLine2": "",
        "city": "Blairstown",
        "postcode": "07825",
        "state": "NJ"
    },
    "shipping": {
        "addressLine1": "127 Cemetery Road",
        "addressLine2": "",
        "city": "Blairstown",
        "postcode": "07825",
        "state": "NJ"
    },
    "description": null,
    "items": [
        {
            "description": null,
            "name": "test",
            "sku": "test",
            "quantity": 1,
            "price": 100
        }
    ],
    "merchant": {
        "redirectConfirmUrl": "http://merchantsite.com/confirm",
        "redirectCancelUrl": "http://merchantsite.com/cancel"
    },
    "merchantReference": "test",
    "taxAmount": 10,
    "shippingAmount": 5,
    "token": "1eea52...",
    "promotions": null
}
Malformed request
Unauthorized
Order is not found

Query Params

orderId
string
required

Order ID returned from POST /order call

 

orderId returned should be persisted for successful QuadPay orders as it will be required to issue refunds in the future.

Possible values for orderStatus:

Created - Order has been created on QuadPay, but not yet completed.
Approved - Payment has been successfully completed on QuadPay.
Declined - Payment was unsuccessful on QuadPay.
Abandoned - Customer exited QuadPay payment flow before completing payment.

The returned data types will be the same as the body used to create the order.

Suggest Edits

/order/{orderId}/refund

Creates Refund in QuadPay

 
posthttps://api.quadpay.com/order/orderId/refund
curl -X post https://api.quadpay.com/order/{orderId}/refund \
  -H 'Content-Type: application/json'
  -H 'authorization: Bearer [access_token]'
  -d '{
    "amount": 10.25,
    "merchantReference": "c6f32647-03b1-4206-818f-c2e2fe8ae7f8"
    }'
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "id": "a48758f7-b26a-3adf-923d-6084070a564b",
    "refundedDateTime": "2018-01-01T10:00:01.4504266Z",
    "merchantReference": "QuadPay Manual Refund 9c72c890-1ba5-ea1b-36b5-d3b32f81d1aa",
    "amount": 101.01
}
Malformed request
Unauthorized
Order not found
Scenarios:
The sum of all refunds, including the new refund, exceed the (original) order amount. OR
The refund with requestId has already been applied. OR
The refund request is otherwise invalid.
e.g. requestId is required OR the refund amount is invalid OR the order was never completed and is not eligible for a refund

Path Params

orderId
string
required

The OrderId returned from GET /order?token=...

Body Params

amount
float
required

The refund amount. Cannot exceed the captured Order Amount minus any existing Refunds.

merchantRefundReference
string
required

Merchant generated unique ID for this refund request used as an idempotency key. We suggest using a GUID here.

 
Suggest Edits

/order/{orderId}/capture

Releases funds to merchants that have "partial payments" configured.

Partial Payments enable a merchant to accept payment (capture funds) on shipment or when a service has been rendered. This endpoint can release any amount of the order. If part of the order has been voided the /order/{orderId}/refund endpoint should be called.

The response includes the merchant reference and amount supplied with the request. The dateTime will reflect when the request was processed.

 
posthttps://api.quadpay.com/order/orderId/capture
curl -X post https://api.quadpay.com/order/{orderId}/capture \
  -H 'Content-Type: application/json'
  -H 'authorization: Bearer [access_token]'
  -d '{
    "amount": 10.25,
    "merchantReference": "order-e01b37-shipment-fd06a42912d"
  }'
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "merchantReference": "order-e01b37-shipment-fd06a42912d",
    "amount": 10.25,
    "dateTime": "2018-12-04T18:59:14.2445302+00:00"
}
Malformed request
Unauthorized
Order not found
Scenarios:
The sum of all refunds, including the new refund, exceed the (original) order amount. OR
The refund with requestId has already been applied. OR
The refund request is otherwise invalid.
e.g. requestId is required OR the refund amount is invalid OR the order was never completed and is not eligible for a refund

Path Params

orderId
string
required

The OrderId returned from GET /order?token=...

Body Params

amount
float
required

The amount to capture, usually the shipment amount. This cannot exceed the initial Order Amount minus previous captured funds

merchantReference
string
required

Merchant generated unique ID for this capture request used as an idempotency key. We suggest using a GUID here.

 
Suggest Edits

/order/{orderId}/void

Voids (uncaptured) funds of an order, and updates the customer's installment plan to adjust for the reduced order amount.

This is used when part of an order is canceled eg it was out of stock and will not be shipped.

 
posthttps://api.quadpay.com/order/orderId/void
curl -X post https://api.quadpay.com/order/{orderId}/void \
  -H 'Content-Type: application/json'
  -H 'authorization: Bearer [access_token]'
  -d '{
    "amount": 10.25,
    "merchantReference": "order-e01b37-cancelled-shipment-12df82fd1c4"
    }'
A binary file was returned

Your OAuth2 token is incorrect or has expired

{
    "merchantReference": "order-e01b37-cancelled-shipment-12df82fd1c4",
    "amount": 10.25,
    "dateTime": "2018-01-01T10:00:01.4504266Z"
}
Malformed request
Unauthorized
Order not found
Scenarios:
The sum of all refunds, including the new refund, exceed the (original) order amount. OR
The refund with requestId has already been applied. OR
The refund request is otherwise invalid.
e.g. requestId is required OR the refund amount is invalid OR the order was never completed and is not eligible for a refund

Path Params

orderId
string
required

The OrderId returned from GET /order?token=...

Body Params

amount
float
required

The amount to void. Cannot exceed the remaining uncaptured funds in an order

merchantReference
string
required

Merchant generated unique ID for this refund request used as an idempotency key. We suggest using a GUID here.

 
Suggest Edits

/oauth/token

Obtains access token to be used as authorization for Merchant API calls.

 
posthttps://quadpay.auth0.com//oauth/token
curl -X POST \
  https://quadpay.auth0.com/oauth/token \
  -H 'content-type: application/json' \
  -d '{
  "client_id":"[client id]",
  "client_secret":"[client secret]", 
  "audience":"https://auth.quadpay.com",
  "grant_type":"client_credentials"
}'
A binary file was returned

You couldn't be authenticated

{
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciO.....",
    "expires_in": 86400,
    "scope": "read:me merchant",
    "token_type": "Bearer"
}

Body Params

client_id
string
required

Client ID provided by QuadPay

client_secret
string
required

Client Secret provided by QuadPay

audience
string
required

Audience provided by QuadPay

grant_type
string
required
 

Authorization Endpoints / Configuration

Sandbox
Production

Grant Type

client_credentials

client_credentials