---
title: "Retrieve secure token"
method: GET
path: "/v1/frontend/tokens/{chargeTokenId}"
tags: ["Secure token"]
---

# Retrieve secure token

`GET /v1/frontend/tokens/{chargeTokenId}`

## Path parameters

- `chargeTokenId` string, required

## Response `200`

OK

- TokenResponse
  - `charge` FrontendChargeResponse — The charge associated with the token
    - `agreement` AgreementResponse
      - `agreement_id` string
      - `created_date` string, date-time
      - `description` string
      - `live` boolean
      - `reference` string
      - `service_id` string
      - `user_identifier` string
    - `agreement_id` string — Application for Recurring card payments. Agreement ID that the payment is associated with
    - `agreement_payment_type` 'instalment' | 'recurring' | 'unscheduled' — Reason for taking a recurring payment
    - `amount` integer — Amount of this charge
    - `auth_3ds_data` Auth3dsData
      - `htmlOut` string — Applicable for ePDQ 3DS payments. If the transaction goes via the challenge flow, the response contains the additional field HTML_ANSWER (from ePDQ) which is a BASE-64 encoded code block
      - `issuerUrl` string — Issuer 3DS url to direct users to complete 3DS authentication
      - `md` string — payment session identifier returned by the card issuer
      - `paRequest` string — Holds 3D secure request data for the issuer.
      - `worldpayChallengeJwt` string — When the charge is in status 'AUTHORISATION 3DS REQUIRED' state and the 3DS data on the charge contains challenge data, Json Web Token is calculated and returned to the frontend.
    - `auth_code` string — Only applicable for telephone payments reported. Authorisation ID received from payment provider when the payment was authorised
    - `authorisation_mode` 'web' | 'moto_api' | 'agreement' | 'external' — How the payment will be authorised. Payments created in `web` mode require the paying user to visit the `next_url` to complete the payment.
    - `authorisation_summary` AuthorisationSummary — Object containing information about the authentication of the payment
      - `three_d_secure` ThreeDSecure — Object containing information about the 3D Secure authentication of the payment
        - `required` boolean — Flag indicating whether the payment required 3D Secure authentication.
        - `version` string — 3DS version used to authorise payment
    - `authorised_date` string, date-time — Only applicable for telephone payments reported. Date and time Payment service provider authorised the payment.
    - `card_brand` string
    - `card_details` PersistedCard
      - `billing_address` Address
        - `city` string
        - `country` string
        - `county` string
        - `line1` string
        - `line2` string
        - `postcode` string
      - `card_brand` string
      - `card_type` 'CREDIT' | 'DEBIT'
      - `cardholder_name` string — The cardholder name the user entered when they paid.
      - `expiry_date` CardExpiryDate — The expiry date of the card the user paid with.
        - `fourDigitYear` string
        - `twoDigitMonth` string
        - `twoDigitYear` string
      - `first_digits_card_number` FirstDigitsCardNumber — The first 6 digits of the card the user paid with.
      - `last_digits_card_number` LastDigitsCardNumber — The last 4 digits of the card the user paid with.
    - `charge_id` string — Unique identifier for the charge
    - `corporate_card_surcharge` integer
    - `created_date` string, date-time
    - `delayed_capture` boolean — Set to true, if payment is to be captured separately
    - `description` string — The payment description
    - `email` string
    - `exemption` Exemption — Object containing information about 3DS exemption request of the payment.
      - `outcome` Outcome — Object containing information about the outcome of the 3ds exemption request
        - `result` 'not requested' | 'honoured' | 'rejected' | 'out of scope' — Indicating the result if 3ds exemption was requested for the payment.
      - `requested` boolean — Flag indicating whether 3ds exemption was requested for the payment.
      - `type` string — Indicating the type of the 3ds exemption was requested for the payment if applicable.
    - `fee` integer — processing fee taken by the GOV.UK Pay platform, in pence. Only available depending on payment service provider
    - `gateway_account` FrontendGatewayAccountResponse — Representation of a gateway account for use by the card frontend application
      - `allow_apple_pay` boolean — Set to true to enable Apple Pay
      - `allow_google_pay` boolean — Set to true to enable Google Pay
      - `analytics_id` string — An identifier used to identify the service in Google Analytics. The default value is null
      - `block_prepaid_cards` boolean — Whether pre-paid cards are allowed as a payment method for this gateway account
      - `card_types` CardTypeEntity[] — The supported card types for the account
        - `brand` string
        - `id` string, uuid
        - `label` string
        - `requires3ds` boolean
        - `type` 'CREDIT' | 'DEBIT'
      - `corporate_credit_card_surcharge_amount` integer
      - `corporate_debit_card_surcharge_amount` integer
      - `corporate_prepaid_debit_card_surcharge_amount` integer
      - `email_collection_mode` 'MANDATORY' | 'OPTIONAL' | 'OFF' — Whether email address is required from paying users. Can be MANDATORY, OPTIONAL or OFF
      - `external_id` string — External ID for the gateway account
      - `gateway_account_id` integer — The account ID
      - `gateway_merchant_id` string — Google Pay merchant ID for Worldpay accounts
      - `integration_version_3ds` integer — 3DS version used for payments for the gateway account
      - `moto_mask_card_number_input` boolean — Indicates whether the card number is masked when being input for MOTO payments. The default value is false.
      - `moto_mask_card_security_code_input` boolean — Indicates whether the card security code is masked when being input for MOTO payments.
      - `payment_provider` string — The payment provider for which this account is created
      - `requires3ds` boolean — Flag to indicate whether 3DS is enabled
      - `service_id` string — Service external ID
      - `service_name` string — The service name for the account
      - `type` string — Account type for the payment provider (test/live)
    - `gateway_transaction_id` string — The reference number the payment gateway associated with the payment.
    - `language` 'en' | 'cy' — The language of the user’s payment page.
    - `links` object[] — Array of relevant resource references related to this charge
    - `metadata` ExternalMetadata
      - `metadata` object, required
    - `moto` boolean — Mail Order / Telephone Order (MOTO) payment flag
    - `net_amount` integer — amount including all surcharges and less all fees, in pence. Available depending on payment service provider
    - `payment_confirmation_email_enabled` boolean
    - `payment_outcome` PaymentOutcome — Only applicable for telephone payments reported. Outcome after the payment has been authorised with payment provider
      - `code` string — Error code
      - `status` string
      - `supplemental` Supplemental
        - `error_code` string
        - `error_message` string
    - `payment_provider` string — The payment provider used for this transaction
    - `processor_id` string — Only applicable for telephone payments reported. unique supplier internal reference number associated with the payment
    - `provider_id` string — Only applicable for telephone payments reported. Gateway transaction ID
    - `reference` ServicePaymentReference — Service reference for the payment
    - `refund_summary` RefundSummary — Provides refund amount available and the amount that has already been submitted for refund
      - `amount_available` integer — Amount available for refund in pence
      - `amount_submitted` integer — Amount submitted for refunds on this Payment in pence
      - `status` string — Availability status of the refund
      - `user_external_id` string — User external ID issuing refund
    - `return_url` string — service return url
    - `save_payment_instrument_to_agreement` boolean
    - `settlement_summary` SettlementSummary — Provides a settlement summary of the charge containing date and time of capture, if present
      - `capture_submit_time` string — Date and time capture request has been submitted. May be null if capture request was not immediately acknowledged by payment gateway.
      - `capturedTime` string, date-time
      - `captured_date` string — Date of the capture event
    - `state` ExternalTransactionState — A structure representing the current state of the payment in its lifecycle
      - `can_retry` boolean — If a failed payment, whether it may be possible to retry it
      - `code` string — Error code for failed payments
      - `finished` boolean
      - `message` string — Message describing error code if payment failed
      - `status` string
    - `status` string
    - `telephone_number` string — Only applicable for telephone payments reported. User's telephone number
    - `total_amount` integer — Amount your user paid in pence, including corporate card fees. total_amount only appears if corporate card surcharge is applied to the payment.
    - `wallet_type` 'APPLE_PAY' | 'GOOGLE_PAY' — Indicates if the payment was completed using wallet payment (GOOGLE_PAY or APPLE_PAY)
  - `used` boolean — true or false depending on whether the token has been marked as used or not

## Other responses

- `404` — Not found

---

[API](https://skmtc.net/government-digital-service/apis/connector-api.md) · [All operations](https://skmtc.net/government-digital-service/apis/connector-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/government-digital-service/connector-api/revisions/62149e57992f/schema)
