Subscriptions

Retrieve subscription

Changed on

Use this method to retrieve information about a subscription.

To retrieve a subscription, you need its subscriptionId. You sent the subscriptionId in the request of the Create subscription method.

Note: If you don't have the subscriptionId, use our List subscriptions method to search for the subscription.

Our gateway returns information about the following for the subscription:

  • Payment plan the subscription is linked to.
  • Secure token that represents cardholder’s payment details.
  • Current state of the subscription, including its status, next due date, and invoices.
  • Fees for setup and the cost of the recurring order.
  • Subscription length, end date, and frequency.

We also return the paymentPlanId and the secureTokenId, which you can use to perform follow-on actions.

get/processing-terminals/{processingTerminalId}/subscriptions/{subscriptionId}

Request

  • Base URL
    https://api.payroc.com/v1
  • URL
    https://api.payroc.com/v1/processing-terminals/{processingTerminalId}/subscriptions/{subscriptionId}
  • Auth
    HTTP bearer

Path parameters

processingTerminalIdstring required

Unique identifier that we assigned to the terminal.

subscriptionIdstring required

Unique identifier that the merchant assigned to the subscription.

Response

Successful request. Returns the requested subscription.

subscriptionIdstring required

Unique identifier that the merchant assigned to the subscription.

processingTerminalIdstring required

Unique identifier of the terminal that the subscription is linked to.

namestring required

Name of the subscription.

descriptionstring

Description of the subscription.

currency'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BOV' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHE' | 'CHF' | 'CHW' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'COU' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MXV' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'USN' | 'USS' | 'UYI' | 'UYU' | 'UZS' | 'VEF' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL' required

Currency of the transaction. The value for the currency follows the ISO 4217 standard.

startDatestring date required

Start date of the subscription in the format YYYY-MM-DD.

The date must be the current day or a day in the future. Our gateway uses Coordinated Universal Time (UTC) during the winter, and Irish Standard Time (IST) during the summer.

endDatestring date

End date of the subscription in the format YYYY-MM-DD.

Our gateway uses Coordinated Universal Time (UTC) during the winter, and Irish Standard Time (IST) during the summer.

Note: If you provide values for both length and endDate, our gateway uses the value for endDate to determine when the subscription should end.

lengthinteger

Total number of billing cycles. To indicate that the subscription should run indefinitely, send a value of 0. This value replaces the length inherited from the payment plan.
Note: If you provide values for both length and endDate, our gateway uses the value for endDate to determine when the subscription should end.

type'manual' | 'automatic' required

Indicates how the merchant takes the payment from the customer's account.

  • manual - The merchant manually collects payments from the customer. Use the Pay manual subscription method to collect a manual payment.
  • automatic - The terminal automatically collects payments from the customer.
frequency'weekly' | 'fortnightly' | 'monthly' | 'quarterly' | 'yearly' required

Indicates how often the merchant or the terminal collects a payment from the customer.

pauseCollectionForinteger

Number of billing cycles that the merchant wants to pause payments for. For example, if the merchant wants to offer a free trial period.

Changes

    • breaking

      the // response property's maxLength was increased from 100 to 255 for the response status

    • warning

      deleted the header request parameter Authorization

    • info

      the endpoint scheme security Bearer was added to the API