# Payment Plans

## Get Payment Plan Details

> Retrieve detailed information for a specific payment plan identified by the unique payment plan key.

```json
{"openapi":"3.0.1","info":{"title":"Recurring Payments API","version":"2.0"},"paths":{"/rest/v2/payment-plans/{paymentPlanKey}":{"get":{"tags":["Payment Plans"],"summary":"Get Payment Plan Details","description":"Retrieve detailed information for a specific payment plan identified by the unique payment plan key.","operationId":"getSinglePlan","parameters":[{"name":"paymentPlanKey","in":"path","description":"Unique identifier of the payment plan.","required":true,"schema":{"type":"string"}},{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/payload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/payload"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}}}}}},"components":{"schemas":{"payload":{"type":"object","properties":{"customers":{"$ref":"#/components/schemas/customers"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"customers":{"type":"object","properties":{"customer":{"type":"array","items":{"$ref":"#/components/schemas/customer"}}},"xml":{"name":"customers"}},"customer":{"required":["first-name","last-name"],"type":"object","properties":{"email":{"type":"string","description":"Email address associated with the customer."},"phone":{"type":"string","description":"Primary phone number of the customer."},"comments":{"type":"string","description":"Additional comments associated with the customer profile."},"metadata":{"type":"object","additionalProperties":{"type":"string","description":"Key-value pairs used to store additional information related to the customer."},"description":"Key-value pairs used to store additional information related to the customer."},"customer-key":{"type":"string","description":"A unique identifier defined to reference the customer in external systems."},"first-name":{"type":"string","description":"Customer's first name."},"last-name":{"type":"string","description":"Customer's last name."},"billing-address":{"$ref":"#/components/schemas/Address"},"shipping-address":{"$ref":"#/components/schemas/Address"},"links":{"$ref":"#/components/schemas/Links"}},"description":"Represents a recurring billing customer profile.","xml":{"name":"customer"}},"Address":{"type":"object","properties":{"company":{"type":"string","description":"Company name associated with the billing address."},"street":{"type":"string","description":"Primary street address for the billing."},"street2":{"type":"string","description":"Secondary street address information, if available."},"city":{"type":"string","description":"City associated with the billing address."},"state":{"type":"string","description":"State or province of the billing address."},"zip":{"type":"string","description":"ZIP or postal code of the billing address."},"country":{"type":"string","description":"Country of the billing address."},"phone":{"type":"string","description":"Phone number associated with the billing address."},"first-name":{"type":"string","description":"First name of the billing contact."},"last-name":{"type":"string","description":"Last name of the billing contact."}},"description":"Contains the customer's billing address details.","xml":{"name":"clearent-address"}},"Links":{"type":"object","properties":{"link":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}},"description":"Contains related resource links associated with the customer. Each link includes an id, href, and rel (customer, customer-token, payment-plan, token, transaction).","xml":{"name":"links"}},"Link":{"type":"object","properties":{"rel":{"type":"string","description":"Relationship type describing the linked resource. Possible values: customer customer-token payment-plan token transaction.","enum":["transaction,token,customer,payment-plan,customer-token"]},"href":{"type":"string","description":"URI of the related resource."},"id":{"type":"string","description":"Identifier of the linked resource."}}},"ErrorPayloadResponsePayload":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorPayload"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"ErrorPayload":{"type":"object","properties":{"error-message":{"type":"string","description":"Describes the reason for the error."},"result-code":{"type":"string","description":"Numeric code that identifies the type of error returned by the request."},"time-stamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}},"xml":{"name":"error"}}}}}
```

## Update Payment Plan

> Update the existing payment plan details identified by the specified payment plan key.

