-1

I am making paypal subscription plans. I am facing two problems. First, Is there a way to make a plan without trial period? Second, Paypal is not charging customer after trial period ends.

 let body = {    
    "product_id": "PROD-81J67779NH423045A",  
    "name": obj.pname,  
    "description": obj.description,  
    "billing_cycles": [  
      {  
        "frequency": {  
            "interval_unit": "DAY",  
            "interval_count": 1  
        },  
        "tenure_type": "TRIAL",  
        "sequence": 1,  
        "total_cycles": 1
      },  
        {  
          "frequency": {  
            "interval_unit":  obj.duration,  
            "interval_count": 1  
          },  
          "tenure_type": "REGULAR",  
          "sequence": 2,  
          "total_cycles": 12,  
          "pricing_scheme": {  
            "fixed_price": {  
              "value": obj.price,  
              "currency_code": "USD"  
            }  
          }  
        }  
      ],  
    "payment_preferences": {  
      "service_type": "PREPAID",  
      "auto_bill_outstanding": true,  
      "setup_fee": {  
        "value": obj.price,  
        "currency_code": "USD"  
      },  
      "setup_fee_failure_action": "CONTINUE",  
      "payment_failure_threshold": 3  
    },  
    "quantity_supported": true,  
    "taxes": {  
      "percentage": obj.tax,  
      "inclusive": false  
    }  
} 
James Z
  • 12,209
  • 10
  • 24
  • 44
qaxim al
  • 61
  • 1
  • 7

1 Answers1

0

You can have a plan without a TRIAL period.

Remove that whole block, and have the REGULAR one be sequence: 1.


As for it 'not charging', you probably haven't waited enough 24 hour cycles for it to kick in. Subscriptions bill in a batch, and so it can take some portion of the day for the initial non-billing trial period to even start, and then a day for that to run.

Preston PHX
  • 27,642
  • 4
  • 24
  • 44
  • And i subscribed 19/08/2020 with one day free trial and go through with my status. next payment on: 20/08/2020 Next payment amount: $0.00 – qaxim al Aug 21 '20 at 23:48
  • next payment date is 20/08/2020 but it must be 20/09/2020 and total billed amount is also $0.00 – qaxim al Aug 22 '20 at 06:24
  • You set a 1 day trial for 0.00, so if it "must" be something different you need to set something else. – Preston PHX Aug 22 '20 at 06:48
  • I remove the trial block and subscribe on 21/08/2020 but next payment on is still 21/08/2020. It should be 21/09/2020. – qaxim al Aug 23 '20 at 12:47
  • Subscriptions bill in a batch. The first payment will be within 24 hours of checkout. So, no; 21/09/2020 will be the second payment of a monthly cycle. – Preston PHX Aug 23 '20 at 16:17
  • Definitely, but when i check my subscription status through https://www.sandbox.paypal.com/myaccount/autopay/connect/I-YC2MAMTS1EB5 this link. There is a field "Next Payment on : 21/08/2020". But it should be 21/09/2020. – qaxim al Aug 24 '20 at 06:36
  • Confirm the email of your sandbox receiving Business account via https://www.sandbox.paypal.com/businessprofile/settings/email and https://developer.paypal.com/developer/notifications/ , then test recurring payments. – Preston PHX Aug 24 '20 at 06:57