Get payment history
Returns a list of payments.
URL
/cnbs/v1/invoices/payments
Method(s)
GET
Parameters
Required
- Payer (payer_data)
- Payer Number (customer_number)
- Company Code (company_code)
- Parameters (search_parameters)
- Document type (document_type)
- 02 … Payments
- Date From (date_from)
- Refers to posting date in the backend.
- Format MM-DD-YYYY
- Date To (date_to)
- Refers to posting date in the backend.
- Format MM-DD-YYYY
Optional
- Parameters (search_parameters)
- Filter Table (filter)
- Table with 2 rows where filter_type is the filter type and value is the respective filter value.
- Standard Filter Types:
- 01 … SD document number
- 02 … FI document number
- Custom Filter Types:
- 90-99 … Custom Filters can be implemented on a project basis and require a custom implementation in the backend as well.
Example GET
cURL:
curl -X GET "https://deveselling.cnbssoftware.com/cnbs/v1/invoices/payments?sap-client=800&sap-language=EN&apiid=CNBSMV01R&payer_number=3050&company_code=3000&document_type=02&date_from=12-18-2023&date_to=12-31-2099" -H "accept: application/json" -H "cnbssysid: W1B//vRKywJ2sPUVQG4CQ16Sf9XSN+N4Fkc6Bfmky3k="
Response
The response consists of a payment list table (payment_list) and a status (status).
The payment list table contains a sub table returning the related sales invoices (sd_invoices).
Hint: The sd_invoices will only be filled, if the payment is related to an SD invoice. e.g. a deposit payment will not have any related SD invoices!
- Payment List (payment_list)
- Finance Document Number (document_number_finance)
- Contains the document number under which the transaction is recorded in the financial accounting ledger.
- Finance Document Type (finance_document_type)
- Contains the financial accounting document type.
- Clearing Document Number (clearing_document_number_finance)
- Contains the clearing document number from financial accounting.
- Reference Document Number (reference_number)
- Contains the Reference Document Number found in the header of the financial accounting document.
- Document Fiscal Year (fiscal_year_of_the_relevant invoice)
- Contains the Fiscal Year when the related document got recorded.
- Payer Number (payer_number)
- Number of the payer customer.
- Posting Date (posting_date)
- Contains the posting date used in the financial accounting ledger.
- Document Date (document_date)
- Contains the document date used in the financial accounting ledger.
- Currency (currency_key)
- Document currency key.
- Paid Amount (paid_amount)
- Amount of the payment document.
- Item text (item_text)
- Item text of financial accounting ledger document item.
- Last Four (last_four)
- last for digits of the related payment card.
- Authorization Number (authorization_number)
- Authorization Reference Code (authorization_reference_code)
- Authorization Amount (authorization_amount)
- Payment Method (payment_method)
- CC … Credit Card
- EC … E-Check
- Payment Card Type (payment_card_type)
- Payment card type used for this transaction.
- Payment Card Token (payment_card_token)
- Tokenized payment card.
- Payment Card Name (payment_card_name)
- Full name of the payment card holder.
- Payment Card Valid-To (valid_to)
- Expiry date of the payment card.
- Sales invoces (sd_invoices)
- Billing Document Number (billing_document_number)
- Contains the billing document number.
- Billing Document Type (billing_document_type)
- Contains the billing document type of the billing document.
- Sales Organization (sales_organization)
- Distribution Channel (distribution_channel)
- Division (division)
- Currency (currency_key)
- Document currency key.
- Sold-to (soldto_number)
- Document Date (document_date)
- Contains the document date used in the financial accounting ledger.
- Total amount (total_amount)
- Toald SD invoice amount
- Current Paid amount (current_paid_amount)
- Amount paid related to the current payment.
- Status (status)
- Message Type (message_type)
- SAP Message Type.
- Errors:
- E = Error
- A = Abort
- X = Exception
- Others:
- S = Success
- W = Warning
- I = Information
- Message Identifier (message_identification)
- SAP Message ID.
- Message Number (message_number)
- SAP Message Number.
- Message Line (message_line_string)
- SAP Message Text.
Example Response
JSON:
{
"payment_list": [
{
"document_number_finance": "1400004810",
"finance_document_type": "DZ",
"reference_number": "CNBS WEBAR REF",
"fiscal_year_of_the_relevant_invoice": 2024,
"payer_number": "0000003050",
"posting_date": "11-15-2024",
"document_date": "11-15-2024",
"currency_key": "USD",
"paid_amount": 1,
"item_text": "Partial payment",
"authorization_number": "XI00",
"authorization_reference_code": "348214615",
"authorization_amount": 1,
"payment_method": "CC",
"payment_card_type": "VISA",
"payment_card_token": "-E803-0002-PH3AE4RZAK831S",
"payment_card_name": "Test CK",
"valid_to": "12-31-2024",
"sd_invoices": [
{
"billing_document_number": "0090040840",
"billing_document_type": "L2",
"sales_organization": "3000",
"distribution_channel": "10",
"division": "00",
"currency_key": "USD",
"soldto_number": "0000003000",
"document_date": "04-05-2022",
"total_amount": 1660,
"current_paid_amount": 1
}
]
},
{
"document_number_finance": "1400004769",
"finance_document_type": "DZ",
"clearing_document_number_finance": "1400004769",
"reference_number": "CNBS WEBAR REF",
"fiscal_year_of_the_relevant_invoice": 2024,
"payer_number": "0000003050",
"posting_date": "10-17-2024",
"document_date": "10-17-2024",
"currency_key": "USD",
"paid_amount": 165,
"item_text": "CNBS WEBAR CLR",
"authorization_number": "XI00",
"authorization_reference_code": "346460691",
"authorization_amount": 165,
"payment_method": "CC",
"payment_card_type": "VISA",
"payment_card_token": "-E803-0002-PH3AE4RZAK831S",
"payment_card_name": "John Doe",
"valid_to": "03-31-2027",
"sd_invoices": [
{
"billing_document_number": "0090040944",
"billing_document_type": "F2",
"sales_organization": "3000",
"distribution_channel": "10",
"division": "00",
"currency_key": "USD",
"soldto_number": "0000003000",
"document_date": "10-17-2024",
"total_amount": 165,
"current_paid_amount": 165
}
]
}
],
"status": {
"message_type": "S",
"message_identification": "/CNBS/X_API",
"message_number": 10,
"message_line_string": "Request successfully processed 97"
}
}