```json
{"openapi":"3.0.1","info":{"title":"Recurring Payments API","version":"2.0"},"paths":{"/rest/v2/payment-plans/{paymentPlanKey}":{"put":{"tags":["Payment Plans"],"summary":"Update Payment Plan","description":"Update the existing payment plan details identified by the specified payment plan key.","operationId":"put","parameters":[{"name":"paymentPlanKey","in":"path","description":"Unique identifier of the payment plan.","required":true,"schema":{"type":"string"}},{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment-plans"}},"application/xml":{"schema":{"$ref":"#/components/schemas/payment-plans"}}},"required":true},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/payload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/payload"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}}}}}},"components":{"schemas":{"payment-plans":{"required":["customer-key","end-date","frequency","payment-amount","start-date","token-id"],"type":"object","properties":{"frequency":{"type":"string","description":"Frequency at which the payment plan runs.","enum":["MONTHLY","WEEKLY","YEARLY"]},"metadata":{"type":"object","additionalProperties":{"type":"string","description":"Key-value metadata applied to the plan."},"description":"Key-value metadata applied to the plan."},"plan-key":{"type":"string","description":"Unique identifier of the pricing or payment plan."},"plan-name":{"type":"string","description":"Display name of the payment plan."},"customer-key":{"type":"string","description":"Unique identifier of the customer for whom the payment plan is created."},"customer-name":{"type":"string","description":"Name of the customer associated with the payment plan."},"email-address":{"type":"string","description":"The customer's email address."},"email-receipt":{"type":"string","description":"Indicates whether an email receipt is sent when a payment is processed. If true, a valid email-address must exist on the customer or be provided in the payment plan request."},"token-id":{"type":"string","description":"Identifier of the payment token used for the card or ACH to process payments for the plan."},"frequency-day":{"type":"string","description":"Day on which the payment is processed. For monthly and yearly plans this is the day of the month; for weekly plans, day of week (1-7)."},"payment-amount":{"type":"string","description":"Amount charged to the card for each payment cycle of the plan."},"ach-payment-type":{"type":"string","description":"Specifies the ACH payment type used for the plan."},"start-date":{"type":"string","description":"Specifies the date on which the payment plan becomes effective. If the specified date does not align with the frequency-day, the first payment occurs on the next frequency occurrence."},"end-date":{"type":"string","description":"Date on which the payment plan ends. Maximum of 10 years per plan."},"status":{"type":"string","description":"Current status of the payment plan.","enum":["ACTIVE","CANCELLED","SUSPENDED"]},"status-date":{"type":"string","description":"Date on which the current plan status was updated."},"frequency-month":{"type":"string","description":"Specifies the month of the year when the payment plan is executed. For example, 1 - January, 2 - February, and so on through 12 - December."},"frequency-week":{"type":"string","description":"Specifies the week number within the selected month when the payment plan is executed. Required when frequency is set to WEEKLY."},"links":{"$ref":"#/components/schemas/Links"}},"description":"Represents a recurring payment plan definition.","xml":{"name":"payment-plan"}},"Links":{"type":"object","properties":{"link":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}},"description":"Contains related resource links associated with the customer. Each link includes an id, href, and rel (customer, customer-token, payment-plan, token, transaction).","xml":{"name":"links"}},"Link":{"type":"object","properties":{"rel":{"type":"string","description":"Relationship type describing the linked resource. Possible values: customer customer-token payment-plan token transaction.","enum":["transaction,token,customer,payment-plan,customer-token"]},"href":{"type":"string","description":"URI of the related resource."},"id":{"type":"string","description":"Identifier of the linked resource."}}},"payload":{"type":"object","properties":{"customers":{"$ref":"#/components/schemas/customers"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"customers":{"type":"object","properties":{"customer":{"type":"array","items":{"$ref":"#/components/schemas/customer"}}},"xml":{"name":"customers"}},"customer":{"required":["first-name","last-name"],"type":"object","properties":{"email":{"type":"string","description":"Email address associated with the customer."},"phone":{"type":"string","description":"Primary phone number of the customer."},"comments":{"type":"string","description":"Additional comments associated with the customer profile."},"metadata":{"type":"object","additionalProperties":{"type":"string","description":"Key-value pairs used to store additional information related to the customer."},"description":"Key-value pairs used to store additional information related to the customer."},"customer-key":{"type":"string","description":"A unique identifier defined to reference the customer in external systems."},"first-name":{"type":"string","description":"Customer's first name."},"last-name":{"type":"string","description":"Customer's last name."},"billing-address":{"$ref":"#/components/schemas/Address"},"shipping-address":{"$ref":"#/components/schemas/Address"},"links":{"$ref":"#/components/schemas/Links"}},"description":"Represents a recurring billing customer profile.","xml":{"name":"customer"}},"Address":{"type":"object","properties":{"company":{"type":"string","description":"Company name associated with the billing address."},"street":{"type":"string","description":"Primary street address for the billing."},"street2":{"type":"string","description":"Secondary street address information, if available."},"city":{"type":"string","description":"City associated with the billing address."},"state":{"type":"string","description":"State or province of the billing address."},"zip":{"type":"string","description":"ZIP or postal code of the billing address."},"country":{"type":"string","description":"Country of the billing address."},"phone":{"type":"string","description":"Phone number associated with the billing address."},"first-name":{"type":"string","description":"First name of the billing contact."},"last-name":{"type":"string","description":"Last name of the billing contact."}},"description":"Contains the customer's billing address details.","xml":{"name":"clearent-address"}},"ErrorPayloadResponsePayload":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorPayload"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"ErrorPayload":{"type":"object","properties":{"error-message":{"type":"string","description":"Describes the reason for the error."},"result-code":{"type":"string","description":"Numeric code that identifies the type of error returned by the request."},"time-stamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}},"xml":{"name":"error"}}}}}
```

