Home > @poq/sdk-sfcc > IBasketsClient > postBasketsByIDPaymentInstruments
Adds a payment instrument to a basket. Payment instruments are usually authorized after order creation, for example in a custom hook. The default payment authorization process executes an authorization when a payment instrument is added to an order or updated. See POST /orders/{order_no}/payment_instruments and PATCH /orders/{order_no}/payment_instruments/{payment_instrument_id}. NOTE: If CREDIT_CARD is selected as the payment_method_id, it is mandatory to provide the property card_type.
Signature:
postBasketsByIDPaymentInstruments(basketId: string, body: BasketPaymentInstrumentRequest, options?: RequestOptions): Promise<PoqResponse<Basket>>;
Parameter | Type | Description |
---|---|---|
basketId | string | the basket id |
body | BasketPaymentInstrumentRequest | |
options | RequestOptions | (Optional) Override http request option. |
Returns:
Promise<PoqResponse<Basket>>