Alokai

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

NameRequiredTypeDescription
propsRequiredSubmitDetailsParamsParameter object which can be used with this method. Refer to its type definition to learn about possible properties.
optionsOptionalMethodOptionsOptions that can be passed to additionally configure the request or customize the logic in a plugin.

Returns

Returns Promise<SubmitDetailsResponse>

Referenced Types

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,
});

On this page