## Search Payment Plans

> Retrieve a list of payment plans for the specified search and filter criteria.

```json
{"openapi":"3.0.1","info":{"title":"Recurring Payments API","version":"2.0"},"paths":{"/rest/v2/payment-plans":{"get":{"tags":["Payment Plans"],"summary":"Search Payment Plans","description":"Retrieve a list of payment plans for the specified search and filter criteria.","operationId":"searchPlans","parameters":[{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}},{"name":"plan-name","in":"query","description":"Filters payment plans by the plan name.","schema":{"type":"string"}},{"name":"plan-key","in":"query","description":"Filters results by the unique identifier of the payment plan.","schema":{"type":"string"}},{"name":"customer-key","in":"query","description":"Filters payment plans by the unique identifier of the associated customer.","schema":{"type":"string"}},{"name":"customer-name","in":"query","description":"Filters payment plans by the customer name.","schema":{"type":"string"}},{"name":"token-id","in":"query","description":"Filters payment plans by the token associated with the plan.","schema":{"type":"string"}},{"name":"payment-amount","in":"query","description":"Filters payment plans by the payment amount.","schema":{"type":"number"}},{"name":"status","in":"query","description":"Filters payment plans by their current status.","schema":{"type":"string","enum":["SUSPENDED,ACTIVE,CANCELED"]}},{"name":"page","in":"query","description":"Specifies the page number of results to return when pagination is applied.","schema":{"type":"integer"}},{"name":"page-size","in":"query","description":"Specifies the number of results to return per page.","schema":{"type":"integer"}},{"name":"isDescending","in":"query","description":"Specifies the sort order of the results. Set to true for descending order. Default is true.","schema":{"type":"boolean"}},{"name":"order-by","in":"query","description":"Specifies the field used to sort the results.","schema":{"type":"string","enum":["first-name, last-name, customer-key, phone, email"]}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentPlansDtoResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/PaymentPlansDtoResponsePayload"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}}}}}},"components":{"schemas":{"PaymentPlansDtoResponsePayload":{"type":"object","properties":{"payment-plans":{"$ref":"#/components/schemas/PaymentPlansDto"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"payload","xml":{"name":"payload"}},"PaymentPlansDto":{"type":"object","properties":{"payment-plan":{"type":"array","items":{"$ref":"#/components/schemas/payment-plan"}}},"description":"payment-plans","xml":{"name":"payment-plans-dto"}},"payment-plan":{"required":["customer-key","end-date","frequency","payment-amount","start-date","token-id"],"type":"object","properties":{"frequency":{"type":"string","description":"Frequency at which the payment plan runs.","enum":["MONTHLY","WEEKLY","YEARLY"]},"metadata":{"type":"object","additionalProperties":{"type":"string","description":"Key-value metadata applied to the plan."},"description":"Key-value metadata applied to the plan."},"plan-key":{"type":"string","description":"Unique identifier of the pricing or payment plan."},"plan-name":{"type":"string","description":"Display name of the payment plan."},"customer-key":{"type":"string","description":"Unique identifier of the customer for whom the payment plan is created."},"customer-name":{"type":"string","description":"Name of the customer associated with the payment plan."},"email-address":{"type":"string","description":"The customer's email address."},"email-receipt":{"type":"string","description":"Indicates whether an email receipt is sent when a payment is processed. If true, a valid email-address must exist on the customer or be provided in the payment plan request."},"token-id":{"type":"string","description":"Identifier of the payment token used for the card or ACH to process payments for the plan."},"frequency-day":{"type":"string","description":"Day on which the payment is processed. For monthly and yearly plans this is the day of the month; for weekly plans, day of week (1-7)."},"payment-amount":{"type":"string","description":"Amount charged to the card for each payment cycle of the plan."},"ach-payment-type":{"type":"string","description":"Specifies the ACH payment type used for the plan."},"start-date":{"type":"string","description":"Specifies the date on which the payment plan becomes effective. If the specified date does not align with the frequency-day, the first payment occurs on the next frequency occurrence."},"end-date":{"type":"string","description":"Date on which the payment plan ends. Maximum of 10 years per plan."},"status":{"type":"string","description":"Current status of the payment plan.","enum":["ACTIVE","CANCELLED","SUSPENDED"]},"status-date":{"type":"string","description":"Date on which the current plan status was updated."},"frequency-month":{"type":"string","description":"Specifies the month of the year when the payment plan is executed. For example, 1 - January, 2 - February, and so on through 12 - December."},"frequency-week":{"type":"string","description":"Specifies the week number within the selected month when the payment plan is executed. Required when frequency is set to WEEKLY."},"links":{"$ref":"#/components/schemas/Links"}},"description":"Represents a recurring payment plan definition.","xml":{"name":"payment-plan"}},"Links":{"type":"object","properties":{"link":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}},"description":"Contains related resource links associated with the customer. Each link includes an id, href, and rel (customer, customer-token, payment-plan, token, transaction).","xml":{"name":"links"}},"Link":{"type":"object","properties":{"rel":{"type":"string","description":"Relationship type describing the linked resource. Possible values: customer customer-token payment-plan token transaction.","enum":["transaction,token,customer,payment-plan,customer-token"]},"href":{"type":"string","description":"URI of the related resource."},"id":{"type":"string","description":"Identifier of the linked resource."}}},"ErrorPayloadResponsePayload":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorPayload"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"ErrorPayload":{"type":"object","properties":{"error-message":{"type":"string","description":"Describes the reason for the error."},"result-code":{"type":"string","description":"Numeric code that identifies the type of error returned by the request."},"time-stamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}},"xml":{"name":"error"}}}}}
```

