# Get payment plan by id

Get payment plan by id

Endpoint: GET /payment-plans/{paymentPlanId}
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)

## Response 200:

  - `200` (unknown)
    Payment plan successfully retrieved

## Response 200 fields (application/json):

  - `id` (string)
    Payment plan id.

  - `planStatus` (string)
    Status of the payment plan.
    Enum: "ACTIVE", "CANCELLED", "INVALID", "COMPLETED", "RETRY"

  - `paymentPlanType` (string)
    Payment plan type
    Enum: "RECURRING", "INSTALLMENTS", "DELAYED_SHIPMENT", "UNSCHEDULED_MIT"

  - `triggerType` (string)
    Returns whether the payment plan is manual or automatic.

  - `merchantCustomerId` (string)
    Unique identifier of the customer assigned by merchant.

  - `description` (string)
    Description

  - `creationDate` (any)
    Date when the payment plan record is created in Paygate.

  - `cancellationDate` (any)
    Date when the payment plan was cancelled. Applicable only for recurring and installment payment plans.

  - `lastBillingDate` (any)
    Last billing date of the payment plan in ISO 8601 format.

  - `order` (object)

  - `order.merchantReference` (string, required)
    A unique identifier for the order, assigned by your system.

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

  - `paymentMethod` (object)

  - `paymentMethod.type` (string)
    Specifies the type of payment method being used.
    Enum: "CARD"

  - `paymentMethod.card` (object)

  - `paymentMethod.card.last4Digits` (string)
    Last 4 digits of the card.

  - `paymentMethod.card.cardHolderName` (string)
    Cardholder Name.

  - `paymentMethod.card.brand` (string)
    Card Brand.

  - `paymentMethod.card.expiryDate` (string)
    Card expiry date.

  - `recurring` (object)

  - `recurring.amount` (object)
    Amount object of the payment plan.

  - `recurring.amount.value` (integer)
    Total order amount in the smallest currency unit, including taxes, shipping costs, discounts, etc.

  - `recurring.amount.currency` (string)
    3-character ISO currency code.

  - `recurring.frequency` (string)
    Defines the frequency of recurring payments.
    Enum: "DAILY", "WEEKLY", "BIWEEKLY", "MONTHLY", "MONTHLY_EOM", "BIMONTHLY", "QUARTERLY", "YEARLY"

  - `recurring.nextPaymentDate` (any)
    Date when the next payment will be initiated for the recurring transaction. Format `YYYY-MM-DDTHH:MM:SS.milliseconds`.

  - `recurring.expirationDate` (any)
    Date when the recurring transaction expires. Format `YYYY-MM-DDTHH:MM:SS.milliseconds`.

  - `installments` (object)

  - `installments.totalInstallments` (integer)
    Total number of installments.

  - `installments.paidInstallments` (integer)
    Total number of installments paid.

  - `installments.frequency` (string)
    Defines the frequency of installment payments.
    Enum: "DAILY", "WEEKLY", "BIWEEKLY", "MONTHLY", "MONTHLY_EOM", "BIMONTHLY", "QUARTERLY", "YEARLY"

  - `installments.nextPaymentDate` (any)
    Date when the next payment will be initiated for the installment transaction. Format `YYYY-MM-DDTHH:MM:SS.milliseconds`.

  - `installments.expirationDate` (any)
    Date when the installment transaction expires. Format `YYYY-MM-DDTHH:MM:SS.milliseconds`.

  - `delayedShipment` (object)

  - `unscheduledMit` (object)

  - `unscheduledMit.currency` (string)
    3 character ISO currency code.

## 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 404:

  - `404` (unknown)
    Payment plan not found

## Response 404 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (string)

  - `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)

## Response 200 examples:

  - `Default` (unknown)

