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

# Update Payment Attempt



## OpenAPI

````yaml put /payment_attempt/{id}
openapi: 3.1.0
info:
  title: sandbox
  version: '3'
servers:
  - url: https://service-sandbox.tazapay.com
security:
  - sec0: []
paths:
  /payment_attempt/{id}:
    put:
      summary: Update Payment Attempt
      operationId: update-payment-attempt
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  $ref: '#/components/schemas/MetadataInput'
            examples:
              Request Example:
                value:
                  metadata:
                    key1: value1
                    key2: value2
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    status: success
                    message: ''
                    data:
                      amount: 178119
                      balance_transaction: ''
                      charge_currency: NZD
                      created_at: '2025-11-27T06:34:56.155963Z'
                      customer: cus_d4j9rccp0qvqg4fi5h2g
                      customer_details:
                        country: SG
                        email: andrea@example.com
                        name: Andrea Lark
                        phone:
                          calling_code: '65'
                          number: '87654321'
                      fx_transaction:
                        exchange_rate: 0.581354
                        final:
                          amount: 103550
                          currency: USD
                        id: fx_ck9burm2ug8qevron93g
                        initial:
                          amount: 178119
                          currency: NZD
                        object: fx_transaction
                      id: pat_ck9burng1tqjeffhetmg
                      metadata:
                        key1: value1
                        key2: value2
                      object: payment_attempt
                      payin: chk_ck9bu8ng1tqjeffhetd0
                      payment_method_details:
                        card:
                          amount: 178119
                          checks: {}
                          currency: NZD
                          expiry: {}
                          issuing_country: GB
                          payer_name: dsf
                          three_d_secure: {}
                        type: card
                      refunded: ''
                      reference_id: ''
                      status: succeeded
                      status_description: ''
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      amount:
                        type: integer
                        default: 0
                      charge_currency:
                        type: string
                      created_at:
                        type: string
                      fx_transaction:
                        $ref: '#/components/schemas/FxTransaction'
                      id:
                        type: string
                      metadata:
                        $ref: '#/components/schemas/Metadata'
                      object:
                        type: string
                      payin:
                        type: string
                      payment_method_details:
                        type: object
                        properties:
                          card:
                            type: object
                            properties:
                              amount:
                                type: integer
                                default: 0
                              checks:
                                type: object
                                properties: {}
                              currency:
                                type: string
                              expiry:
                                type: object
                                properties: {}
                              issuing_country:
                                type: string
                              payer_name:
                                type: string
                              three_d_secure:
                                type: object
                                properties: {}
                          type:
                            type: string
                      refunded:
                        type: string
                      status:
                        type: string
                      status_description:
                        type: string
                      balance_transaction:
                        type: string
                        description: Balance transaction linked to the payment attempt
                      customer:
                        type: string
                        description: Customer linked to the payment attempt
                      customer_details:
                        type: string
                        description: 'Details of the Customer linked to the payment attempt '
                      reference_id:
                        type: string
                        description: Reference if of the attempt
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      deprecated: false
components:
  schemas:
    MetadataInput:
      type: string
      description: >-
        Set of key-value pairs that can be attached to the object (JSON string
        format)
      format: json
      example: '{"key1": "value1", "key2": "value2"}'
    FxTransaction:
      type: object
      description: Details of an FX conversion transaction
      properties:
        exchange_rate:
          type: number
          description: FX exchange rate applied
        final:
          type: object
          description: Final amount and currency after FX conversion
          properties:
            amount:
              type: number
              description: Final amount after FX conversion
            currency:
              type: string
              description: Currency of the final amount
        id:
          type: string
          description: FX transaction ID
        initial:
          type: object
          description: Initial amount and currency before FX conversion
          properties:
            amount:
              type: number
              description: Initial amount before FX conversion
            currency:
              type: string
              description: Currency of the initial amount
        object:
          type: string
          description: Object type (fx_transaction)
    Metadata:
      type: object
      description: Custom metadata key-value pairs attached to the object
      additionalProperties:
        type: string
      nullable: true
    ErrorResponse:
      type: object
      description: Standard error response structure
      properties:
        status:
          type: string
          enum:
            - error
          description: Always 'error' for error responses
        message:
          type: string
          description: High-level error message
        errors:
          type: array
          description: Array of detailed error objects
          items:
            type: object
            properties:
              code:
                type: integer
                description: Specific error code
              message:
                type: string
                description: Detailed error message
              remarks:
                type: string
                description: Additional context or suggestions for resolution
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````