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

# Retry sale

> Retry a sale through the dedicated SmartRetry retry operation.

Use this operation to create a new retry attempt for a previous [sale](/docs/api-reference/payments/sale).
Identify the originating attempt using one of the request shapes rendered below.

<Note>
  This operation creates a dedicated retry attempt. It is different from replaying the original
  Sale request with the same `Idempotency-Key`. See [Idempotency](/docs/api-reference/idempotency) for
  safe request replay.
</Note>


## OpenAPI

````yaml api-reference/openapi.json POST /v1/payments/sale/retry/{terminal_friendly_id}
openapi: 3.0.3
info:
  title: SmartRetry Terminal API
  description: >-
    Payment gateway terminal service — Sale, Preauth, Capture, Refund, Void,
    Recurring, and Future transactions.
  version: 1.0.0
servers:
  - url: https://terminal.smartretry.com
security:
  - ApiKeyAuth: []
tags:
  - name: payments
    description: >-
      Direct payment operations — Sale, Preauth, Capture, Refund, Void, and
      Status.
  - name: recurring
    description: Recurring payment lifecycle — init, charge, update, cancel, and status.
  - name: future-transactions
    description: Future transaction management — charge, update, cancel, and status.
  - name: webhooks
    description: Inbound payment-provider webhook ingestion.
paths:
  /v1/payments/sale/retry/{terminal_friendly_id}:
    post:
      tags:
        - payments
      parameters:
        - schema:
            minLength: 6
            maxLength: 6
            type: string
          in: path
          name: terminal_friendly_id
          required: true
          description: The unique identifier of the terminal.
        - schema:
            maxLength: 255
            pattern: ^[\w-]+$
            type: string
          in: header
          name: idempotency-key
          required: false
          description: >-
            Optional idempotency key, scoped to terminal + matched route
            pattern. A replayed request returns the cached response with
            `Idempotency-Replayed: true`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetryNoAnchorUnion'
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SalePreauthAcceptedResponse'
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Default Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RetryNoAnchorUnion:
      anyOf:
        - $ref: '#/components/schemas/RetryNoAnchorRequest'
        - $ref: '#/components/schemas/DirectOriginRetryRequest'
    SalePreauthAcceptedResponse:
      type: object
      required:
        - transaction_id
        - accepted
      properties:
        transaction_id:
          minLength: 8
          maxLength: 8
          type: string
        order_id:
          minLength: 8
          maxLength: 8
          type: string
        merchant_transaction_id:
          type: string
        merchant_order_id:
          type: string
        accepted:
          type: boolean
    ErrorResponse:
      type: object
      required:
        - type
        - title
        - status
        - detail
        - reason_code
      properties:
        type:
          type: string
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
        reason_code:
          type: string
        context:
          type: object
          additionalProperties: {}
    RetryNoAnchorRequest:
      additionalProperties: false
      type: object
      required:
        - retry
      properties:
        retry:
          $ref: '#/components/schemas/RetryFromProviderTransaction'
    DirectOriginRetryRequest:
      additionalProperties: false
      type: object
      required:
        - retry
      properties:
        retry:
          $ref: '#/components/schemas/RetryFromOriginatingId'
    RetryFromProviderTransaction:
      additionalProperties: false
      type: object
      required:
        - provider_key
      properties:
        provider_transaction_id:
          description: >-
            External provider transaction identifier to look up and import as
            the originating attempt.
          minLength: 1
          type: string
        provider_key:
          $ref: '#/components/schemas/PaymentProcessorKey'
        interactions:
          minItems: 1
          description: >-
            Raw provider interaction history. Optional alongside a supplied
            provider_transaction_id; required (non-empty) when
            provider_transaction_id is absent.
          type: array
          items:
            additionalProperties: false
            type: object
            required:
              - type
              - timestamp
              - raw_request
              - raw_response
            properties:
              type:
                $ref: '#/components/schemas/TransactionType'
              timestamp:
                description: >-
                  ISO 8601 timestamp of the interaction. Validated semantically
                  (see retry.validation.service.ts) — TypeCompiler, used by the
                  domain validators, does not evaluate the `format` keyword.
                minLength: 1
                type: string
              raw_request:
                minLength: 1
                type: string
              raw_response:
                minLength: 1
                type: string
    RetryFromOriginatingId:
      additionalProperties: false
      type: object
      required:
        - originating_id
      properties:
        originating_id:
          description: SmartRetry transaction friendly_id of the originating attempt.
          minLength: 8
          maxLength: 8
          type: string
    PaymentProcessorKey:
      type: string
      enum:
        - 1stmile
        - aci
        - adyen
        - affipay
        - allied-irish-bank-aib
        - allied-systems
        - alternative-payments-international
        - authorize-net
        - barclaycard
        - beanstream
        - billdesk
        - bluesnap
        - borgun
        - braintree
        - braspag
        - capture
        - cashflows
        - chase-acquiring-wepay
        - chase-payment-solutions
        - checkout-com
        - chronopay
        - collectpay-credit-card
        - concardis
        - concord-buypas
        - connectum
        - cybersource-gateway
        - creditguard
        - credo
        - dragonpay
        - ecorepay
        - ecp
        - egatepay-checkout-com
        - elavon
        - elavon-emv
        - elavon-viaconex
        - emerchantpay
        - epx
        - evertec
        - evo
        - fdms-compass
        - fdms-nashville
        - fdms-nashville-north-v1
        - fdms-nashville-north-v2
        - fdms-omaha
        - fibonatix
        - first-data-canada-south
        - first-data-caribbean-v2
        - first-data-uk-eu
        - global-payments
        - heartland
        - icanpay
        - instabill
        - integrapay
        - kbank
        - lloyds-cardnet
        - lpb
        - mes-trident
        - ncr-voyix
        - nets
        - nexi-group
        - nmi-payments
        - nucleus
        - nuvei
        - optimal-payments
        - orbital-payment-gateway
        - payabl
        - payment-world
        - paynamic
        - paynetics
        - payone
        - paypoint
        - paysafe
        - paysafe-continuity
        - paysafe-processing-pxp
        - payvision
        - phoenixgate
        - powercard-acquirer
        - propay-active-rs2-software
        - rapyd
        - santander
        - shift4
        - six-payments
        - skrill
        - square
        - stripe
        - transact-europe-processing-com
        - transact-pro
        - tranzila
        - trust-payments
        - tsys
        - vantiv-now-worldpay-core-terminal-capture
        - vantiv-now-worldpay-ecommerce-host
        - vantiv-now-worldpay-ecommerce-terminal
        - webcollect-globalconnect
        - worldline
        - worldpay-access
        - worldpay-apacs
    TransactionType:
      type: string
      enum:
        - sale
        - preauth
        - account_verification
        - recurring_init
        - recurring
        - payout
        - capture
        - refund
        - void
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````