NAV
Subscribe to developer updates

v3 API Reference

Orders API

getTransactions

import requests
headers = {
    'X-Auth-Client': 'SampleClientID',
    'X-Auth-Token': 'SampleTokenHere',
    'Accept':'application/json',
    'Content-Type':'application/json'

}

r = requests.get('https://api.bigcommerce.com/stores/{{store_id}}/v3/orders/{order_id}/transactions', headers=headers)

print r.json()

GET /orders/{order_id}/transactions

Returns a collection of Transaction objects related to a BigCommerce Order.

Parameters

Parameter In Type Required Description
order_id path number true The ID of the Order to which the transactions belong.

Responses

Status Meaning Description
200 OK An array of Transaction objects.
204 No Content No content found to fulfill the request.
404 Not Found The resource was not found.
{
  "data": [
    {
      "event": "purchase",
      "method": "credit_card",
      "amount": 0,
      "currency": "string",
      "gateway": "2checkout",
      "gateway_transaction_id": "string",
      "date_created": "2018-02-14T15:29:03.713Z",
      "test": true,
      "status": "ok",
      "fraud_review": true,
      "reference_transaction_id": 0,
      "offline": {
        "display_name": "string"
      },
      "custom": {
        "payment_method": "string"
      },
      "id": 0,
      "order_id": "string",
      "avs_result": {
        "code": "string",
        "message": "string",
        "street_match": "string",
        "postal_match": "string"
      },
      "cvv_result": {
        "code": "string",
        "message": "string"
      },
      "credit_card": {
        "card_type": "string",
        "card_iin": "string",
        "card_last4": "string"
      },
      "gift_certificate": {
        "code": "string",
        "original_balance": 0,
        "starting_balance": 0,
        "remaining_balance": 0,
        "status": "active"
      },
      "store_credit": {
        "remaining_balance": "string"
      }
    }
  ],
  "meta": {
    "pagination": {
      "total": 0,
      "count": 0,
      "per_page": 0,
      "current_page": 0,
      "total_pages": 0,
      "links": {
        "previous": "string",
        "current": "string",
        "next": "string"
      }
    }
  }
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string"
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string"
}

createTransaction

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('https://api.bigcommerce.com/stores/{store_id}/v3/orders/{order_id}/transactions', params={

}, headers = headers)

print r.json()


POST /orders/{order_id}/transactions

Creates a new Transaction related to a BigCommerce Order.

{
  "event": "purchase",
  "method": "credit_card",
  "amount": 0,
  "currency": "string",
  "gateway": "2checkout",
  "gateway_transaction_id": "string",
  "date_created": "2018-02-13T19:07:09Z",
  "test": true,
  "status": "ok",
  "fraud_review": true,
  "reference_transaction_id": 0,
  "offline": {
    "display_name": "string"
  },
  "custom": {
    "payment_method": "string"
  }
}

Parameters

Parameter In Type Required Description
body body TransactionPost true A BigCommerce Transaction object.
order_id path integer true The ID of the Order to which the transactions belong.

Responses

Status Meaning Description Schema
200 OK Successful transaction object created call TransactionResponse
204 No Content No content found to fulfill request. NoContent
404 Not Found The resource was not found. NotFound
{
  "data": {
    "event": "purchase",
    "method": "credit_card",
    "amount": 0,
    "currency": "string",
    "gateway": "2checkout",
    "gateway_transaction_id": "string",
    "date_created": "2018-02-13T19:07:09Z",
    "test": true,
    "status": "ok",
    "fraud_review": true,
    "reference_transaction_id": 0,
    "offline": {
      "display_name": "string"
    },
    "custom": {
      "payment_method": "string"
    },
    "id": 0,
    "order_id": "string",
    "avs_result": {
      "code": "string",
      "message": "string",
      "street_match": "string",
      "postal_match": "string"
    },
    "cvv_result": {
      "code": "string",
      "message": "string"
    },
    "credit_card": {
      "card_type": "string",
      "card_iin": "string",
      "card_last4": "string"
    },
    "gift_certificate": {
      "code": "string",
      "original_balance": 0,
      "starting_balance": 0,
      "remaining_balance": 0,
      "status": "active"
    },
    "store_credit": {
      "remaining_balance": "string"
    }
  },
  "meta": {}
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string"
}
{
  "status": 0,
  "title": "string",
  "type": "string",
  "instance": "string"
}