QuadPay

The QuadPay Developer Hub

Welcome to the QuadPay developer hub. You'll find comprehensive guides and documentation to help you start working with QuadPay as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
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,
  "captureFundsOnOrderCreation": true
}
 
Suggest Edits

/order

Creates Order in QuadPay

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

If this configuration is set to false, 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

{
    "token": "00fbfe84-600f-44e6-9894-953ccd42a2d1",
    "expiryDateTime": "2017-08-02T03:35:32.9915516Z",
    "redirectUrl": "https://checkout.quadpay.com/checkout?token=00fbfe84..."
}
Malformed request
Unauthorized

Body Params

amount
float
required

Order Amount

consumer
object
required

Basic information about the customer

consumer.phoneNumber
string
required
consumer.givenNames
string
required
consumer.surname
string
required
consumer.email
string
required
billing
object
required

Customer billing address

billing.addressLine1
string
required
billing.addressLine2
string
billing.city
string
required
billing.state
string
required
billing.postcode
string
required
shipping
object
required

Customer shipping address

shipping.addressLine1
string
required
shipping.addressLine2
string
shipping.city
string
required
shipping.state
string
required
shipping.postcode
string
required
description
string

Description of the order

items
array of objects

An array of line items. See sample JSON for item definition

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.

taxAmount
float

Amount of taxes (included in Order Amount).

shippingAmount
string
required

Amount of Shipping (included in Order Amount).

 
Suggest Edits

/order

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

 
gethttps://api.quadpay.com/order
curl -X get https://api.quadpay.com/order?token=[order token] \
  -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..."
}
Malformed request
Unauthorized
Order is not found

Query Params

token
string
required

Order token 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.

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,
    "merchantRefundReference": "c6f32647-03b1-4206-818f-c2e2fe8ae7f8"
    }'
A binary file was returned

Your OAuth2 token is incorrect or has expired

OK
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 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.

 
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

OK
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

OK
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