> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastpaybrasil.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Resume charge after managed 3DS authentication

> Called by the 3DS micro-frontend (or your own integration) after the
buyer completes the managed 3DS authentication. Processes the charge
using the provided 3DS result and fires postback/webhook events.

The charge must be in `authentication_required` status.

**Authentication:** Uses the merchant's public/publishable key (`pk_...`).



## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/charges/{id}/resume-3ds
openapi: 3.0.0
info:
  title: FastPay API
  version: 1.0.0
  description: >-
    API for creating and managing payment charges.


    ## Authentication


    This API uses **Basic Authentication** for direct API access, such as
    creating charges.

    Use your API key as the username and an empty string as password.

    The header should be formatted as:


    `Authorization: Basic {base64(apiKey:)}`.


    For example:


    ```

    Authorization: Basic YWxleG91dG9uOiIi

    ```


    ## Webhooks


    FastPay sends webhooks to notify your application about charge status
    changes in real-time.

    Webhooks are sent via HTTP POST requests to your configured webhook
    endpoints.


    ### Webhook Events


    The following webhook events are available for charges:


    - `charge.created` - Sent when a new charge is created

    - `charge.pending` - Sent when a charge is pending payment

    - `charge.paid` - Sent when a charge is successfully paid

    - `charge.updated` - Sent when a charge is updated


    ### Webhook Payload Structure


    All webhook payloads follow this structure:


    ```json

    {
      "id": "webhook_event_id",
      "event": "charge.paid",
      "data": {
        // Complete charge object
      }
    }

    ```


    ### Webhook Delivery


    - Webhooks are sent via HTTP POST requests

    - Content-Type: `application/json`

    - Retry logic is implemented for failed deliveries

    - Webhook events are stored in the database for audit purposes

    - Delivery logs are maintained for debugging and monitoring


    ### Webhook Security


    - Webhooks are sent to pre-configured endpoints

    - Endpoints can be enabled/disabled per merchant

    - Event filtering is supported (only receive specific events)

    - Failed deliveries are retried with exponential backoff
servers:
  - url: https://api-global.fastpaybrasil.com
    description: Produção e Sandbox (diferenciados pela API key)
security: []
paths:
  /v1/charges/{id}/resume-3ds:
    post:
      tags:
        - 3D Secure
      summary: Resume charge after managed 3DS authentication
      description: >-
        Called by the 3DS micro-frontend (or your own integration) after the

        buyer completes the managed 3DS authentication. Processes the charge

        using the provided 3DS result and fires postback/webhook events.


        The charge must be in `authentication_required` status.


        **Authentication:** Uses the merchant's public/publishable key
        (`pk_...`).
      parameters:
        - name: id
          in: path
          required: true
          description: Charge ID
          schema:
            type: string
            example: 2vorkDcXyvzifL63YX09S9VqcnI
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - threeDS
              properties:
                threeDS:
                  $ref: '#/components/schemas/CreditCardThreeDS'
      responses:
        '200':
          description: Charge resumed and processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedCharge'
        '401':
          description: Unauthorized - invalid public key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Charge not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Charge is not in authentication_required status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - basic: []