## Create Payment Plan

> Create a new payment plan for a customer using the specified plan details.

```json
{"openapi":"3.0.1","info":{"title":"Recurring Payments API","version":"2.0"},"paths":{"/rest/v2/payment-plans":{"post":{"tags":["Payment Plans"],"summary":"Create Payment Plan","description":"Create a new payment plan for a customer using the specified plan details.","operationId":"postPlan","parameters":[{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/payment-plans"}},"application/xml":{"schema":{"$ref":"#/components/schemas/payment-plans"}}},"required":true},"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/payload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/payload"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}}}}}},"components":{"schemas":{"payment-plans":{"required":["customer-key","end-date","frequency","payment-amount","start-date","token-id"],"type":"object","properties":{"frequency":{"type":"string","description":"Frequency at which the payment plan runs.","enum":["MONTHLY","WEEKLY","YEARLY"]},"metadata":{"type":"object","additionalProperties":{"type":"string","description":"Key-value metadata applied to the plan."},"description":"Key-value metadata applied to the plan."},"plan-key":{"type":"string","description":"Unique identifier of the pricing or payment plan."},"plan-name":{"type":"string","description":"Display name of the payment plan."},"customer-key":{"type":"string","description":"Unique identifier of the customer for whom the payment plan is created."},"customer-name":{"type":"string","description":"Name of the customer associated with the payment plan."},"email-address":{"type":"string","description":"The customer's email address."},"email-receipt":{"type":"string","description":"Indicates whether an email receipt is sent when a payment is processed. If true, a valid email-address must exist on the customer or be provided in the payment plan request."},"token-id":{"type":"string","description":"Identifier of the payment token used for the card or ACH to process payments for the plan."},"frequency-day":{"type":"string","description":"Day on which the payment is processed. For monthly and yearly plans this is the day of the month; for weekly plans, day of week (1-7)."},"payment-amount":{"type":"string","description":"Amount charged to the card for each payment cycle of the plan."},"ach-payment-type":{"type":"string","description":"Specifies the ACH payment type used for the plan."},"start-date":{"type":"string","description":"Specifies the date on which the payment plan becomes effective. If the specified date does not align with the frequency-day, the first payment occurs on the next frequency occurrence."},"end-date":{"type":"string","description":"Date on which the payment plan ends. Maximum of 10 years per plan."},"status":{"type":"string","description":"Current status of the payment plan.","enum":["ACTIVE","CANCELLED","SUSPENDED"]},"status-date":{"type":"string","description":"Date on which the current plan status was updated."},"frequency-month":{"type":"string","description":"Specifies the month of the year when the payment plan is executed. For example, 1 - January, 2 - February, and so on through 12 - December."},"frequency-week":{"type":"string","description":"Specifies the week number within the selected month when the payment plan is executed. Required when frequency is set to WEEKLY."},"links":{"$ref":"#/components/schemas/Links"}},"description":"Represents a recurring payment plan definition.","xml":{"name":"payment-plan"}},"Links":{"type":"object","properties":{"link":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}},"description":"Contains related resource links associated with the customer. Each link includes an id, href, and rel (customer, customer-token, payment-plan, token, transaction).","xml":{"name":"links"}},"Link":{"type":"object","properties":{"rel":{"type":"string","description":"Relationship type describing the linked resource. Possible values: customer customer-token payment-plan token transaction.","enum":["transaction,token,customer,payment-plan,customer-token"]},"href":{"type":"string","description":"URI of the related resource."},"id":{"type":"string","description":"Identifier of the linked resource."}}},"payload":{"type":"object","properties":{"customers":{"$ref":"#/components/schemas/customers"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"customers":{"type":"object","properties":{"customer":{"type":"array","items":{"$ref":"#/components/schemas/customer"}}},"xml":{"name":"customers"}},"customer":{"required":["first-name","last-name"],"type":"object","properties":{"email":{"type":"string","description":"Email address associated with the customer."},"phone":{"type":"string","description":"Primary phone number of the customer."},"comments":{"type":"string","description":"Additional comments associated with the customer profile."},"metadata":{"type":"object","additionalProperties":{"type":"string","description":"Key-value pairs used to store additional information related to the customer."},"description":"Key-value pairs used to store additional information related to the customer."},"customer-key":{"type":"string","description":"A unique identifier defined to reference the customer in external systems."},"first-name":{"type":"string","description":"Customer's first name."},"last-name":{"type":"string","description":"Customer's last name."},"billing-address":{"$ref":"#/components/schemas/Address"},"shipping-address":{"$ref":"#/components/schemas/Address"},"links":{"$ref":"#/components/schemas/Links"}},"description":"Represents a recurring billing customer profile.","xml":{"name":"customer"}},"Address":{"type":"object","properties":{"company":{"type":"string","description":"Company name associated with the billing address."},"street":{"type":"string","description":"Primary street address for the billing."},"street2":{"type":"string","description":"Secondary street address information, if available."},"city":{"type":"string","description":"City associated with the billing address."},"state":{"type":"string","description":"State or province of the billing address."},"zip":{"type":"string","description":"ZIP or postal code of the billing address."},"country":{"type":"string","description":"Country of the billing address."},"phone":{"type":"string","description":"Phone number associated with the billing address."},"first-name":{"type":"string","description":"First name of the billing contact."},"last-name":{"type":"string","description":"Last name of the billing contact."}},"description":"Contains the customer's billing address details.","xml":{"name":"clearent-address"}},"ErrorPayloadResponsePayload":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorPayload"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"ErrorPayload":{"type":"object","properties":{"error-message":{"type":"string","description":"Describes the reason for the error."},"result-code":{"type":"string","description":"Numeric code that identifies the type of error returned by the request."},"time-stamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}},"xml":{"name":"error"}}}}}
```

