Payments
Get Payments
GET https://api-b2b.bigcommerce.com/api/v3/io/ip/paymentsRequest
Get payment list
Authentication
- authToken in header
Parameters
- offset in query - numberPagination offset
- limit in query - numberPagination limit
- orderBy in query - string"DESC" or "ASC"Example: DESC
Allowed: DESC | ASC
- sortBy in query - stringSort by the field valueExample: createdAt
Allowed: moduleName | processingStatus | appliedStatus | createdAt | customerId | externalCustomerId | fundingStatus | updatedAt | totalAmount
- searchBy in query - stringFilter by a field
Allowed: id | customerId | externalId | externalCustomerId
- q in query - stringYou 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 - stringQuery by invoice B2B Edition company name
- invoiceId in query - numberQuery by Invoice ID
- processingStatus in query - numberpayment processing status(0="Incomplete", 1="Awaiting Processing", 2="Processing", 3="Completed", 4="Refunded")Example: 3
Allowed: 0 | 1 | 2 | 3 | 4
- channelIds in query - arrayQuery 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
codenumber
requireddataarray[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 https://api-b2b.bigcommerce.com/api/v3/io/ip/payments/{paymentId}Request
Get payment detail
Authentication
- authToken in header
Parameters
- paymentId in path - numberrequiredPayment 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
codenumber
requireddataobject
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 https://api-b2b.bigcommerce.com/api/v3/io/ip/payments/{paymentId}Request
Delete a payment
Authentication
- authToken in header
Parameters
- paymentId in path - numberrequiredPayment 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
codenumber
requireddataobject
required
200
{
"code": 200,
"data": {
"id": 1
},
"meta": {
"message": "SUCCESS"
}
}
Get a Payment Operation
GET https://api-b2b.bigcommerce.com/api/v3/io/ip/payments/{paymentId}/operationsRequest
Get a payment for all operations
Authentication
- authToken in header
Parameters
- paymentId in path - numberrequiredPayment 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
codenumber
requireddataobject
required
200
{
"code": 200,
"data": {
"allowedOperations": [],
"allowedStatuses": [
"1",
"2",
"3",
"4"
]
},
"meta": {
"message": "Success"
}
}
Performing Payment Operation
POST https://api-b2b.bigcommerce.com/api/v3/io/ip/payments/{paymentId}/operationsRequest
Performing payment operation
Authentication
- authToken in header
Parameters
- paymentId in path - numberrequiredPayment ID
Body
object | application/json
operationCodenumber
requiredPayment operation code. The list of allowed operations for this payment.Allowed: 0 | 1 | 2 | 3
200
{
"operationCode": 0
}
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
200
{
"code": 200,
"data": {
"id": 4
},
"meta": {
"message": "SUCCESS"
}
}
Update Payment Processing Status
PUT https://api-b2b.bigcommerce.com/api/v3/io/ip/payments/{paymentId}/processing-statusRequest
Update payment processing status
Authentication
- authToken in header
Parameters
- paymentId in path - numberrequiredPayment ID
Body
object | application/json
processingStatusnumber
requiredpayment processing status(1="Awaiting Processing", 2="Processing", 3="Completed", 4="Refunded")
example
{
"processingStatus": 0
}
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
200
{
"code": 200,
"data": {
"id": 2
},
"meta": {
"message": "SUCCESS"
}
}
Get Payment Transactions
GET https://api-b2b.bigcommerce.com/api/v3/io/ip/payments/{paymentId}/transactionsRequest
Get payment transactions
Authentication
- authToken in header
Parameters
- paymentId in path - numberrequiredPayment 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
codenumber
requireddataarray[object]
requiredThe array contains payment transaction information that varies and depends on the payment gateway.
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 https://api-b2b.bigcommerce.com/api/v3/io/ip/payments/offlineRequest
Create offline payment
Authentication
- authToken in header
Body
object | application/json
lineItemsarray[object]
requiredcurrencystring
requireddetailsobject
requiredexternalIdstring
customerIdstring
requiredB2B Edition Company IDexternalCustomerIdstring
payerNamestring
Default is "Store Offline Payment " if no value is passed in.Default: Store offline payment
payerCustomerIdstring
The default value is the same as the customerId.processingStatusnumber
payment status, 3 is the defaultAllowed: 1 | 2 | 3 | 4
Example: 3Default: 3
channelIdinteger
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
codenumber
requireddataobject
required
200
{
"code": 200,
"data": {
"paymentId": 112
},
"meta": {
"message": "SUCCESS"
}
}
Update an Offline Payment
PUT https://api-b2b.bigcommerce.com/api/v3/io/ip/payments/offline/{paymentId}Request
Update offline payment
Authentication
- authToken in header
Parameters
- paymentId in path - numberrequiredPayment ID
Body
object | application/json
lineItemsarray[object]
requiredcurrencystring
requireddetailsobject
requiredexternalIdstring
customerIdstring
requiredB2B Edition Company IDexternalCustomerIdstring
payerNamestring
Default is "Store Offline Payment " if no value is passed in.Default: Store offline payment
payerCustomerIdstring
The default is the same as the customerId.processingStatusnumber
Allowed: 1 | 2 | 3 | 4
Example: 3Default: 3
fundingStatusnumber
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
codenumber
requireddataobject
required
200
{
"code": 200,
"data": {
"paymentId": 112
},
"meta": {
"message": "SUCCESS"
}
}
Did you find what you were looking for?