Create Outgoing Payment from Document Credit

The CreatePaymentOutFromDocumentCredit API is used to create outgoing payments from incoming payments in OCS.io. This API is particularly useful when there’s a need to record the creation of outgoing payments based on incoming payments.

API Overview

Fields Required for Creating Outgoing Payment from Incoming Payment

The following table lists and describes the fields required to create an outgoing payment from an incoming payment through the CreatePaymentOutFromDocumentCredit API:

Field Description

account

ID (Ref ID/ External ID ) of the Account.

paymentMethod

Payment Method associated with the Outgoing Payment.

paymentRef1

Payment Reference No.1 associated with the Payment.

paymentRef2

Payment Reference No.2 associated with the Payment.

paymentRef3

Payment Reference No.3 associated with the Payment.

bankAccountNumber

Payer’s (Billing Account) bank account number, including prefix, without bank number code.

bankNumberCode

Payer’s (Billing Account) bank number code.

iban

Payer’s (Billing Account) bank account number in international format.

bic

BIC code of bank.

bankAccountName

Payer’s (Billing Account) bank account name.

moneyOrder

Payer’s (Billing Account) Person and Address details in case Outgoing Payment is of type Money Order.

description

Provider’s Description of the Payment. Will be copied to Payer’s NOTE of the payment transaction.

documentAmounts

Array of Document ID and Amount, identification of documents and amounts to use.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when creating an outgoing payment from a document credit:

  • Account must be provided in the request, it must be already created in the system and must not be in Deactivated State.

  • Payer must be already created in the system.

  • Currency must be configured in the system.

  • Payment Method must be configured in the system.

  • If Payment Method is Bank Transfer, then either combination of Bank Account Number & Bank Number Code or IBAN & BIC must be provided in the request.

  • If Payment Method is Money Order, then Payer’s Address must be provided in the request.

  • If more than one item in Document Amounts array is provided in the request, then Currency must be identical for each item.

  • Each referenced Document provided in the request, must exist in the system.

  • Each referenced Document provided in the request, must not be Cancelled.

  • Each referenced Document provided in the request, must be of Due Amount Type Liability.

  • Amount of each item in Document Amounts must not exceed Due Amount of each referenced Document.

Create Outgoing Payment Example

Use the following request’s body to create an outgoing payment from a document credit:

{
  "requestId": "{{$guid}}",
  "user": "crm",
  "account": {
    "externalId": "account_external_id"
  },
  "paymentMethod": "payment_method",
  "paymentRef1": "payment_ref_1",
  "paymentRef2": "payment_ref_2",
  "paymentRef3": "payment_ref_3",
  "bankAccountNumber": "bank_account_number",
  "bankNumberCode": "bank_number_code",
  "iban": "iban",
  "bic": "bic",
  "bankAccountName": "bank_account_name",
  "moneyOrder": {
    "person": "person_details",
    "address": "address_details"
  },
  "description": "provider_description",
  "documentAmounts": [
    {
      "entityRefId": "document_id_1",
      "amount": 100000000,
      "currency": "EUR"
    },
    {
      "entityRefId": "document_id_2",
      "amount": 200000000,
      "currency": "EUR"
    }
  ]
}

The outcome of the API call is as follows:

  • An outgoing payment is created from the document credit with the specified details.

  • The description of the payment is provider_description.

  • The specified document amounts are used for the payment.