## Get Payment Plan Expected Runs

> Retrieve the scheduled payment run dates for a payment plan identified by the specified payment plan key.

```json
{"openapi":"3.0.1","info":{"title":"Recurring Payments API","version":"2.0"},"paths":{"/rest/v2/payment-plans/{paymentPlanKey}/expected-runs":{"get":{"tags":["Payment Plans"],"summary":"Get Payment Plan Expected Runs","description":"Retrieve the scheduled payment run dates for a payment plan identified by the specified payment plan key.","operationId":"getExpectedRuns","parameters":[{"name":"paymentPlanKey","in":"path","description":"Unique identifier of the payment plan.","required":true,"schema":{"type":"string"}},{"name":"start","in":"query","description":"Specifies the start date of the date range used to calculate expected payment runs. Format: YYYY-MM-DD.","required":true,"schema":{"type":"string","format":"date"}},{"name":"end","in":"query","description":"Specifies the end date of the date range used to calculate expected payment runs. Format: YYYY-MM-DD.","required":true,"schema":{"type":"string","format":"date"}},{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpectedRunsResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ExpectedRunsResponsePayload"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}}}}}},"components":{"schemas":{"ExpectedRunsResponsePayload":{"type":"object","properties":{"expected-runs":{"$ref":"#/components/schemas/ExpectedRuns"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"payload","xml":{"name":"payload"}},"ExpectedRuns":{"type":"object","properties":{"expectedRun":{"type":"array","xml":{"name":"expected-run"},"items":{"$ref":"#/components/schemas/ExpectedRun"}}},"description":"expected-runs","xml":{"name":"expected-runs"}},"ExpectedRun":{"type":"object","properties":{"amount":{"type":"number","description":"Amount expected to be processed in this run."},"plan-detail-key":{"type":"string","description":"Identifier for Plan"},"fire-time":{"type":"string","description":"Scheduled time for the expected run.","format":"date-time"}},"description":"expected-run","xml":{"name":"expected-run"}},"ErrorPayloadResponsePayload":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorPayload"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"ErrorPayload":{"type":"object","properties":{"error-message":{"type":"string","description":"Describes the reason for the error."},"result-code":{"type":"string","description":"Numeric code that identifies the type of error returned by the request."},"time-stamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}},"xml":{"name":"error"}}}}}
```

