Delete an order

delete/orders/{id}

The DELETE /orders/{id} call allows your platform to delete an order. Orders identify both the merchant and payer, and describe items sold, shipment date, prices, delivery details, and payment terms.

SecurityappIdAuth and appTokenAuth
Request
path Parameters
id
required
string [ 1 .. 255 ] characters

ID of the order, generated by WePay when the order is created.

header Parameters
Api-Version
required
string
Example: 3.0
Unique-Key
string
Responses
200
Response Schema: application/json
alternate_tax_amount
integer or null

Total amount of alternate tax for the order.

alternate_tax_id
string or null <= 255 characters

Your platform's tax ID number to use for the alternate tax amount. Required if you set alternate_tax_amount to any value. However, you may fill out this field without setting alternate_tax_amount.

api_version
string
object

Buyer of the order.

create_time
integer <int64> >= 0

The time (in UNIX) when the payout method was created.

currency
string or null
Enum: Description
USD

United States Dollar

CAD

Canadian Dollar

… 1 more
customer_reference_number
string or null <= 255 characters

The ID used to identify the order instance between a merchant and payer.

delivery_type
string or null

Describes how an order is delivered. Possible values: donation, full_prepayment, fully_delivered, none, partial_prepayment, point_of_sale, subscription.

Enum: Description
none

Indicates that the order does not contain shippable goods.

fully_delivered

Indicates that all components of an order have been delivered and received by the payer.

… 5 more
discount_amount
integer or null

Discount (if any) on order.

discount_program_name
string or null [ 1 .. 255 ] characters

The name of the discount program applied to the transaction. This allows tracking if a merchant offers multiple discount programs at once or over time.

duty_amount
integer or null

Total charges for any import or export duties included in the order.

freight_amount
integer or null

Total freight must also include grand_total_amount.

grand_total_amount
integer or null

Grand total for the entire order or credit request.

id
string [ 1 .. 255 ] characters

ID of the order, generated by WePay when the order is created.

Array of objects or null

An array of line items. Not a top level resource.

long_description
string or null <= 2047 characters

A long description of the order.

notes
string or null <= 2047 characters

Notes field from the invoice or order.

object

Details the owner resource and owner path.

path
string

The path of resource and resource ID.

reference_number
string or null <= 255 characters

A reference number your platform assigns to the order to help you identify it.

resource
string

Helps organize information by identifying the resource type of the object data.

Value: Description
orders
object or null

Optional address indicating where service was rendered or destination of the order.

object or null

Optional address indicating where service was rendered or destination of the order.

object or null

Optional address indicating where service was rendered or destination of the order.

object or null

Shipping status details associated with the order.

short_description
string or null <= 255 characters

A short description of the order. Required if line_items are not provided.

state
string

State of the order. Possible values: active, inactive.

Enum: Description
active

The Order contains information that is current and applicable to the associated Payment.

deleted

the Order contains information that is not current or applicable to the associated Payment and has been deleted.

status
string or null

Status of the order. Possible values: disputed, paid, unpaid, deleted.

Enum: Description
unpaid

The order has not yet been paid.

paid

The order has been paid.

… 1 more
tax_amount
integer or null

Total tax amount applied to the transaction. Must be greater than 0 to qualify for Level 2 Interchange for Visa.

object or null

Terms associated with the transaction.

tip_amount
integer or null >= 0

Total Tip amount applied to the transaction. Must be greater than 0 to qualify for Level 2 Interchange for Visa.

type
string

Type of order. Possible values: donation, event, goods, personal, service.

Enum: Description
goods

This order contains goods.

service

This order outlines services being paid for.

… 3 more
vat_amount
integer or null

Total amount of VAT or other tax included in the order.

vat_rate
number or null

Rate of VAT or other tax for the order. The valid range is 0.01 to 0.99 (1% to 99%).

400

INVALID_PARAMS

403

NOT_AUTHORIZED

500

UNEXPECTED_ERROR

