Server to Server Management APIs
Payment

Payments

The B2B Edition Payments API provides endpoints for enabling, disabling, and updating active payment methods on a Company-to-Company basis. Every payment method you have enabled on the store-level can be enabled or disabled as needed on the Company level. In addition, the specific behaviors for Company credit and payment on terms can be adjusted with this API.

NOTE
The Company credit and payment on terms features must be enabled in order to use their respective API paths. Using either path with the corresponding store-level feature disabled will cause errors or unexpected behavior. Refer to each endpoint for details.

For information on managing the payment methods available to the B2B Edition Payments API, refer to Payments (Help Center) (opens in a new tab), as this is not currently manageable via API. To learn more about Company credit and payment on terms, see B2B Edition Settings (opens in a new tab) and Companies (opens in a new tab).

Retrieving Payment Method Information for Companies

The B2B Edition Payments API has three endpoints for returning the payment methods available to Company accounts, each with its own context and use cases.

EndpointDescriptionUse Cases
Get Payment MethodsReturns a list of all payment methods available on the store.This endpoint allows you to confirm which payment methods and provides the payment's identifier for future requests.
Get Company Payment MethodsReturns the list of payment methods for a specific Company account.Use this endpoint to identify payment methods that are available for a particular Company, but not currently enabled.
Get All Active Payment MethodsGet all currently enabled payment methods across Companies.This allows you to identify enabled payment methods for all Company accounts in a store. Use the companyid parameter to identify enabled payment methods on a particular Company account more efficiently than the Get Company Payment Methods endpoint.

Get Payment Methods

GET /payments

Request

Returns a list of all payment methods available on the store.

Authentication

  • authToken in header

example

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

Response

SUCCESS

Body

object | application/json
  • code
    integer

    Operation status code.

    Default: 200

  • data
    array[object]

  • meta
    object

example

{
"code": 200,
"data": [
{
"id": 1,
"paymentCode": "authorizenet",
"paymentTitle": "Authorize.net"
}
],
"meta": {
"message": "Success"
}
}

Get Company Payment Methods

GET /companies/{companyId}/payments

Request

Returns the list of payment methods for the Company associated with companyId, indicating which ones are currently available to the Company users.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    The unique numeric ID of the Company assigned by B2B Edition.

example

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

Response

SUCCESS

Body

object | application/json
  • code
    integer

    Operation status code.

    Default: 200

  • data
    array[object]

  • meta
    object

example

{
"code": 200,
"data": [
{
"paymentId": 1,
"code": "authorizenet",
"paymentTitle": "Authorize.net",
"isEnabled": true
}
],
"meta": {
"message": "Success"
}
}

Update Company Payment Methods

PUT /companies/{companyId}/payments

Request

Updates whether the payment methods included in the request body are enabled for the Company associated with companyId.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    The unique numeric ID of the Company assigned by B2B Edition.

Body

object | application/json
  • payments
    array[object]

example

{
"payments": [
{
"code": "authorizenet",
"isEnabled": true
}
]
}

Response

SUCCESS

Body

object | application/json
  • code
    integer

    Operation status code.

    Default: 200

  • data
    array[object]

    Default: []

  • meta
    object

example

{
"code": 200,
"data": [],
"meta": {
"message": "Success"
}
}

Get All Active Payment Methods

GET /company-payment-methods

Request

Get all currently enabled payment methods across Companies. If multiple Companies have a given payment method enabled, each one will be returned in the results. Data is returned with pagination.

Authentication

  • authToken in header

Parameters

  • orderBy in query - string
    Specifies the order data should be returned in. If not included, defaults to 'DESC'.

    Allowed: DESC | ASC

  • sortBy in query with default of updatedAt - string
    Sorts data based on creation or modification time while respecting the orderBy parameter. If not included, defaults to 'updatedAt'.

    Allowed: updatedAt | createdAt

  • limit in query with default of 10 - integer
    Sets the maximum number of records to display in the response.
  • offset in query0 - integer
    Sets the number of records to skip before displaying the response.
  • companyId in query - string
    Filters results by companyId, only showing payment methods enabled for the specified Company.
  • q in query - string
    The search string by which data should be filtered. Currently supports payment method code & payment method title, so that a value of q=auth would return any payment method with 'auth' in either the code or the title.

example

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

Response

SUCCESS