## Delete Payment Plan

> Delete an existing payment plan identified by the specified plan key.

```json
{"openapi":"3.0.1","info":{"title":"Recurring Payments API","version":"2.0"},"paths":{"/rest/v2/payment-plans/{planKey}":{"delete":{"tags":["Payment Plans"],"summary":"Delete Payment Plan","description":"Delete an existing payment plan identified by the specified plan key.","operationId":"deleteSinglePlan","parameters":[{"name":"planKey","in":"path","description":"Unique identifier of the payment plan.","required":true,"schema":{"type":"string"}},{"name":"api-key","in":"header","description":"An access API key issued to you by Xplor Pay.","required":true,"schema":{"type":"string"}}],"responses":{"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}},"application/xml":{"schema":{"$ref":"#/components/schemas/ErrorPayloadResponsePayload"}}}}}}}},"components":{"schemas":{"ErrorPayloadResponsePayload":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/ErrorPayload"},"payloadType":{"type":"string","description":"Type of payload returned in the response.","xml":{"name":"type","attribute":true}}},"description":"Payload","xml":{"name":"payload"}},"ErrorPayload":{"type":"object","properties":{"error-message":{"type":"string","description":"Describes the reason for the error."},"result-code":{"type":"string","description":"Numeric code that identifies the type of error returned by the request."},"time-stamp":{"type":"string","description":"Date and time when the error occurred, ISO 8601 format (UTC)."}},"xml":{"name":"error"}}}}}
```
