Subscription start date issue

lu_lu_
Contributor
Contributor

Hi 👋🏻,

I currently develop an option to subscribe to my website and have created following subscription in sandbox:

 

{
  "plan_id": "[my_plan_id]",
  "quantity": "1",
  "application_context": {
      "brand_name": "test",
      "user_action": "SUBSCRIBE_NOW",
      "payment_method": {
            "payer_selected": "PAYPAL",
            "payee_preferred": "IMMEDIATE_PAYMENT_REQUIRED"
      },
      "return_url": "https://example.com/returnUrl",
      "cancel_url": "https://example.com/cancelUrl"
    }
}

Now i subscribe with my client test account to this subscription.

Everything works fine but the start time of the subscription i one day in the past.

 

subscriptionsubscription

The start time should be 24.05.2020 (because the default start time, if not set in json, should be the current date -pay pal api documentation).

Same problem if i set a value for the "start time" attribute. 

Maybe its an issue with my timezone (UTC+2h, Germany) or i am missing something.


Please help and thanks in advance.

Login to Me Too
5 REPLIES 5

MTS-Aaron
PayPal Employee
PayPal Employee

Hi @lu_lu_ 

 

I'm not sure why the date would show as one versus the other. Might be a timezone thing. If you want to be sure, you can define a "Start Time" as you can see in the API reference here.

 

Hope this helps!

-Aaron

Login to Me Too

lu_lu_
Contributor
Contributor

Hi @MTS-Aaron thank you for the reply 😊

I have already tried to set the start_time (with and without an timezone) of the subscription manually. 

 

Same response (start_time) as with not setting it.

More Information: 

Sandbox client account => timezone germany

Sandbox business account => timezone germany

 

Correct me if i'm wrong, but i think the api takes the given dat[Removed. Phone #s not permitted]00:00) throws away the time and substract 2 hours (because i'm 2 hours after UTC) <= If that makes any sense?! 😂

Login to Me Too

drashtikheni
Contributor
Contributor

Hi, I am having the same issue.
How did you solve it?

 

Thanks in advance.

Login to Me Too

RgDee
Contributor
Contributor

Same here. Sending createSubscription via Paypal JS-SDK and giving 2 Paramters:

{'plan_id': 'P-XXXXXXXXXXXXXXXXXXXXXXXX', 'start_time': '2024-12-16T00:00:00'}

or

{'plan_id': 'P-XXXXXXXXXXXXXXXXXXXXXXXX', 'start_time': '2024-12-16'}

Results in  

 

{
  "name": "INVALID_REQUEST",
  "message": "Request is not well-formed, syntactically incorrect, or violates schema.",
  "debug_id": "f8306746b80a8",
  "details": [
    {
      "field": "/start_time",
      "value": "2024-12-16T00:00:00",
      "location": "body",
      "issue": "INVALID_PARAMETER_SYNTAX",
      "description": "The value of a field does not conform to the expected format."
    }
  ],
  "links": [
    {
      "href": "https://developer.paypal.com/docs/api/v1/billing/subscriptions#INVALID_REQUEST",
      "rel": "information_link",
      "method": "GET"
    }
  ]
}
Login to Me Too

RgDee
Contributor
Contributor

Is this still a problem and should we file a bug ticket anywhere?

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.