Checkout

Initiates the payment process, returns a URL which the user will be redirected

/v3/checkout

GET https://apis.sandbox.flexshopper.com/v3/checkout

Headers

NameTypeDescription

Authorization

string

Authorization token

Request Body

NameTypeDescription

customer

object

Customer Info Object

customer.firstName

string

Customer first name

customer.lastName

string

Customer Last Name

customer.email

string

Customer Email address

customer.phones.home

string

Customer home phone number

customer.phones.mobile

string

Customer mobile phone number

customer.address

object

Customer address Object

customer.address.street1

string

Main Street Address

customer.address.street2

string

Secondary Street address

customer.address.city

string

City

customer.address.region

string

Region or State

customer.address.postalCode

string

Zip Code

transactionId

string

The transaction ID provided at checkout.

total

number

The order total including sum of items and shipping subtracting discounts

items

array

A list of items to be added to the lease.

items.brand

string

The item's brand.

items.sku

string

The item's SKU (can be vendor-specific)

items.description

string

The item's description.

items.cost

number

The item's cost in dollars.

items.quantity

integer

The quantity of this item to add to the lease.

items.condition

string

Allowed values are: new, used and refurbished

items.mpn

string

The item's Manufacturer Part Number.

items.gtin

string

The item's Global Trade Item Number.

shipping.cost

number

The shipping and handling fee in dollars, if any.

shipping.date

string

The shipping date, if any.

shipping.method

string

Allowed values are: overnight, freight, ground, free, store, 2-day-air

discounts

array

A list of discounts to be calculated into the lease.

discounts.items

array

A list of items with discounts to be calculated into the lease

discounts.items.value

number

The amount of the discount in dollars.

discounts.items.label

array

The list of items to be returned.

discounts.items.targetSku

string

The target item's SKU for discounting.

discounts.items.quantity

integer

If quantity is null or not in object, discount applies to all quantity of sku.

{
  "data": {
    "id": "44222abc17c76611009a0665",
    "redirectUri": "https://pay.flexshopper.com/?id=example-id"
  }
}

Request Payload Example

{
  "transactionId": "5a6f7da94eb929002de90542",
  "items": [
    {
      "description": "Macbook Pro 13",
      "sku": "ABC123",
      "productId": "58ac31fc2e074def0426b7cd",
      "cost": 120.34,
      "brand": "Apple",
      "condition": "new",
      "quantity": 1,
      "images": [
        "https://dummyimage.com/600x400/000/fff.png"
      ],
      "shipping": {
        "cost": 12.34,
        "date": "2018-03-05",
        "method": "ground"
      }
    }
  ],
  "shipping": {
    "cost": 12.34,
    "date": "2018-03-05",
    "method": "ground"
  },
  "discounts": {
    "items": [
      {
        "value": 20,
        "label": "20 dollars off Apple products",
        "targetSku": "ABC123",
        "quantity": 1
      }
    ]
  },
  "customer": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "johndoe@flexshopper.com",
    "phones": {
      "home": "1234567890",
      "mobile": "1234567890"
    },
    "address": {
      "street1": "2700 N Military Trail",
      "street2": "Suite 200",
      "city": "Boca Raton",
      "region": "FL",
      "postalCode": "33441"
    }
  },
  "total": 112.68
}

Response Parameters

A successful request returns the HTTP 200 OK status code and a JSON response body that shows the checkout response

Key

Type

Description

redirectUri

String

Url which the customer should be redirected to complete the payment process

Last updated