Table of Contents

Make payment

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.

URL

/cnbs/v1/invoices/payments

Method(s)

POST

Parameters

Required

Optional

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\": \"\"    }  ]}"

Response

Example Response

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"
    }
  ]
}