The /order API calls

The order resource is used as part of WePay’s mPOS program. An order is a request by a partner to have WePay ship a card reader to a merchant.

Permission required: Please get in touch with your WePay account manager to use this API, or to learn more about WePay’s mPOS program.

Version: v2 2017-02-01

POST Endpoint

https://wepayapi.com/v2/order

/order

Use this call to lookup the details of an mPOS card reader order on WePay.

Arguments

Parameter Required Type Description
order_id Yes Integer (64 bits) The unique ID of the order you want to look up.

Example

{
  "order_id": 12345
}

Response

Response Type Description
order_id Integer (64 bits) The unique ID of the order.
account_id Integer (64 bits) The merchant account associated with this order. KYC must be complete before the reader can be ordered.
quantity Integer (64 bits) The number of card readers that were ordered.
status String (255 chars) The status of the order.

Possible values: open, processed, failed.
type String (255 chars) The type of order.

Possible values: card_reader.
card_reader Card Reader Structure Details of the order, for use when type equals card_reader

shipping_method String (255 chars) The allowed values will be defined in discussion with WePay.
shipping_contact Shipping Contact Structure Shipping contact details

shipping_address Shipping Address Structure Shipping address details
tracking_information array of Tracking Information Structure Tracking information

Example

{
  "order_id": 12345,
  "account_id": 123456789,
  "quantity": 1,
  "status": "open",
  "type": "card_reader",
  "card_reader": {
    "model": "a"
  },
  "shipping_method": "ground",
  "shipping_contact": {
    "name": "Testy McTesterson",
    "company": "McTesterson Industries",
    "phone": "8005551212",
    "email": "testy@mctesterson.com"
  },
  "shipping_address": {
    "address1": "380 Portage Ave.",
    "address2": "",
    "city": "Palo Alto",
    "state": "AK",
    "zip": "90000",
    "country": "US"
  },
  "tracking_information": [
    {
      "tracking_service": "(USPS|Federal Express|...)",
      "tracking_code": "9400110200830644951634",
      "status": "shipped"
    }
  ]
}

/order/find

Use this call to search for all orders that match a certain order_id. Each element of the array in the response will include the same data as returned from the /order call.

Arguments

Parameter Required Type Description
order_id Yes Integer (64 bits) The unique ID of the order you want to look up.
start No Integer (64 bits) Starting point for looking up existing orders.
limit No Integer (64 bits) Ending point for looking up existing orders.

Example

{
  "order_id": 12345,
  "start": 0,
  "limit": 99
}

Response

Response Type Description
order_id Integer (64 bits) The unique ID of the order.
account_id Integer (64 bits) The merchant account associated with this order. KYC must be complete before the reader can be ordered.
quantity Integer (64 bits) The number of card readers that were ordered.
status String (255 chars) The status of the order.

Possible values: open, processed, failed.
type String (255 chars) The type of order.

Possible values: card_reader.
card_reader Card Reader Structure Details of the order, for use when type equals card_reader

shipping_method String (255 chars) The allowed values will be defined in discussion with WePay.
shipping_contact Shipping Contact Structure Shipping contact details

shipping_address Shipping Address Structure Shipping address details
tracking_information array of Tracking Information Structure Tracking information

Example

[
  {
    "order_id": 12345,
    "account_id": 123456789,
    "quantity": 1,
    "status": "open",
    "type": "card_reader",
    "card_reader": {
      "model": "a"
    },
    "shipping_method": "ground",
    "shipping_contact": {
      "name": "Testy McTesterson",
      "company": "McTesterson Industries",
      "phone": "8005551212",
      "email": "testy@mctesterson.com"
    },
    "shipping_address": {
      "address1": "380 Portage Ave.",
      "address2": "",
      "city": "Palo Alto",
      "state": "AK",
      "zip": "90000",
      "country": "US"
    },
    "tracking_information": [
      {
        "tracking_service": "(USPS|Federal Express|...)",
        "tracking_code": "9400110200830644951634",
        "status": "shipped"
      }
    ]
  }
]

/order/create

Create a new order. The response for this call is the same as the /order call.

Arguments

Parameter Required Type Description
account_id Yes Integer (64 bits) The merchant account to be associated with this order. KYC must be complete before the reader can be ordered.
quantity Yes Integer (64 bits) The quantity of card readers for this order.
type Yes String (255 chars) The type of order.

Possible values: card_reader.
card_reader Yes Card Reader Structure Details of the order, for use when type equals card_reader

shipping_method Yes String (255 chars) The allowed values will be defined in discussion with WePay.
shipping_contact Yes Shipping Contact Structure Shipping contact details

shipping_address Yes Shipping Address Structure Shipping ddress details
callback_uri No String (2083 chars) The URL that we will POST IPN data to.

Example

{
  "account_id": 123456789,
  "quantity": 1,
  "type": "card_reader",
  "card_reader": {
    "model": "a"
  },
  "shipping_method": "ground",
  "shipping_contact": {
    "name": "Testy McTesterson",
    "company": "McTesterson Industries",
    "phone": "8005551212",
    "email": "testy@mctesterson.com"
  },
  "shipping_address": {
    "address1": "380 Portage Ave.",
    "address2": "",
    "city": "Palo Alto",
    "state": "AK",
    "zip": "90000",
    "country": "US"
  }
}

Response

Response Type Description
order_id Integer (64 bits) The unique ID of the order.
account_id Integer (64 bits) The merchant account associated with this order. KYC must be complete before the reader can be ordered.
quantity Integer (64 bits) The number of card readers that were ordered.
status String (255 chars) The status of the order.

Possible values: open, processed, failed.
type String (255 chars) The type of order.

Possible values: card_reader.
card_reader Card Reader Structure Details of the order, for use when type equals card_reader

shipping_method String (255 chars) The allowed values will be defined in discussion with WePay.
shipping_contact Shipping Contact Structure Shipping contact details

shipping_address Shipping Address Structure Shipping address details
tracking_information array of Tracking Information Structure Tracking information

Example

{
  "order_id": 12345,
  "account_id": 123456789,
  "quantity": 1,
  "status": "open",
  "type": "card_reader",
  "card_reader": {
    "model": "a"
  },
  "shipping_method": "ground",
  "shipping_contact": {
    "name": "Testy McTesterson",
    "company": "McTesterson Industries",
    "phone": "8005551212",
    "email": "testy@mctesterson.com"
  },
  "shipping_address": {
    "address1": "380 Portage Ave.",
    "address2": "",
    "city": "Palo Alto",
    "state": "AK",
    "zip": "90000",
    "country": "US"
  },
  "tracking_information": [
    {
      "tracking_service": "(USPS|Federal Express|...)",
      "tracking_code": "9400110200830644951634",
      "status": "shipped"
    }
  ]
}