Server to Server Management APIs
Payments

Payments

Get Payments

GET /payments

Request

Get payment list

Authentication

  • authToken in header

Parameters

  • offset in query - number
    Pagination offset
  • limit in query - number
    Pagination limit
  • orderBy in query - string
    "DESC" or "ASC"
    Example: DESC

    Allowed: DESC | ASC

  • sortBy in query - string
    Sort by the field value
    Example: createdAt

    Allowed: moduleName | processingStatus | appliedStatus | createdAt | customerId | externalCustomerId | fundingStatus | updatedAt | totalAmount

  • searchBy in query - string
    Filter by a field

    Allowed: id | customerId | externalId | externalCustomerId

  • 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".
  • customerName in query - string
    Query by invoice B2B Edition company name
  • invoiceId in query - number
    Query by Invoice ID
  • processingStatus in query - number
    payment processing status(0="Incomplete", 1="Awaiting Processing", 2="Processing", 3="Completed", 4="Refunded")
    Example: 3

    Allowed: 0 | 1 | 2 | 3 | 4

  • channelIds in query - array
    Query by BigCommerce Channel IDs. This parameter is not needed if you don't have multiple storefront channels.
    Type: array[number]

example

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

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    array[object]
    required

  • meta
    object
    required

200

{
"code": 200,
"data": [
{
"id": 70,
"createdAt": 1618800393,
"updatedAt": 1618803026,
"storeHash": "jexy81vb0h",
"customerId": "95075",
"externalId": null,
"externalCustomerId": null,
"payerName": "Store offline payment",
"payerCustomerId": "95075",
"details": {
"memo": "memo"
},
"moduleName": "payments_offline",
"fees": [],
"moduleData": {
"transactions": [
{
"memo": "k",
"type": "OfflineTransaction",
"rawTransaction": null
}
]
},
"processingStatus": 3,

Get Payment Detail

GET /payments/{paymentId}

Request

Get payment detail

Authentication

  • authToken in header

Parameters

  • paymentId in path - number
    required
    Payment ID

example

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

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

200

{
"code": 200,
"data": {
"id": 20,
"createdAt": 1617761431,
"updatedAt": 1617762957,
"storeHash": "jexy81vb0h",
"customerId": "95075",
"externalId": null,
"externalCustomerId": null,
"payerName": "Hannah Admin",
"payerCustomerId": "95075",
"details": {
"memo": "memo"
},
"moduleName": "payments_bigcommerce_sales_order",
"fees": [],
"moduleData": {
"cartId": "d0afeab8-ff76-4b4e-867a-0675c0ea6e6e",
"orderId": 121,
"transactions": [
{
"type": "UnknownTransaction",
"rawTransaction": null
}

Delete a Payment

DELETE /payments/{paymentId}

Request

Delete a payment

Authentication

  • authToken in header

Parameters

  • paymentId in path - number
    required
    Payment ID

example

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

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

200

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

Get a Payment Operation

GET /payments/{paymentId}/operations

Request

Get a payment for all operations

Authentication

  • authToken in header

Parameters

  • paymentId in path - number
    required
    Payment ID

example

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

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

200

{
"code": 200,
"data": {
"allowedOperations": [],
"allowedStatuses": [
"1",
"2",
"3",
"4"
]
},
"meta": {
"message": "Success"
}
}

Performing Payment Operation

POST /payments/{paymentId}/operations

Request

Performing payment operation

Authentication

  • authToken in header

Parameters

  • paymentId in path - number
    required
    Payment ID

Body

object | application/json
  • operationCode
    number
    required

    Payment operation code. The list of allowed operations for this payment.

    Allowed: 0 | 1 | 2 | 3

200

{
"operationCode": 0
}

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

200

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

Update Payment Processing Status

PUT /payments/{paymentId}/processing-status

Request

Update payment processing status

Authentication

  • authToken in header

Parameters

  • paymentId in path - number
    required
    Payment ID

Body

object | application/json
  • processingStatus
    number
    required

    payment processing status(1="Awaiting Processing", 2="Processing", 3="Completed", 4="Refunded")

example

{
"processingStatus": 0
}

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

200

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

Get Payment Transactions

GET /payments/{paymentId}/transactions

Request

Get payment transactions

Authentication

  • authToken in header

Parameters

  • paymentId in path - number
    required
    Payment ID

example

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

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    array[object]
    required

    The array contains payment transaction information that varies and depends on the payment gateway.
  • meta
    object
    required

200

{
"code": 200,
"data": [
{
"type": "CreditCardTransaction",
"gateway": "test",
"transactionId": "521263",
"authCode": "",
"event": "capture",
"card": {
"type": "Visa",
"last4": "1111",
"expiryYear": 2050,
"expiryMonth": 12
},
"rawTransaction": ""
}
],
"meta": {
"message": "SUCCESS"
}
}

Create Offline Payment

POST /payments/offline

Request

Create offline payment

Authentication

  • authToken in header

Body

object | application/json
  • lineItems
    array[object]
    required

  • currency
    string
    required

  • details
    object
    required

  • externalId
    string

  • customerId
    string
    required

    B2B Edition Company ID
  • externalCustomerId
    string

  • payerName
    string

    Default is "Store Offline Payment " if no value is passed in.

    Default: Store offline payment

  • payerCustomerId
    string

    The default value is the same as the customerId.
  • processingStatus
    number

    payment status, 3 is the default

    Allowed: 1 | 2 | 3 | 4

    Example: 3

    Default: 3

  • channelId
    integer

    BigCommerce channel ID

example

{
"lineItems": [
{
"invoiceId": 13,
"amount": "20.00"
}
],
"currency": "USD",
"details": {
"memo": "Test"
},
"customerId": "113",
"payerName": "Store offline payment",
"payerCustomerId": "113",
"processingStatus": 3,
"fundingStatus": "2"
}

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

200

{
"code": 200,
"data": {
"paymentId": 112
},
"meta": {
"message": "SUCCESS"
}
}

Update an Offline Payment

PUT /payments/offline/{paymentId}

Request

Update offline payment

Authentication

  • authToken in header

Parameters

  • paymentId in path - number
    required
    Payment ID

Body

object | application/json
  • lineItems
    array[object]
    required

  • currency
    string
    required

  • details
    object
    required

  • externalId
    string

  • customerId
    string
    required

    B2B Edition Company ID
  • externalCustomerId
    string

  • payerName
    string

    Default is "Store Offline Payment " if no value is passed in.

    Default: Store offline payment

  • payerCustomerId
    string

    The default is the same as the customerId.
  • processingStatus
    number

    Allowed: 1 | 2 | 3 | 4

    Example: 3

    Default: 3

  • fundingStatus
    number

    Allowed: 0 | 1 | 2 | 3

    Default: 2

example

{
"lineItems": [
{
"invoiceId": 13,
"amount": "20.00"
}
],
"currency": "USD",
"details": {
"memo": "Test"
},
"customerId": "113",
"payerName": "Store offline payment",
"payerCustomerId": "113",
"processingStatus": 3,
"fundingStatus": 2
}

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

200

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