Processes a payment for a list of documents.

The documents to be paid must be populated here and should be taken from the preceding call to get the invoice list.

/cnbs/v1/invoices/payments
POST

Required

  • Payer (payer_data)
    • Customer Number (customer_number)
    • Company Code (company_code)
  • Payment Detail (payment_detail)
    • 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. (Note that this will be set internally for E-Checks because they technically have no expiry date)
    • Card Validation Code (card_validation_code)
      • CVV value
  • Document Table (documents)
    • Document Number (document_number_finance)
      • Financial accounting document number to be paid.
    • Document Item Number (line_item_in_the_relevant_invoice)
      • Financial accounting document item number to be paid.
    • Document Fiscal Year (fiscal_year_of_the_relevant_invoice)
      • Fiscal Year of the financial accounting document to be paid.
    • Open Amount (open_amount)
      • Amount due. This amount is used to compare during payment execution and if changed, the payment won't go through because the open item situation in the backend must have changed since invoice document selection.
    • Payment Amount To Process (amount_to_process)
      • Payment amount for this document.
    • Currency (currency_key)
      • Contains the payment currency.

Optional

  • Payment Detail (payment_detail)
    • Electronic Check Account Type (electronic_check_account_type)
      • C … Consumer Checking Account (U.S. and Canada)
      • S … Consumer Savings Account (U.S. only)
      • X … Corporate Checking Account (U.S. only)
    • Electronic Check Routing Number (electronic_check_rdfi_number)
      • Receiving Depository Financial Institution Number.
    • Payment Card Validation Code (card_validation_code)
      • The CVV or card validation code is also known as CSC (“Card Security Code”), as well as CVV2.
        • They are all the same as a card validation code, except that they have been generated by a 2nd generation process.
    • Address data (address_data)
      • Name (name)
      • Name 2 (name_2)
      • City (city)
      • District (district)
      • Street (street)
      • Postal Code City (postal_code_city)
      • Region (region)
      • Country (country)
  • Document Table (documents)
    • Reason Code (reason_code)
      • In case of an over-/under payment a pre-defined reason code must be provided.
    • Comment (comment)
      • Some reason codes require and additional comment for it to be processed in the backend system. This depends on the backend system configuration settings.
    • Reference Number (reference_number)
      • Reference Number.

Example POST

JSON Payload:

{
  "payer_data": {
    "customer_number": "3000",
    "company_code": "3000"
  },
  "payment_detail": {
    "payment_method": "CC",
    "payment_card_type": "VISA",
    "payment_card_token": "-E803-1111-1000000000000H",
    "payment_card_name": "John Doe",
    "valid_to": "05-31-2027",
    "card_validation_code": "",
    "electronic_check_account_type": "",
    "electronic_check_rdfi_number": "",
    "address_data": {
      "name": "",
      "name_2": "",
      "city": "",
      "district": "",
      "street": "",
      "postal_code_city": "",
      "region": "",
      "country": ""
    }
  },
  "documents": [
    {
      "document_number_finance": "1400000229",
      "line_item_in_the_relevant_invoice": 1,
      "fiscal_year_of_the_relevant_invoice": 2017,
      "open_amount": 7000.50,
      "amount_to_process": 3500.25,
      "currency_key": "USD",
      "reason_code": "01",
      "reference_number": "",
      "comment": "50% payment"
    }
  ]
}

cURL:

curl -X POST "https://<<your.server.here>>/cnbs/v1/invoices/payments?sap-client=800&sap-language=EN&apiid=CNBSMV01R" -H  "accept: application/json" -H  "content-type: application/json" -H  "cnbssysid: gPuM1VyY1dxlTE2MEs2yajJUkX3/4+2Pw1alRw4BOtI=" -d "{  \"payer_data\": {    \"customer_number\": \"3000\",    \"company_code\": \"3000\"  },  \"payment_detail\": {    \"payment_method\": \"CC\",    \"payment_card_type\": \"VISA\",    \"payment_card_token\": \"-E803-1111-1000000000000H\",    \"payment_card_name\": \"John Doe\",    \"valid_to\": \"05-31-2027\",    \"electronic_check_account_type\": \"\",    \"electronic_check_rdfi_number\": \"\",    \"address_data\": {      \"name\": \"\",      \"name_2\": \"\",      \"city\": \"\",      \"district\": \"\",      \"street\": \"\",      \"postal_code_city\": \"\",      \"region\": \"\",      \"country\": \"\"    }  },  \"documents\": [    {      \"document_number_finance\": \"1400000229\",      \"line_item_in_the_relevant_invoice\": 1,      \"fiscal_year_of_the_relevant_invoice\": 2017,      \"open_amount\": 10,      \"amount_to_process\": 10,      \"currency_key\": \"USD\",      \"reason_code\": \"\",      \"reference_number\": \"\",      \"comment\": \"\"    }  ]}"
  • Paid Table (payed)
    • Document Number Financial Accounting (document_number_finance)
      • Contains the financial accounting document number as a result of the executed payment.
    • Company Code (company_code)
      • Company code of the financial accounting document.
    • Fiscal Year (fiscal_year_of_the_relevant_invoice)
      • Fiscal year of posted financial accounting document.
    • Authorization Number (authorization_number)
    • Authorization Reference Code (authorization_reference_code)
    • Authorization Amount (authorization_amount)
    • Currency (currency_key)
      • Contains the payment currency.
  • 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.

JSON:

{
  "payed": [
    {
      "document_number_finance": "1400000229",
      "fiscal_year_of_the_relevant_invoice": 2017,
      "authorization_number": "XI00",
      "authorization_reference_code": "95939240",
      "authorization_amount": 3500.25,
      "currency_key": "USD"
    }
  ],
  "status": [
    {
      "message_type": "S",
      "message_identification": "/CNBS/X_API",
      "message_number": 10,
      "message_line_string": "Request successfully processed"
    }
  ]
}
  • public/docs/webarapi/v110/makepayment.txt
  • Last modified: 2019/05/23 06:59
  • by Martin Moser