Body

object | application/json
  • code
    integer

    Operation status code.

    Default: 200

  • data
    array[object]

  • meta
    object

example

{
"code": 200,
"data": [
{
"companyId": 7826480,
"paymentId": 1,
"createdAt": 1753818625,
"updatedAt": 1753818625,
"paymentMethodCode": "authorizenet",
"paymentMethodTitle": "Authorize.net"
}
],
"meta": {
"message": "Success",
"pagination": {
"totalCount": 100,
"limit": 10,
"offset": 0
}
}
}

Get Company Credit Status

GET /companies/{companyId}/credit

Request

Returns the credit settings for the Company specified by companyId. If the Company credit feature is disabled, this request will fail. See B2B Edition Settings for more information.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    The unique numeric ID of the Company assigned by B2B Edition.

example

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

Response

SUCCESS

Body

object | application/json
  • code
    integer

    Operation status code.

    Default: 200

  • data
    object

  • meta
    object

example

{
"code": 200,
"data": {
"creditEnabled": true,
"creditCurrency": "USD",
"availableCredit": 123.45,
"limitPurchases": true,
"creditHold": true
},
"meta": {
"message": "Success"
}
}

Update Company Credit Status

PUT /companies/{companyId}/credit

Request

Updates the credit settings for the Company specified by companyId. All fields are optional, but an empty request will result in unexpected behavior. If the Company credit feature is disabled, this request will fail. See B2B Edition Settings for more information.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    The unique numeric ID of the Company assigned by B2B Edition.

Body

object | application/json
  • creditEnabled
    boolean

    Indicates whether credit is enabled for the Company.
  • creditCurrency
    string

    The 3-character currency code of the Company's credit account.
    Example: USD
  • availableCredit
    number

    The amount of credit available to the Company.
    Example: 123.45
  • limitPurchases
    boolean

    Indicates whether the Company users are allowed to make purchases using purchase orders when total price exceeds available credit.
  • creditHold
    boolean

    Indicates whether the Company account is on a credit hold. If true, this flag prevents all Company users from making purchases.

example

{
"creditEnabled": true,
"creditCurrency": "USD",
"availableCredit": 123.45,
"limitPurchases": true,
"creditHold": true
}

Response

SUCCESS

Body

object | application/json
  • code
    integer

    Operation status code.

    Default: 200

  • data
    object

  • meta
    object

example

{
"code": 200,
"data": {
"creditEnabled": true,
"creditCurrency": "USD",
"availableCredit": 123.45,
"limitPurchases": true,
"creditHold": true
},
"meta": {
"message": "Success"
}
}

Get Company-Level Payment Terms

GET /companies/{companyId}/payment-terms

Request

Returns the Company-level payment terms for the Company specified by companyId. If payment on terms is disabled for the Company, the value of paymentTerms in the response will reflect the store-level default.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    The unique numeric ID of the Company assigned by B2B Edition.

example

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

Response

SUCCESS

Body

object | application/json
  • code
    integer

    Operation status code.

    Default: 200

  • data
    object

  • meta
    object

example

{
"code": 200,
"data": {
"isEnabled": true,
"paymentTerms": 0
},
"meta": {
"message": "Success"
}
}

Update Company-Level Payment Terms

PUT /companies/{companyId}/payment-terms

Request

Updates the Company-level payment terms for the Company specified by companyId. If the value of isEnabled is set to false, the paymentTerms field will be ignored and will default to the store-level value.

Authentication

  • authToken in header

Parameters

  • companyId in path - integer
    required
    The unique numeric ID of the Company assigned by B2B Edition.

Body

object | application/json
  • isEnabled
    boolean
    required

    Indicates whether payment on terms is available for the specified Company.
  • paymentTerms
    integer
    required

    The term set for the specified Company. This field takes the store-level default value if isEnabled is false.

    Allowed: 0 | 5 | 15 | 30 | 45 | 60

example

{
"isEnabled": true,
"paymentTerms": 0
}

Response

SUCCESS

Body

object | application/json
  • code
    integer

    Operation status code.

    Default: 200

  • data
    object

  • meta
    object

example

{
"code": 200,
"data": {
"isEnabled": true,
"paymentTerms": 0
},
"meta": {
"message": "Success"
}
}

See something you can improve? Edit this file on GitHub

Did you find what you were looking for?