Request samples
Response samples
application/json
{
  • "alternate_tax_amount": 35,
  • "alternate_tax_id": "11",
  • "buyer": {
    • "id": "1490656130",
    • "path": "/legal_entities/1490656130",
    • "resource": "legal_entities"
    },
  • "create_time": 1390656130,
  • "customer_reference_number": "cust# 1234",
  • "delivery_type": "point_of_sale",
  • "discount_amount": 0,
  • "duty_amount": 0,
  • "freight_amount": 0,
  • "grand_total_amount": 1000,
  • "id": "f48cd8e6-e802-4500-a0f9-3ab6228c6f23",
  • "line_items": [
    • {
      • "commodity_code": "ABC123",
      • "currency": "USD",
      • "description": "Classic Iron Anvil",
      • "discount_amount": 0,
      • "discount_indicator": null,
      • "gross_net_indicator": null,
      • "item": {
        • "create_time": 1390656130,
        • "description": "Classic Iron Anvil",
        • "id": "1",
        • "owner": {
          • "id": "d7608b20-fea5-4eb5-bd30-d3f58435e78b",
          • "path": "/accounts/d7608b20-fea5-4eb5-bd30-d3f58435e78b",
          • "resource": "accounts"
          },
        • "path": "/items/f48cd8e6-e802-4500-a0f9-3ab6228c6f23",
        • "photos": [ ],
        • "price": 490,
        • "product_code": "XYZ321",
        • "product_details": {
          • "band": "nike"
          },
        • "product_name": "Acme Anvil - 100 Lb",
        • "reference_number": "abc_123456",
        • "resource": "items",
        • "shipping_options": [
          • "regular",
          • "expedited"
          ],
        • "state": "deleted",
        • "terms": {},
        • "weight": {
          • "units": "pounds",
          • "weight": 1
          }
        },
      • "quantity": 1,
      • "tax_amount": 5,
      • "tax_rate": 1.99,
      • "tax_type_applied": "VAT",
      • "total_amount": 500,
      • "unit_of_measure": "count",
      • "unit_price": 490
      },
    • {
      • "commodity_code": "XYZ999",
      • "currency": "USD",
      • "description": "Classic Catapult",
      • "discount_amount": 0,
      • "discount_indicator": null,
      • "gross_net_indicator": null,
      • "item": {
        • "create_time": 1390656130,
        • "description": "Classic Catapult",
        • "id": "2",
        • "owner": {
          • "id": "d7608b20-fea5-4eb5-bd30-d3f58435e78b",
          • "path": "/accounts/d7608b20-fea5-4eb5-bd30-d3f58435e78b",
          • "resource": "accounts"
          },
        • "path": "/items/f48cd8e6-e802-4500-a0f9-3ab6228c6f23",
        • "price": 490,
        • "product_code": "AAAXYZ321",
        • "product_name": "Acme Catapult",
        • "reference_number": "abc_654321",
        • "resource": "items",
        • "shipping_options": [
          • "regular",
          • "expedited"
          ],
        • "state": "deleted",
        • "terms": {},
        • "weight": {
          • "units": "pounds",
          • "weight": 1
          }
        },
      • "quantity": 1,
      • "tax_amount": 5,
      • "tax_rate": 1.99,
      • "tax_type_applied": "VAT",
      • "total_amount": 500,
      • "unit_of_measure": "count",
      • "unit_price": 490
      }
    ],
  • "long_description": null,
  • "notes": "urgent order",
  • "owner": {
    • "id": "d7608b20-fea5-4eb5-bd30-d3f58435e78b",
    • "path": "/accounts/d7608b20-fea5-4eb5-bd30-d3f58435e78b",
    • "resource": "accounts"
    },
  • "path": "/orders/f48cd8e6-e802-4500-a0f9-3ab6228c6f23",
  • "reference_number": "invoice #54321",
  • "resource": "orders",
  • "service_address": {
    • "city": "San Francisco",
    • "country": "US",
    • "line1": "123 Fake Street",
    • "postal_code": "94101",
    • "region": "CA"
    },
  • "ship_from_address": {
    • "city": "San Francisco",
    • "country": "US",
    • "line1": "123 Fake Street",
    • "postal_code": "94101",
    • "region": "CA"
    },
  • "ship_to_address": {
    • "city": "San Francisco",
    • "country": "US",
    • "line1": "123 Fake Street",
    • "postal_code": "94101",
    • "region": "CA"
    },
  • "shipping_status": {
    • "actual_delivery_time": null,
    • "carrier": "UPS",
    • "expected_delivery_time": 1490656130,
    • "shipping_time": 1390656130,
    • "tracking_number": "1Z34567890",
    },
  • "short_description": "Donation to ABC campaign",
  • "state": "deleted",
  • "status": "paid",
  • "tax_amount": 35,
  • "type": "goods",
  • "vat_amount": 5,
  • "vat_rate": 1.99,
  • "discount_program_name": "Everything is 50% off",
  • "tip_amount": 0,
  • "api_version": "3.0"
}