View as Markdown
API Spec (JSON)
API Spec (YAML)
Compact modeHides field descriptions and other prose for a more compact, scannable view of the API reference.Client CredentialsToken URLhttps://api-m.sandbox.paypal.com/v1/oauth2/tokenInheaderScopes
https://uri.paypal.com/services/subscriptionsPreferstringOptionalreturn=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.return=representation. The server returns a complete resource representation, including the current state of the resource.PayPal-Client-Metadata-IdstringOptionalapplication/json
TypeScript Definitions
Use the request body type in TypeScript.
start_timestring<date_time>Optionalshipping_amountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredsubscriberobject<subscriber_request>Optionalemail_addressstring<email>Optionalnameobject<name>Optionalphoneobject<phone_with_type>Optionalphone_typeenum<phone_type>Optionalnational_numberstringRequiredshipping_addressobject<shipping_detail>Optionalnameobject<name>Optionalemail_addressstring<email_address>Optionalcountry_codestringRequirednational_numberstringRequiredtypeenumOptionaloptionsobject<shipping_option>[]Optionaltypeenum<shipping_type>Optionalamountobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredselectedbooleanRequiredaddressobject<Portable Postal Address (Medium-Grained)>Optionaladmin_area_1stringOptionalcountry_codestring<country_code>RequiredNote: The country code for Great Britain isGBand notUKas used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
payment_sourceobject<payment_source>Optionalcardobject<card_request>Optionalexpirystring<date_year_month>Optionaltypeenum<card_type>Optionalbrandenum<card_brand>Optionalbilling_addressobject<Portable Postal Address (Medium-Grained)>Optionaladmin_area_1stringOptionalcountry_codestring<country_code>RequiredNote: The country code for Great Britain isGBand notUKas used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
attributesobject<card_attributes>Optionalcustomerobject<card_customer>Optionalidstring<merchant_partner_customer_id>Optionalemail_addressstring<email>Optionalphoneobject<phone_with_type>Optionalphone_typeenum<phone_type>Optionalnational_numberstringRequiredvaultobject<vault_instruction_base>Optionalstore_in_vaultenum<store_in_vault_instruction>Optionalverificationobject<card_verification>OptionalmethodenumOptionalapplication_contextobject<application_context>OptionalDeprecatedlocalestring<language>OptionalDeprecatedshipping_preferenceenumOptionalDeprecateduser_actionenumOptionalDeprecatedpayee_preferredenum<payee_payment_method_preference>Optionalplanobject<plan_override>Optionalbilling_cyclesobject<billing_cycle_override>[]Optionalpricing_schemeobject<pricing_scheme>Optionalfixed_priceobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredtiersobject<pricing_tier>[]Optionalamountobject<money>Requiredcurrency_codestring<currency_code>RequiredvaluestringRequiredtotal_cyclesintegerOptional1 and 999 for total_cycles). Regular billing cycles can be executed infinite times (value of 0 for total_cycles) or a finite number of times (value between 1 and 999 for total_cycles).payment_preferencesobject<payment_preferences_override>Optionalsetup_feeobject<money>Optionalcurrency_codestring<currency_code>RequiredvaluestringRequiredsetup_fee_failure_actionenumOptionaltaxesobject<taxes_override>Optionalpercentagestring<percentage>Optionalmerchant_inventorymerchant_inventoryOptionalapplication/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/billing/subscriptions" \ -H "Content-Type: string" \ -H "Content-Type: application/json" \ -d '{ "plan_id": "stringstringstringstringst" }'{ "status": "APPROVAL_PENDING", "status_change_note": "string", "status_update_time": "stringstringstringst", "id": "string", "plan_id": "string", "start_time": "stringstringstringst", "quantity": "string", "shipping_amount": { "currency_code": "str", "value": "string" }, "subscriber": { "email_address": "string", "payer_id": "stringstrings", "name": { "given_name": "string", "surname": "string" }, "shipping_address": { "name": { "full_name": "string" }, "email_address": "string", "phone_number": { "country_code": "str", "national_number": "string" }, "type": "SHIPPING", "options": [], "address": { "address_line_1": "string", "address_line_2": "string", "admin_area_2": "string", "admin_area_1": "string", "postal_code": "string", "country_code": "st" } }, "payment_source": { "card": { "last_digits": "string", "brand": "VISA", "available_networks": [ "VISA" ], "type": "CREDIT", "authentication_result": { "liability_shift": "NO", "three_d_secure": { "authentication_status": "Y", "enrollment_status": "Y" } }, "attributes": { "vault": { "id": "string", "status": "VAULTED", "links": [ { "href": "string", "rel": "string", "method": "GET" } ], "customer": { "id": "string", "email_address": "string", "phone": { "phone_type": "FAX", "phone_number": { "national_number": "string" } }, "merchant_customer_id": "string" } } }, "from_request": { "expiry": "strings", "last_digits": "stri" }, "bin_details": { "bin": "string", "issuing_bank": "string", "bin_country_code": "st", "products": [ "string" ] }, "stored_credential": { "payment_initiator": "CUSTOMER", "payment_type": "ONE_TIME", "usage": "FIRST", "previous_network_transaction_reference": { "id": "stringstr", "date": "stri", "network": "VISA", "acquirer_reference_number": "string" } }, "name": "string", "billing_address": { "address_line_1": "string", "address_line_2": "string", "admin_area_2": "string", "admin_area_1": "string", "postal_code": "string", "country_code": "st" }, "expiry": "strings", "currency_code": "str" } } }, "billing_info": { "outstanding_balance": { "currency_code": "str", "value": "string" }, "cycle_executions": [], "last_payment": { "amount": { "currency_code": "str", "value": "string" }, "time": "stringstringstringst" }, "next_billing_time": "stringstringstringst", "final_payment_time": "stringstringstringst", "failed_payments_count": 0, "last_failed_payment": { "amount": { "currency_code": "str", "value": "string" }, "time": "stringstringstringst", "reason_code": "PAYMENT_DENIED", "next_payment_retry_time": "stringstringstringst" } }, "create_time": "stringstringstringst", "update_time": "stringstringstringst", "payer_holding_preference": null, "custom_id": "string", "plan_overridden": true, "plan": { "product_id": "stringstringstringstri", "name": "string", "description": "string", "billing_cycles": [ { "pricing_scheme": { "version": 0, "fixed_price": { "currency_code": "str", "value": "string" }, "pricing_model": "VOLUME", "tiers": [ { "starting_quantity": "string", "ending_quantity": "string", "amount": { "currency_code": "str", "value": "string" } } ], "create_time": "stringstringstringst", "update_time": "stringstringstringst" }, "frequency": { "interval_unit": "DAY", "interval_count": 1 }, "tenure_type": "REGULAR", "sequence": 1, "total_cycles": 1 } ], "payment_preferences": { "auto_bill_outstanding": true, "setup_fee": { "currency_code": "str", "value": "string" }, "setup_fee_failure_action": "CONTINUE", "payment_failure_threshold": 0 }, "merchant_preferences": { "return_url": "http://example.com", "cancel_url": "http://example.com" }, "taxes": { "percentage": "string", "inclusive": true }, "quantity_supported": false }, "links": [ { "href": "string", "rel": "string", "method": "GET" } ]}