components:
  schemas:
    CreditCardThreeDS:
      type: object
      description: |-
        3D Secure authentication data for BYO-3DS (Bring Your Own) flow.
        Obtain this object from the FastPay Security SDK or from
        POST /v1/three-ds/challenge-result after the challenge completes.
      required:
        - type
        - state
      properties:
        type:
          type: string
          description: Type of 3DS authentication (e.g. "full")
          example: full
        state:
          type: string
          enum:
            - success
            - failure
            - unenrolled
            - error
            - unsupported_brand
            - disabled
          description: |-
            Authentication state. Only `success` allows the charge to proceed
            when 3DS is required by the merchant's PSP configuration.
          example: success
        mode:
          type: string
          description: Authentication mode (e.g. "frictionless" or "challenge")
          example: frictionless
        cryptogram:
          type: string
          description: >-
            CAVV / Authentication Value — Base64 encoded cryptogram generated

            during 3DS authentication. Required for successful 3DS
            authentication.
          example: Vt5xwasruB0Q6qRoG9mpzdRPqQs=
        eci:
          type: string
          description: |-
            Electronic Commerce Indicator. Common values: `05` (authenticated),
            `06` (attempted), `07` (not authenticated).
          example: '05'
        version:
          type: string
          description: 3DS protocol version (e.g. "2.1.0", "2.2.0")
          example: 2.2.0
        directoryServerTransactionId:
          type: string
          description: Directory Server Transaction ID (from card scheme)
          example: 607bb317-8d24-45a7-a3c0-7ae1fdca56d0
        threeDsServerTransactionId:
          type: string
          description: 3DS Server Transaction ID
          example: 59588a8b-955e-4aa8-bae1-338bbfdba8fa
        acsTransactionId:
          type: string
          description: ACS Transaction ID (from issuer bank)
          example: 6bf18a7a-3a7b-488f-bce1-3da96c73e746
        deviceData:
          type: object
          description: Device / browser data collected during authentication
          properties:
            acceptHeader:
              type: string
            userAgentHeader:
              type: string
            browserLanguage:
              type: string
            browserScreenWidth:
              type: integer
            browserScreenHeight:
              type: integer
            browserJavaEnabled:
              type: boolean
            browserColorDepth:
              type: string
            timeZone:
              type: string
            browserJavascriptEnabled:
              type: boolean
            channel:
              type: string
        challenge:
          type: object
          description: Challenge configuration
          properties:
            returnUrl:
              type: string
              format: uri
              description: URL to return to after the challenge completes
              example: https://merchant.com/3ds/return
    CreatedCharge:
      type: object
      required:
        - id
        - status
        - paymentDetails
        - reason
      properties:
        id:
          type: string
          description: The unique identifier of the created charge
          example: 2vorkDcXyvzifL63YX09S9VqcnI
        status:
          type: string
          enum:
            - paid
            - pending
            - refused
            - failed
          description: The status of the charge
          example: pending
        paymentDetails:
          nullable: true
          description: Additional payment details specific to the payment method
          oneOf:
            - title: Credit Card
              type: object
              required:
                - firstSix
                - lastFour
                - expirationMonth
                - expirationYear
                - holderName
                - installments
              properties:
                firstSix:
                  type: string
                  description: Credit card first six digits.
                  example: '123456'
                lastFour:
                  type: string
                  description: Credit card last four digits.
                  example: '7890'
                expirationMonth:
                  type: string
                  description: Credit card expiration month.
                  example: '08'
                expirationYear:
                  type: string
                  description: Credit card expiration year.
                  example: '2024'
                holderName:
                  type: string
                  description: Credit card holdername.
                  example: John Doe
                installments:
                  type: number
                  description: Number of installments used.
                  example: 3
            - title: Rapipago
              type: object
              required:
                - barcode
                - paymentCode
                - paymentUrl
              properties:
                barcode:
                  type: string
                  description: Barcode number. (e.g., "3335008****05200211740749")
                  example: 3335008****05200211740749
                paymentCode:
                  type: string
                  description: The ticket number that the user needs to use for payment.
                  example: '1111111111'
                paymentUrl:
                  type: string
                  description: |-
                    Link to complete the payment. This link is
                    dynamically created by the provider (PSP).
                  example: http://payment.link
            - title: Khipu
              type: object
              required:
                - payUrl
              properties:
                payUrl:
                  type: string
                  description: |-
                    Link to complete the payment. This link is
                    dynamically created by the provider (PSP).
                  example: http://payment.link
            - title: Pix
              type: object
              required:
                - endToEndId
                - copyPaste
              properties:
                endToEndId:
                  type: string
                  description: End to End Pix ID.
                  example: '1231389'
                copyPaste:
                  type: string
                  description: Pix payment link to use with "copy and paste".
                  example: http://091230.pix/12321309
            - title: QRCode
              type: object
              required:
                - payUrl
              properties:
                payUrl:
                  type: string
                  description: |-
                    Link to complete the payment. This link is
                    dynamically created by the provider (PSP).
                  example: http://payment.link
        reason:
          type: string
          nullable: true
          description: The reason for charge status (especially for refused charges)
          example: Insufficient funds
    ErrorResponse:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTP status code
          example: 422
        message:
          type: string
          description: Descriptive error message
          example: SubMerchant is not active
        error:
          type: string
          description: Error type
          example: Unprocessable Entity
  securitySchemes:
    basic:
      type: http
      scheme: basic
      description: |-
        HTTP Basic authentication. Use your secret key as the
        username and an empty string as password. The API key
        should be base64 encoded in the format 'username:' when
        sending the Authorization header.

````