Server to Server Management APIs
Receipt

Receipt

Get receipts

GET /receipts

Request

Get receipts, with pagination data

Authentication

  • authToken in header

Parameters

  • offset in query - integer
    Pagination offset default: 0
  • limit in query with default of 10 - integer
    Pagination limit default: 10
  • orderBy in query with default of DESC - string
    Allow: 'DESC', 'ASC'

    Allowed: DESC | ASC

  • sortBy in query with default of createdAt - string
    The response sorted by which field

    Allowed: customerId | externalCustomerId | paymentId | total | transactionType | referenceNumber | createdAt | updatedAt

  • q in query - string
    You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".
  • searchBy in query - string
    The response search by which field

    Allowed: payerName | referenceNumber | customerId | externalId | externalCustomerId

  • paymentStatus[] in query - array
    Payment processing status. 0 means ‘Incomplete’ status, 1 means ‘Awaiting Processing’ status, 2 means ‘Processing’ status, 3 means ‘Completed’ status, 4 means ‘Refunded' status
    Type: array[number]

    Allowed: 0 | 1 | 2 | 3 | 4

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/ip/receipts \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    array[object]
    required

  • meta
    object
    required

example-1

{
"code": 200,
"data": [
{
"id": 85,
"createdAt": 1630658187,
"updatedAt": 1630658187,
"storeHash": "1i6zpxpe3g",
"customerId": "5485",
"externalId": "",
"externalCustomerId": "",
"payerName": "k Admin",
"payerCustomerId": "5485",
"details": {
"paymentDetails": {
"memo": "payment memo"
}
},
"transactionType": "Paid",
"paymentType": "Visa ending in 1111",
"referenceNumber": "375026",
"paymentId": 92,
"total": {
"code": "USD",
"value": "122.9500"
}
},
{
"id": 84,

Get a receipt

GET /receipts/{receiptId}

Request

Get a receipt detail

Authentication

  • authToken in header

Parameters

  • receiptId in path - string
    required
    The unique ID of the receipt.

example

curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/ip/receipts/[receiptId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

example-1

{
"code": 200,
"data": {
"id": 83,
"createdAt": 1630570416,
"updatedAt": 1630570416,
"storeHash": "1i6zpxpe3g",
"customerId": "5707",
"externalId": "",
"externalCustomerId": "",
"payerName": "Cash",
"payerCustomerId": "5707",
"details": {
"paymentDetails": {
"memo": "test"
}
},
"transactionType": "Paid",
"paymentType": "Offline",
"referenceNumber": "test",
"paymentId": 90,
"total": {
"code": "CNY",
"value": "1.2000"
}
},
"meta": {
"message": "SUCCESS"
}
}

Delete a receipt

DELETE /receipts/{receiptId}

Request

Delete a receipt

Authentication

  • authToken in header

Parameters

  • receiptId in path - string
    required
    The unique ID of the receipt.

example

curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/ip/receipts/[receiptId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number

    Response code of a successful request.
  • data
    object

  • meta
    object

example-1

{
"code": 200,
"data": {
"id": 3
},
"meta": {
"message": "SUCCESS"
}
}

Get all receipt lines

GET /receipt-lines

Request

Get all receipt lines, with pagination data

Authentication

  • authToken in header

Parameters

  • offset in query - integer
    Pagination offset default: 0
  • limit in query with default of 10 - integer
    Pagination limit default: 10
  • orderBy in query with default of DESC - string
    Allow: 'DESC', 'ASC'

    Allowed: DESC | ASC

  • paymentStatus[] in query - array
    Payment processing status. 0 means ‘Incomplete’ status, 1 means ‘Awaiting Processing’ status, 2 means ‘Processing’ status, 3 means ‘Completed’ status, 4 means ‘Refunded' status
    Type: array[number]

    Allowed: 0 | 1 | 2 | 3 | 4

  • q in query - string
    You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".
  • searchBy in query - string
    The response search by which field

    Allowed: customerId | externalId | externalCustomerId | payerName | payerCustomerId | referenceNumber | invoiceId

  • sortBy in query with default of createdAt - string
    The response sorted by which field

    Allowed: customerId | externalCustomerId | receiptId | invoiceId | amount | createdAt | updatedAt

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/ip/receipt-lines \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    array[object]
    required

  • meta
    object
    required

example-1

{
"code": 200,
"data": [
{
"id": 95,
"createdAt": 1630658187,
"updatedAt": 1630658187,
"storeHash": "1i6zpxpe3g",
"customerId": "5485",
"externalId": "",
"externalCustomerId": "",
"receiptId": 85,
"invoiceId": 38,
"amount": {
"code": "USD",
"value": "122.9500"
},
"paymentStatus": 1,
"paymentType": "Visa ending in 1111",
"invoiceNumber": "00000038",
"paymentId": 92,
"referenceNumber": "375026",
"transactionType": "Paid"
},
{
"id": 94,
"createdAt": 1630638069,
"updatedAt": 1630638069,

Get lines of a receipt

GET /receipts/{receiptId}/lines

Request

Get lines of a receipt, with pagination data

Authentication

  • authToken in header

Parameters

  • receiptId in path - string
    required
    The unique ID of the receipt.
  • offset in query - integer
    Pagination offset default: 0
  • limit in query with default of 10 - integer
    Pagination limit default: 10
  • orderBy in query with default of DESC - string
    Allow: 'DESC', 'ASC'

    Allowed: DESC | ASC

  • paymentStatus[] in query - array
    Payment processing status. 0 means ‘Incomplete’ status, 1 means ‘Awaiting Processing’ status, 2 means ‘Processing’ status, 3 means ‘Completed’ status, 4 means ‘Refunded' status
    Type: array[number]

    Allowed: 0 | 1 | 2 | 3 | 4

  • q in query - string
    You can perform keyword queries on fields corresponding to the value of "searchBy" or, if "searchBy" is empty, on all fields supported by "searchBy".
  • searchBy in query - string
    The response search by which field

    Allowed: customerId | externalId | externalCustomerId | payerName | payerCustomerId | referenceNumber | invoiceId

  • sortBy in query with default of createdAt - string
    The response sorted by which field

    Allowed: customerId | externalCustomerId | receiptId | invoiceId | amount | createdAt | updatedAt

example

curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/ip/receipts/[receiptId]/lines' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    array[object]
    required

  • meta
    object
    required

example-1

{
"code": 200,
"data": [
{
"id": 92,
"createdAt": 1630570416,
"updatedAt": 1630570416,
"storeHash": "1i6zpxpe3g",
"customerId": "5707",
"externalId": "",
"externalCustomerId": "",
"receiptId": 83,
"invoiceId": 19,
"amount": {
"code": "CNY",
"value": "0.7000"
},
"paymentStatus": 3,
"paymentType": "Offline",
"invoiceNumber": "00000019",
"paymentId": 90,
"referenceNumber": "test",
"transactionType": "Paid"
},
{
"id": 91,
"createdAt": 1630570416,
"updatedAt": 1630570416,
"storeHash": "1i6zpxpe3g",

Get a receipt line detail

GET /receipts/{receiptId}/lines/{receiptLineId}

Request

Get a receipt line detail

Authentication

  • authToken in header

Parameters

  • receiptId in path - string
    required
    The unique ID of the receipt.
  • receiptLineId in path - string
    required
    The unique ID of the receipt line.

example

curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/ip/receipts/[receiptId]/lines/[receiptLineId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

example-1

{
"code": 200,
"data": {
"id": 92,
"createdAt": 1630570416,
"updatedAt": 1630570416,
"storeHash": "1i6zpxpe3g",
"customerId": "5707",
"externalId": "",
"externalCustomerId": "",
"receiptId": 83,
"invoiceId": 19,
"amount": {
"code": "CNY",
"value": "0.7000"
},
"paymentStatus": 3,
"paymentType": "Offline",
"invoiceNumber": "00000019",
"paymentId": 90,
"referenceNumber": "test",
"transactionType": "Paid"
},
"meta": {
"message": "SUCCESS"
}
}

Delete a receipt line

DELETE /receipts/{receiptId}/lines/{receiptLineId}

Request

Delete a receipt line

Authentication

  • authToken in header

Parameters

  • receiptId in path - string
    required
    The unique ID of the receipt.
  • receiptLineId in path - string
    required
    The unique ID of the receipt line.

example

curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/ip/receipts/[receiptId]/lines/[receiptLineId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number

    Response code of a successful request.
  • data
    object

  • meta
    object

example-1

{
"code": 200,
"data": {
"id": 92
},
"meta": {
"message": "SUCCESS"
}
}
Did you find what you were looking for?