Skip to content
payrocdevelopers

Retrieve payment plan

Browse API reference

GET/processing-terminals/{processingTerminalId}/payment-plans/{paymentPlanId}getPaymentPlan

Use this method to retrieve information about a payment plan.

To retrieve a payment plan, you need its paymentPlanId. Our gateway returned the paymentPlanId in the response of the Create Payment Plan method.

Note: If you don't have the paymentPlanId, use our List Payment Plans method to search for the payment plan.

Our gateway returns the following information about the payment plan:

  • Name, length, and currency of the plan
  • How often our gateway collects each payment
  • How much our gateway collects for each payment
  • What happens if the merchant updates or deletes the plan

Parameters

NameInTypeDescription
processingTerminalIdRequiredpathstring

Unique identifier that we assigned to the terminal.

paymentPlanIdRequiredpathstring

Unique identifier that the merchant assigned to the payment plan.

Responses

Successful request. Returns the requested payment plan.

200 OK · application/json
{
  "currency": "USD",
  "customFieldNames": [
    "yourCustomField"
  ],
  "description": "Monthly Premium Club subscription",
  "frequency": "monthly",
  "length": 12,
  "name": "Premium Club",
  "onDelete": "complete",
  "onUpdate": "continue",
  "paymentPlanId": "PlanRef8765",
  "processingTerminalId": "1234001",
  "recurringOrder": {
    "amount": 4999,
    "breakdown": {
      "subtotal": 4347,
      "taxes": [
        {
          "name": "Sales Tax",
          "rate": 5
        }
      ]
    },
    "description": "Monthly Premium Club subscription"
  },
  "setupOrder": {
    "amount": 4999,
    "breakdown": {
      "subtotal": 4347,
      "taxes": [
        {
          "name": "Sales Tax",
          "rate": 5
        }
      ]
    },
    "description": "Initial setup fee for Premium Club subscription"
  },
  "type": "automatic"
}
Response schema · 23 of 29 fields
  • currencystringrequired
    Currency of the transaction. The value for the currency follows the ISO 4217 standard.AEDAFNALLAMDANGAOAARSAUD+163 more
  • customFieldNamesstring[]
    Array of custom fields that you can use in subscriptions linked to the payment plan.
  • descriptionstring
    Description of the payment plan.0–128 chars
  • frequencystringrequired
    Indicates how often the merchant or the terminal collects a payment from the customer.weeklyfortnightlymonthlyquarterlyyearly
  • lengthintegerint32
    Number of payments for the payment plan. To indicate that the payment plan should run indefinitely, send a value of 0.≥ 0
  • namestringrequired
    Name of the payment plan.5–128 chars
  • onDeletestringrequired
    Indicates what happens to existing subscriptions if the merchant deletes the payment plan. complete Stops existing subscriptions. continue Continues existing subscriptions.completecontinue
  • onUpdatestringrequired
    Indicates whether any changes that the merchant makes to the payment plan apply to existing subscriptions. update Changes apply to existing subscriptions. continue Changes don't apply to existing subscriptions.updatecontinue
  • paymentPlanIdstringrequired
    Unique identifier that the merchant assigns to the payment plan.1–48 chars
  • processingTerminalIdstring
    Unique identifier of the terminal that the payment plan is assigned to.4–50 chars
  • typestringrequired
    Indicates how the merchant takes the payment from the customer's account. manual The merchant manually collects payments from the customer. automatic The terminal automatically collects payments from the customer.manualautomatic
  • recurringOrderobject
    Object that contains information about the cost of each payment. Note: Send this object only if the value for type is automatic.
    • amountintegerint64
      Total amount before surcharges. The value is in the currency's lowest denomination, for example, cents.
    • descriptionstring
      Description of the transaction.1–1024 chars
    • breakdownobject
      Object that contains information about the taxes that apply to the transaction.
      • subtotalintegerint64required
        Total amount for the transaction before tax. The value is in the currency's lowest denomination, for example, cents.
      • taxesobject[]
        Array of tax objects.+3 more fields at deeper levels — see the full spec
  • setupOrderobject
    Object that contains information about the initial cost that a customer pays to set up the subscription.
    • amountintegerint64
      Total amount before surcharges. The value is in the currency's lowest denomination, for example, cents.≤ 999999999999
    • descriptionstring
      Description of the transaction.1–1024 chars
    • breakdownobject
      Object that contains information about the taxes that apply to the transaction.
      • subtotalintegerint64required
        Total amount for the transaction before tax. The value is in the currency's lowest denomination, for example, cents.
      • taxesobject[]
        Array of tax objects.+3 more fields at deeper levels — see the full spec

Used in workflows

Search documentation

API reference169
Guides118
Knowledge38
legal1
Solutions32
Workflows74
↑↓highlight↵openView all search results

Menu

Theme

Sign out

Your saved plans remain in your organization. This browser’s private draft and account view will be cleared.

Talk to an engineer