1
0
Files
PayPal-PHP-Server-SDK/doc/models/plan.md
Patrick Powers 504c367386 Release 0.7.0
Beta Release 0.7.0 including:

- Bug fixes
- Updated model/function names
- Updated models to reflect changes in APIs
2025-03-20 13:18:55 -05:00

2.3 KiB

Plan

The merchant level Recurring Billing plan metadata for the Billing Agreement.

Structure

Plan

Fields

Name Type Tags Description Getter Setter
billingCycles BillingCycle[] Required An array of billing cycles for trial billing and regular billing. A plan can have at most two trial cycles and only one regular cycle.
Constraints: Minimum Items: 1, Maximum Items: 3
getBillingCycles(): array setBillingCycles(array billingCycles): void
product mixed Optional Product details associated with any one-time product purchase. getProduct(): setProduct( product): void
oneTimeCharges OneTimeCharge Required The one-time charge info at the time of checkout. getOneTimeCharges(): OneTimeCharge setOneTimeCharges(OneTimeCharge oneTimeCharges): void
name ?string Optional Name of the recurring plan.
Constraints: Minimum Length: 1, Maximum Length: 127, Pattern: ^[A-Za-z0-9() +',.:-]+$
getName(): ?string setName(?string name): void

Example (as JSON)

{
  "billing_cycles": [
    {
      "tenure_type": "REGULAR",
      "total_cycles": 1,
      "sequence": 1,
      "pricing_scheme": {
        "price": {
          "currency_code": "currency_code8",
          "value": "value4"
        },
        "pricing_model": "AUTO_RELOAD",
        "reload_threshold_amount": {
          "currency_code": "currency_code0",
          "value": "value6"
        }
      },
      "frequency": {
        "key1": "val1",
        "key2": "val2"
      },
      "start_date": "start_date6"
    }
  ],
  "one_time_charges": {
    "setup_fee": {
      "currency_code": "currency_code8",
      "value": "value4"
    },
    "shipping_amount": {
      "currency_code": "currency_code0",
      "value": "value6"
    },
    "taxes": {
      "currency_code": "currency_code6",
      "value": "value2"
    },
    "product_price": {
      "currency_code": "currency_code6",
      "value": "value2"
    },
    "subtotal": {
      "currency_code": "currency_code2",
      "value": "value8"
    },
    "total_amount": {
      "currency_code": "currency_code2",
      "value": "value8"
    }
  },
  "product": {
    "key1": "val1",
    "key2": "val2"
  },
  "name": "name8"
}