submitDetails
Submits details for a payment created using makePayment SDK method.
It should be called from onAdditionalDetails hook of Adyen Drop-in. It communicates with the submitDetails endpoint of the Vue Storefront API Middleware. In turn, it calls the POST /payments/details Adyen endpoint indirectly via commercetools, using Adyen commercetools.
Signature
export declare function submitDetails(
props: SubmitDetailsParams,
options?: MethodOptions
): Promise<SubmitDetailsResponse>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
props | Required | SubmitDetailsParams | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
options | Optional | MethodOptions | Options that can be passed to additionally configure the request or customize the logic in a plugin. |
Returns
Returns Promise<SubmitDetailsResponse>
Referenced Types
- SubmitDetailsParams
- MethodOptions
SubmitDetailsResponse
Examples
Submits details for a payment created using makePayment SDK method. For full context, check the Alokai's documentation.
import { sdk } from '~/sdk.config.ts';
// ... Inside adyenConfiguration.onAdditionalDetails property passed in object to the mountPaymentElement SDK method call
const result = await sdk.adyen.submitDetails({
paymentId: getPaymentMethodsResponse.payment.id,
componentData: state.data,
});