- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
Menu
- Get Started
- Product
- Resources
- Tools & SDKs
- Framework
- Reference
- User Guide
createPaymentMethods - Payment Module Reference
This documentation provides a reference to the createPaymentMethods
method. This belongs to the Payment Module.
Note: You should only use this methods when implementing complex customizations. For common cases, check out available workflows instead.
createPaymentMethods(data, sharedContext?): Promise<PaymentMethodDTO[]>#
This method creates payment methods.
Example#
1const paymentMethods =2 await paymentModuleService.createPaymentMethods([3 {4 provider_id: "pp_stripe_stripe",5 data: {6 customer_id: "cus_123",7 },8 context: {9 accountHolder: {10 data: {11 id: "acc_holder_123",12 },13 },14 },15 },16 {17 provider_id: "pp_stripe_stripe",18 data: {19 customer_id: "cus_123",20 },21 context: {22 accountHolder: {23 data: {24 id: "acc_holder_123",25 },26 },27 },28 },29 ])
Parameters#
data
CreatePaymentMethodDTO[]The payment methods to create.
data
CreatePaymentMethodDTO[]Returns#
Promise
Promise<PaymentMethodDTO[]>The created payment methods.
Promise
Promise<PaymentMethodDTO[]>createPaymentMethods(data, sharedContext?): Promise<PaymentMethodDTO>#
This method creates a payment method.
Example#
Parameters#
The payment method to create.
Returns#
Promise
Promise<PaymentMethodDTO>The created payment method.
Promise
Promise<PaymentMethodDTO>Was this page helpful?