Skip to main content

PayPal Community

  • Dashboard
  • Send and Request
  • Wallet
  • Business
  • Help
Log in

Le Forum de la communauté n’est pas disponible pour les nouveaux messages ou les réponses; les articles précédents restent disponibles pour vérification. Afin de connaître les options d’assistance complètes, rendez-vous sur PayPal.com/HelpCenter

Si vous souhaitez signaler du contenu illégal et contraire au Règlement sur les services numériques de l’Union Européenne (DSA), veuillez cliquer ici.

since ‎Jul-16-2021
synagen
synagen Contributor
Contributor
4
Posts
1
Kudos
0
Solutions
Liked
Your PayPal Anniversary
Ice Breaker
The Return
New Look
Active
View all
Topics synagen has Participated In
  • Topics synagen has Participated In
  • Latest Contributions by synagen

Re: Learn what's new with PayPal Subscriptions

by AdamGreen Contributor in REST APIs
‎Oct-31-2022 01:37 AM
‎Oct-31-2022 01:37 AM
    "reference_id" => $subscrID,  "amount" => [ "value" => "1.77",  "currency_code" => "USD" ] ]],  "redirect_urls" => [ "cancel_url" => "https://calltaker.co/return",  "return_url" => "https://calltaker.co/return"     here you need to make changes according to your example and everything will work out. Try it. If not, contact the experts from [removed], they will help you.  ... View more

Re: Subscription - revise quantity

by mrrobk Member in REST APIs
‎Sep-01-2022 03:43 AM
‎Sep-01-2022 03:43 AM
Thanks @endymon This solved the problem. I hade a daily subscription in sandbox and tried to revise the billing details for a subscription within 24 hours of the next scheduled billing. When doing it for a monthly subscription with renewal 30 days into future it worked.   The fact that the next billing could not be closer then 24 hours was not documented anywhere in the REST API.     ... View more

Unable to vary qty of a subscription with REST API

by synagen Contributor in Merchant Products and Services Archives
‎Jul-16-2021 09:04 PM
‎Jul-16-2021 09:04 PM
I have a monthly subscription plan set up in my merchant account that is quantity based (per registered user of the web site). A customer subscribes to the web site and selects a plan for monthly billing. The number of registered users of the client can vary, and so I need the web site to automatically vary the quantity of the customer's subscription whenever the number of users of that subscription changes. I have created a test REST API interface that attempts to change the quantity of the individual subscription, knowing the customer's subscription ID. The code runs without error and returns Status 204, but the customer's subscription on my Paypal does not change the qty, description or total monthly charge. <?php namespace PayPal\Api; require '/opt/bitnami/php/bin/vendor/autoload.php'; use PayPalCheckoutSdk\Orders\OrdersPatchRequest; use PayPalCheckoutSdk\Orders\OrdersGetRequest; use PayPalCheckoutSdk\Orders\OrdersCreateRequest; use PayPalCheckoutSdk\Core\PayPalHttpClient; use PayPalCheckoutSdk\Core\ProductionEnvironment; include('globals.php'); // defines the following fields: /* GLOBAL $paypal_URL; GLOBAL $paypal_account; GLOBAL $paypal_client_id; GLOBAL $paypal_secret; GLOBAL $APIusername; GLOBAL $APIpassword; GLOBAL $APIURL; GLOBAL $paypal_merchantID; GLOBAL $paypal; GLOBAL $PaypalAccountID; */ $merchant_id=$paypal_merchantID; $subscrID ='I-YT07M8NCEMRN'; // hard-coded subscription ID for testing ini_set('error_reporting', E_ALL); // or error_reporting(E_ALL); ini_set('display_errors', '1'); ini_set('display_startup_errors', '1'); $environment=new ProductionEnvironment($paypal_client_id, $paypal_secret); $client = new PayPalHttpClient($environment); $request = new OrdersCreateRequest(); $request->prefer("return=representation"); // hard coded change Qty to 3 $request->body =[ "intent" => "CAPTURE", "purchase_units" => [[ "reference_id" => $subscrID, "amount" => [ "value" => "1.23", "currency_code" => "USD" ] ]], "redirect_urls" => [ "cancel_url" => "https://calltaker.co/cancel", "return_url" => "https://calltaker.co/return" ] ]; $createdOrder = $client->execute($request); $request2 = new OrdersPatchRequest($createdOrder->result->id); $request2->body = [ [ "op" => "add", "path" => "/purchase_units/@reference_id=='$subscrID'/description", "value" => "3 user license" ], [ "op" => "replace", "path" => "/purchase_units/@reference_id=='$subscrID'/amount", "resource"=>[ "quantity"=>"3" ], "value" => [ "currency_code" => "USD", "value" => "1.56", "quantity" => "3" ] ] ]; $response2 = $client->execute($request2); ?> ... View more
Labels:
  • Labels:
  • Recurring Payments
  • Working Capital
Paypal Logo
  • Help
  • Contact Us
  • Security
  • Fees
  • © 1999-2025 PayPal, Inc. All rights reserved.
  • Privacy
  • Legal
  • Cookies
  • Policy Updates

The money in your balance is eligible for pass-through FDIC insurance.

The PayPal Cash Mastercard is issued by The Bancorp Bank pursuant to a license by Mastercard International Incorporated. The Bancorp Bank; Member FDIC.

Powered by Khoros