Skip to content

Commit

Permalink
feat: add currency to subscription creation payload (#271)
Browse files Browse the repository at this point in the history
* feat: add currency to subscription creation payload

* Update services/stripe-billing/lib/index.js

Co-authored-by: Romain Gabilan <romain.gabilan@epitech.eu>

---------

Co-authored-by: Romain Gabilan <romain.gabilan@epitech.eu>
  • Loading branch information
rombat and Romain Gabilan committed Nov 24, 2023
1 parent 63664cf commit af884bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/stripe-billing/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,11 @@ module.exports = class StripeBillingService extends CampsiService {
promotion_code: req.body.promotion_code,
expand: buildExpandFromBody(req.body, subscriptionExpand),
default_tax_rates: req.body.default_tax_rates,
default_source: req.body.default_source
default_source: req.body.default_source,
};
if (req.body.currency) {
params.currency = req.body.currency;
}
const idempotencyKey = this.createIdempotencyKey(params, 'subscriptions.create');
stripe.subscriptions.create(params, { idempotencyKey }, defaultHandler(res)
);
Expand Down

0 comments on commit af884bd

Please sign in to comment.