Create Outgoing Payment by Incoming Payment

The CreatePaymentOutByPaymentIn API is used to create outgoing payments according to 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 Based on Incoming Payment

The following table lists and describes the fields required to create an outgoing payment based on an incoming payment through the CreatePaymentOutByPaymentIn API:

Field Description

paymentRefId

ID (Ref ID) of the Incoming Payment.

description

Provider’s Description of the Payment.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when creating an outgoing payment based on an incoming payment:

  • 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.

  • Incoming Payment provided in the request, must exist in the system.

  • Incoming Payment provided in the request, must not be Cancelled.

Create Outgoing Payment Example

Use the following request’s body to create an outgoing payment based on an incoming payment:

{
  "requestId": "{{$guid}}",
  "user": "crm",
  "paymentRefId": "incoming_payment_ref_id",
  "description": "provider_description"
}

The outcome of the API call is as follows:

  • An outgoing payment is created based on the incoming payment with reference ID incoming_payment_ref_id.

  • The description of the payment is provider_description.