-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathparameters.ts
More file actions
31 lines (29 loc) · 1.81 KB
/
Copy pathparameters.ts
File metadata and controls
31 lines (29 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { type PaymentMethod } from '../../../data/global';
import { type PaymentData } from '../../../data/payments/data';
import type MaybeArray from '../../../types/MaybeArray';
import { type IdempotencyParameter, type TestModeParameter } from '../../../types/parameters';
interface ContextParameters extends TestModeParameter {
orderId: string;
}
export type CreateParameters = ContextParameters &
Pick<PaymentData, 'mandateId' | 'applicationFee'> & {
/**
* Normally, a payment method screen is shown. However, when using this parameter, you can choose a specific payment method and your customer will skip the selection screen and is sent directly to
* the chosen payment method. The parameter enables you to fully integrate the payment method selection into your website.
*
* You can also specify the methods in an array. By doing so we will still show the payment method selection screen but will only show the methods specified in the array. For example, you can use
* this functionality to only show payment methods from a specific country to your customer `["bancontact", "belfius"]`.
*
* Possible values: `applepay` `bancontact` `banktransfer` `belfius` `creditcard` `directdebit` `eps` `giftcard` `giropay` `ideal` `in3` `kbc` `klarnapaylater` `klarnapaynow` `klarnasliceit`
* `paypal` `paysafecard` `przelewy24` `sofort`
*
* @see https://docs.mollie.com/reference/v2/orders-api/create-order-payment?path=method#parameters
*/
method?: MaybeArray<PaymentMethod>;
/**
* The ID of the customer for whom the payment is being created. This is used for recurring payments and single-click payments.
*
* @see https://docs.mollie.com/reference/v2/orders-api/create-order-payment?path=customerId#parameters
*/
customerId?: string;
} & IdempotencyParameter;