1. How to make a subscription that the user would pay every minute, do not want to wait for the day to pass (I notify the server about the payment using Stripe Webhook).
  2. How to create a subscription for example for 7 months? If I understand correctly, the subscription is created and just paid until you stop.

    private Plan createStripePlan(String interval, String stripePlanID, Long amount, User user) { Stripe.apiKey = this.secretKey; Map<String, Object> params = new HashMap<>(); params.put("currency", "eur"); params.put("interval", "day"); params.put("product", stripePlanID); params.put("nickname", user.getEmail()); params.put("amount", amount); try { return Plan.create(params); } catch (AuthenticationException e) { e.printStackTrace(); } catch (InvalidRequestException e) { e.printStackTrace(); } catch (APIConnectionException e) { e.printStackTrace(); } catch (CardException e) { e.printStackTrace(); } catch (APIException e) { e.printStackTrace(); } return null; } private Subscription createSubscription(String planID, String customerID, Integer months) { Stripe.apiKey = this.secretKey; Map<String, Object> item = new HashMap<>(); item.put("plan", planID); Map<String, Object> items = new HashMap<>(); items.put("0", item); Map<String, Object> params = new HashMap<>(); params.put("customer", customerID); params.put("billing", "charge_automatically"); params.put("items", items); try { return Subscription.create(params); } catch (AuthenticationException e) { e.printStackTrace(); } catch (InvalidRequestException e) { e.printStackTrace(); } catch (APIConnectionException e) { e.printStackTrace(); } catch (CardException e) { e.printStackTrace(); } catch (APIException e) { e.printStackTrace(); } return null; 

    }

    0