Payment
BigCommerce B2B Edition Payment management
Get Payments of Store
GET https://api-b2b.bigcommerce.com/api/v3/io/paymentsRequest
Get all payments of stores.
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
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataarray[object]
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": [
{
"id": 1,
"paymentCode": "cheque",
"paymentTitle": "Check"
},
{
"id": 2,
"paymentCode": "braintree",
"paymentTitle": "Braintree"
},
{
"id": 3,
"paymentCode": "authorizenet",
"paymentTitle": "Authorize.net"
}
]
}
Get Company Payments
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/paymentsRequest
Get all payments of one company.
Authentication
- authToken in header
Parameters
- companyId in path - integerrequiredCompany ID
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
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataarray[object]
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": [
{
"paymentCode": "cheque",
"paymentTitle": "Check",
"isEnabled": true,
"paymentId": 1
},
{
"paymentCode": "braintree",
"paymentTitle": "Braintree",
"isEnabled": true,
"paymentId": 1
},
{
"paymentCode": "authorizenet",
"paymentTitle": "Authorize.net",
"isEnabled": false,
"paymentId": 1
}
]
}
Update Company Payments
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/paymentsRequest
Update payment method to the company in batch.
Authentication
- authToken in header
Parameters
- companyId in path - integerrequiredCompany ID
Body
object | application/json
paymentsarray[object]
example-1
{
"payments": [
{
"code": "cheque",
"isEnabled": true
},
{
"code": "braintree",
"isEnabled": true
},
{
"code": "authorizenet",
"isEnabled": false
}
]
}
Response
OK
Body
object | application/json
Response for successful request
codeinteger
Response code of success request.Example: 200dataarray[]
example-1
{
"code": 200,
"meta": {
"message": "SUCCESS"
},
"data": []
}
Get all Company Payment Methods
GET https://api-b2b.bigcommerce.com/api/v3/io/company-payment-methodsRequest
Get all company payment methods, can use filter & search parameters.
Authentication
- authToken in header
Parameters
- orderBy in query with default of DESC - stringOrder by, DESC or ASC, default: DESC
- sortBy in query with default of updatedAt - stringSort by, support updatedAt & createdAt
- limit in query with default of 10 - stringPagination limit default: 10
- offset in query with default of 0 - stringPagination offset default: 0
- companyId in query - stringThe companyId filter
- q in query - stringThe search parameters support search in payment method code & payment method 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
OK
Body
object | application/json
codenumber
requireddataarray[object]
required
example-1
{
"code": 200,
"data": [
{
"companyId": 25,
"paymentId": 43,
"createdAt": 1622430503,
"updatedAt": 1622430503,
"paymentMethodCode": "cheque",
"paymentMethodTitle": "Check"
}
],
"meta": {
"pagination": {
"totalCount": 1,
"offset": 0,
"limit": 10
},
"message": "SUCCESS"
}
}
Get Company Credit
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/creditRequest
Get company credit configs, should enable store company credit feature first.
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
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
OK
Body
object | application/json
codeinteger
dataobject
Example 1
{
"code": 0,
"meta": {
"message": "string"
},
"data": {
"creditEnabled": true,
"creditCurrency": "CNY",
"availableCredit": 200.11,
"limitPurchases": false,
"creditHold": false
}
}
Update Company Credit
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/creditRequest
Update company credit config. All fields are optional, but please provide at least one. When company credit is not enabled, other fields cannot be updated.
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
Body
object | application/json
creditEnabledboolean
Whether credit is enabled for the company.creditCurrencystring
Currency code of the company's credit account.availableCreditnumber
The amount of credit available to the company.limitPurchasesboolean
Whether the customer is allowed to make purchases using purchase orders when total price exceeds available credit.creditHoldboolean
Prevents all company users from making purchases.
Example 1
{
"creditEnabled": true,
"creditCurrency": "USD",
"availableCredit": 200,
"limitPurchases": true,
"creditHold": true
}
Response
OK
Body
object | application/json
codeinteger
dataobject
Example 1
{
"code": 0,
"meta": {
"message": "string"
},
"data": {
"creditEnabled": true,
"creditCurrency": "CNY",
"availableCredit": 200.11,
"limitPurchases": false,
"creditHold": false
}
}
Get Company Payment Terms
GET https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/payment-termsRequest
Get the payment terms of the company.
Authentication
- authToken in header
Parameters
- companyId in path - integerrequired
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
OK
Body
object | application/json
codeinteger
Default: 200
dataobject
Example 1
{
"code": 200,
"data": {
"isEnabled": true,
"paymentTerms": 0
},
"meta": {
"message": "SUCCESS"
}
}
Update Company Payment Terms
PUT https://api-b2b.bigcommerce.com/api/v3/io/companies/{companyId}/payment-termsRequest
Edit the company's payment terms.
Authentication
- authToken in header
Parameters
- companyId in path - integerrequired
Body
object | application/json
isEnabledboolean
requiredpaymentTermsinteger
requiredPayment terms must be in [0, 5, 15, 30, 45, 60].
example
{
"isEnabled": true,
"paymentTerms": 0
}
Response
OK
Body
object | application/json
codeinteger
Default: 200
dataobject
Example 1
{
"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?