# Create payment within payment plan

Create payment within payment plan

Endpoint: POST /payment-plans/{paymentPlanId}/charge
Version: 2.6.0
Security: bearer, basic, apiKey

## Security:

  - `bearer` (unknown)
    http bearer JWT

  - `basic` (unknown)
    http basic

  - `apiKey` (unknown)
    apiKey in header X-API-Key

## Path parameters:

  - `paymentPlanId` (string, required)
    The Id of payment plan

## Request fields (application/json):

  - `transId` (string, required)
    Transaction ID created in merchant's system. It should be unique for each payment.

  - `refNr` (string)
    Your unique reference number for the specific operation. You can pass this value to reconcile different operations in a payment (authorization, capture, refund, etc) individually. It is recommended to limit the length to 18 characters so that it works for all payment methods. Allowed characters: letters (`A-Z`, `a-z`), digits (`0-9`), and the special characters `-` `?` `,` `(` `)` `+` `.` `'` `:`

  - `amount` (object)

  - `amount.value` (integer)
    Amount to be charged. Only applicable for Unscheduled MIT use case. For installment it should be optional. Not applicable for recurring as amount is fixed.

  - `statementDescriptor` (string)
    Statement descriptor of the specific MIT.

  - `order` (object)

  - `order.merchantReference` (string)
    A unique identifier for the order.

  - `order.invoiceId` (string)
    ID of the invoice generated for the order.

  - `order.description` (string)

## Response 201:

  - `201` (unknown)
    Success

## Response 201 fields (application/json):

  - `paymentPlanId` (string)
    The Id of payment plan

  - `payId` (string)
    A unique identifier assigned by Computop Paygate to the payment. This ID remains constant throughout the lifecycle of the payment and is used to track and reference the payment across all subsequent operations, such as authorization, capture, refund, or cancellation.

  - `merchantId` (string)
    Merchant ID assigned by Computop Paygate.

  - `transId` (string)
    Transaction ID provided by you in the request.

  - `xId` (string)
    A unique identifier assigned by Computop Paygate for each operation in the payment. For example: xId will be different for the authorization and capture operations of a payment whereas payId will be same.

  - `refNr` (string)
    Reference number provided by you in the request.

  - `status` (string)
    Status of the transaction.

  - `responseCode` (string)
    Response code of the transaction.

  - `responseDescription` (string)
    Response description associated with the response code.

  - `metadata` (object)
    A collection of additional custom data provided by you to store extra information about the transaction. This is a set of JSON key value pairs as you passed in the request.

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `errors` (object)
    "Object": [
"Error 1",
"Error 2"
]
}`
    Example: {"Object":["Error 1","Error 2"]}

  - `type` (string)
    A URI reference that identifies the problem type
    Example: https://tools.ietf.org/html/rfc9110#section-15.5.1

  - `title` (string)
    A short, human-readable summary of the problem type
    Example: One or more validation errors occurred.

  - `status` (string)
    The HTTP status code
    Example: 400

  - `detail` (string)

  - `instance` (string)

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (string)

  - `detail` (string)

  - `instance` (string)

