PurseHeadlessCheckoutSecondaryTokenProvider
Methods
getSecondaryToken()
getSecondaryToken(
pan,
cvv?,
signal?): Promise<PurseHeadlessCheckoutTemporarySecondaryToken>;
Parameters
| Parameter | Type | Description |
|---|---|---|
pan | string | - |
cvv? | string | - |
signal? | AbortSignal | An AbortSignal that can be used to cancel the request. |
Returns
Promise<PurseHeadlessCheckoutTemporarySecondaryToken>
Throws
- PurseHeadlessCheckoutError
FAILED_TO_ADD_TOKEN
If secondary token creation fails - PurseHeadlessCheckoutError
FAILED_TO_INIT_SECONDARY_TOKEN
If secondary token initialization fails - PurseHeadlessCheckoutError
MISSING_SESSION
If the session is missing - PurseHeadlessCheckoutError
PAYMENT_METHOD_NOT_FOUND
If the partner and method associated to the token could not be found in the ones available in the session - PurseHeadlessCheckoutError
SECONDARY_METHOD_REQUIRED_CVV
If the cvv is missing - PurseHeadlessCheckoutError
SECONDARY_METHOD_WRONG_PAN_FORMAT
If the provided pan does not respect the expected format - PurseHeadlessCheckoutError
SECONDARY_METHOD_WRONG_CVV_FORMAT
If the provided cvv does not respect the expected format