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.
Endpoint | Description | Use Cases |
---|---|---|
Get Payment Methods | Returns 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 Methods | Returns 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 Methods | Get 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 https://api-b2b.bigcommerce.com/api/v3/io/paymentsRequest
Authentication
- authToken in header
example
Response
Body
codeinteger
Operation status code.Default: 200
dataarray[object]
example
Get Company Payment Methods
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/paymentsRequest
companyId
, indicating which ones are currently available to the Company users.Authentication
- authToken in header
Parameters
- companyId in path - integerrequiredThe unique numeric ID of the Company assigned by B2B Edition.
example
Response
Body
codeinteger
Operation status code.Default: 200
dataarray[object]
example
Update Company Payment Methods
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/paymentsRequest
companyId
.Authentication
- authToken in header
Parameters
- companyId in path - integerrequiredThe unique numeric ID of the Company assigned by B2B Edition.
Body
paymentsarray[object]
example
Response
Body
codeinteger
Operation status code.Default: 200
dataarray[object]
Default: []
example
Get All Active Payment Methods
GET https://api-b2b.bigcommerce.com/api/v3/io/company-payment-methodsRequest
Authentication
- authToken in header
Parameters
- orderBy in query - stringSpecifies the order data should be returned in. If not included, defaults to 'DESC'.
Allowed: DESC | ASC
- sortBy in query with default of updatedAt - stringSorts 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 - integerSets the maximum number of records to display in the response.
- offset in query0 - integerSets the number of records to skip before displaying the response.
- companyId in query - stringFilters results by
companyId
, only showing payment methods enabled for the specified Company. - q in query - stringThe 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
Response
Body
codeinteger
Operation status code.Default: 200
dataarray[object]
example
Get Company Credit Status
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/creditRequest
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 - integerrequiredThe unique numeric ID of the Company assigned by B2B Edition.
example
Response
Body
codeinteger
Operation status code.Default: 200
dataobject
example
Update Company Credit Status
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/creditRequest
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 - integerrequiredThe unique numeric ID of the Company assigned by B2B Edition.
Body
creditEnabledboolean
Indicates whether credit is enabled for the Company.creditCurrencystring
The 3-character currency code of the Company's credit account.Example: USDavailableCreditnumber
The amount of credit available to the Company.Example: 123.45limitPurchasesboolean
Indicates whether the Company users are allowed to make purchases using purchase orders when total price exceeds available credit.creditHoldboolean
Indicates whether the Company account is on a credit hold. Iftrue
, this flag prevents all Company users from making purchases.
example
Response
Body
codeinteger
Operation status code.Default: 200
dataobject
example
Get Company-Level Payment Terms
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/payment-termsRequest
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 - integerrequiredThe unique numeric ID of the Company assigned by B2B Edition.
example
Response
Body
codeinteger
Operation status code.Default: 200
dataobject
example
Update Company-Level Payment Terms
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/payment-termsRequest
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 - integerrequiredThe unique numeric ID of the Company assigned by B2B Edition.
Body
isEnabledboolean
requiredIndicates whether payment on terms is available for the specified Company.paymentTermsinteger
requiredThe term set for the specified Company. This field takes the store-level default value ifisEnabled
isfalse
.Allowed: 0 | 5 | 15 | 30 | 45 | 60
example
Response
Body
codeinteger
Operation status code.Default: 200
dataobject
example
See something you can improve? Edit this file on GitHub