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

# Get Payment Order Attempt

> #### Overview - Get Payment Order Attempt

#### Purpose

This endpoint allows you to query the status and details of a specific payment attempt (PaymentOrderAttempt) associated with a payment order. It's useful for:

- Checking the current status of a payment attempt

- Retrieving configured redirect URLs for the attempt

- Querying payment provider (PSP) information

- Reviewing payer data and applied costs

#### Operation Flow

1. Client sends a GET request with:
    - payment_order_id (Payment order ID)
    - attempt_alt_id (Attempt alternative ID)
    - Authentication headers (Authorization, X-Date)

2. System validates:
    - Authentication signature (HMAC)
    - Payment order existence
    - Payment attempt existence
    - Rate limiting (1 request per minute per unique combination)

3. If successful, returns:
    - Attempt status (pending, paid, cancelled, error)
    - Payment provider information
    - Redirect URLs
    - Applied costs
    - Payer data
    - Timestamps

##### EndpointGET /v1/businesses/payment_orders/:payment_order_id/attempts/:attempt_alt_id

#### Authentication

Requires Business API authentication headers:

- Authorization: HMAC-SHA256 signature

- X-Date: ISO 8601 timestamp

- Required permission: get_payment_order_attempt

#### Rate Limiting

- 1 request per minute per unique combination of payment_order_id + attempt_alt_id

- If exceeded, returns throttling error

#### URL Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `payment_order_id` | Integer (required) | Payment order ID |
| `attempt_alt_id` | String (UUID) (required) | Payment attempt alternative ID |

#### Success Response (200 OK)

```json
{
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "payment_order_attempt",
    "attributes": {
      "status": "pending",
      "provider_code": "TBK_123456",
      "payment_reference": "REF-2024-001",
      "cancel_message": null,
      "statuses": [
        "pending",
        "processing"
      ],
      "provider": {
        "id": 1,
        "name": "Transbank WebPay"
      },
      "payer": {
        "name": "Juan Pérez",
        "email": "juan@example.com",
        "document": "12345678-9"
      },
      "payment_order": {
        "public_code": "PO-2024-001",
        "amount": 10000,
        "status": "pending"
      },
      "costs": {
        "fixed_cost": 500,
        "spread": 2.5
      },
      "redirect_urls": {
        "success_redirect_url": "https://merchant.com/success",
        "cancel_redirect_url": "https://merchant.com/cancel",
        "error_redirect_url": "https://merchant.com/error",
        "pending_redirect_url": "https://merchant.com/pending"
      },
      "provider_data": {
        "provider_url": "https://webpay.transbank.cl/pay/12345",
        "frame": null,
        "qr_code": null
      },
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:35:00Z"
    }
  }
}
```

#### Error Responses

404 - Payment Order Not Found

```json
{"error":{"code":404,"message":"Payment order not found"}}
```

404 - Payment Order Attempt Not Found

```json
{"error":{"code":404,"message":"Payment order attempt not found"}}
```

422 - Invalid Signature

```json
{"error":{"code":422,"message":"Invalid signature"}}
```

500 - Internal Server Error

```json
{"error":{"code":500,"message":"Internal server error: [error details]"}}
```

> Possible Attempt Statuses

| Status | Description |
| --- | --- |
| `pending` | Attempt created, awaiting user action |
| `processing` | Payment under verification process |
| `paid` | Payment completed successfully |
| `cancelled` | Payment cancelled by user |
| `error` | Error in payment processing |
| `expired` | Attempt expired without completion |

#### Common Use Cases

1. **Webhook Polling**: Check status after receiving webhook

2. UI Status Update: Update interface in real-time

3. Payment Verification: Verify payment completion

4. Redirect After Payment: Obtain post-payment redirect URL

5. Audit Trail: Record payment attempts for auditing

#### Important Notes

- The attempt_alt_id is the unique attempt identifier (UUID)

- A payment_order can have multiple attempts

- Redirect URLs are specific per attempt

- Throttling prevents excessive queries for the same attempt

#### Related Endpoints

- POST /v1/businesses/payment_orders - Create payment order

- POST /v1/businesses/payment_orders/:id/direct_payment - Process direct payment



## OpenAPI

````yaml /openapi.yaml get /api/businesses/payment_orders/{payment_order_id}/attempts/{payment_order_attempt_id}
openapi: 3.0.0
info:
  title: Vita Business API
  description: >-
    Vita Wallet Business API — integra payins, payouts, exchange, transactions,
    users y webhooks para operar pagos en LatAm y el mundo.
  version: 1.0.0
  contact:
    name: Vita Wallet Support
    url: https://vitawallet.io
    email: empresas@vitawallet.io
servers:
  - url: https://api.vitawallet.io
    description: Production
  - url: https://api.stage.vitawallet.io
    description: Sandbox
security:
  - xLogin: []
    xTransKey: []
    xDate: []
    hmacSignature: []
tags:
  - name: Create Payin
  - name: Direct Payment
  - name: Exchange
  - name: Vita Sent
  - name: Bank Payouts
  - name: External Crypto Payouts
  - name: Transactions
  - name: Users Creation
  - name: User Information
  - name: Webhooks
externalDocs:
  url: https://vitawallet.io
  description: Vita Wallet
paths:
  /api/businesses/payment_orders/{payment_order_id}/attempts/{payment_order_attempt_id}:
    get:
      tags:
        - Direct Payment
      summary: Get Payment Order Attempt
      description: >-
        #### Overview - Get Payment Order Attempt


        #### Purpose


        This endpoint allows you to query the status and details of a specific
        payment attempt (PaymentOrderAttempt) associated with a payment order.
        It's useful for:


        - Checking the current status of a payment attempt


        - Retrieving configured redirect URLs for the attempt


        - Querying payment provider (PSP) information


        - Reviewing payer data and applied costs


        #### Operation Flow


        1. Client sends a GET request with:
            - payment_order_id (Payment order ID)
            - attempt_alt_id (Attempt alternative ID)
            - Authentication headers (Authorization, X-Date)

        2. System validates:
            - Authentication signature (HMAC)
            - Payment order existence
            - Payment attempt existence
            - Rate limiting (1 request per minute per unique combination)

        3. If successful, returns:
            - Attempt status (pending, paid, cancelled, error)
            - Payment provider information
            - Redirect URLs
            - Applied costs
            - Payer data
            - Timestamps

        ##### EndpointGET
        /v1/businesses/payment_orders/:payment_order_id/attempts/:attempt_alt_id


        #### Authentication


        Requires Business API authentication headers:


        - Authorization: HMAC-SHA256 signature


        - X-Date: ISO 8601 timestamp


        - Required permission: get_payment_order_attempt


        #### Rate Limiting


        - 1 request per minute per unique combination of payment_order_id +
        attempt_alt_id


        - If exceeded, returns throttling error


        #### URL Parameters


        | Parameter | Type | Description |

        | --- | --- | --- |

        | `payment_order_id` | Integer (required) | Payment order ID |

        | `attempt_alt_id` | String (UUID) (required) | Payment attempt
        alternative ID |


        #### Success Response (200 OK)


        ```json

        {
          "data": {
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "type": "payment_order_attempt",
            "attributes": {
              "status": "pending",
              "provider_code": "TBK_123456",
              "payment_reference": "REF-2024-001",
              "cancel_message": null,
              "statuses": [
                "pending",
                "processing"
              ],
              "provider": {
                "id": 1,
                "name": "Transbank WebPay"
              },
              "payer": {
                "name": "Juan Pérez",
                "email": "juan@example.com",
                "document": "12345678-9"
              },
              "payment_order": {
                "public_code": "PO-2024-001",
                "amount": 10000,
                "status": "pending"
              },
              "costs": {
                "fixed_cost": 500,
                "spread": 2.5
              },
              "redirect_urls": {
                "success_redirect_url": "https://merchant.com/success",
                "cancel_redirect_url": "https://merchant.com/cancel",
                "error_redirect_url": "https://merchant.com/error",
                "pending_redirect_url": "https://merchant.com/pending"
              },
              "provider_data": {
                "provider_url": "https://webpay.transbank.cl/pay/12345",
                "frame": null,
                "qr_code": null
              },
              "created_at": "2024-01-15T10:30:00Z",
              "updated_at": "2024-01-15T10:35:00Z"
            }
          }
        }

        ```


        #### Error Responses


        404 - Payment Order Not Found


        ```json

        {"error":{"code":404,"message":"Payment order not found"}}

        ```


        404 - Payment Order Attempt Not Found


        ```json

        {"error":{"code":404,"message":"Payment order attempt not found"}}

        ```


        422 - Invalid Signature


        ```json

        {"error":{"code":422,"message":"Invalid signature"}}

        ```


        500 - Internal Server Error


        ```json

        {"error":{"code":500,"message":"Internal server error: [error
        details]"}}

        ```


        > Possible Attempt Statuses


        | Status | Description |

        | --- | --- |

        | `pending` | Attempt created, awaiting user action |

        | `processing` | Payment under verification process |

        | `paid` | Payment completed successfully |

        | `cancelled` | Payment cancelled by user |

        | `error` | Error in payment processing |

        | `expired` | Attempt expired without completion |


        #### Common Use Cases


        1. **Webhook Polling**: Check status after receiving webhook


        2. UI Status Update: Update interface in real-time


        3. Payment Verification: Verify payment completion


        4. Redirect After Payment: Obtain post-payment redirect URL


        5. Audit Trail: Record payment attempts for auditing


        #### Important Notes


        - The attempt_alt_id is the unique attempt identifier (UUID)


        - A payment_order can have multiple attempts


        - Redirect URLs are specific per attempt


        - Throttling prevents excessive queries for the same attempt


        #### Related Endpoints


        - POST /v1/businesses/payment_orders - Create payment order


        - POST /v1/businesses/payment_orders/:id/direct_payment - Process direct
        payment
      operationId: get-payment-order-attempt
      parameters:
        - name: payment_order_id
          in: path
          schema:
            type: string
          required: true
        - name: payment_order_attempt_id
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              examples:
                PaidOrder:
                  summary: Paid Order
                  value:
                    data:
                      id: 4446
                      type: payment_order_attempt
                      attributes:
                        status: paid
                        payment_reference: 3099b6cd-faaa-40f2-880d-ba2e2b33267f
                        cancel_message: null
                        statuses:
                          - status: pending
                            changed_at: '2026-04-24T16:55:04.946Z'
                          - status: paid
                            changed_at: '2026-04-24T16:55:05.692Z'
                        provider_code: pse_co
                        id: 869a6c6d-6bd4-49f4-a4dc-a292fa7f2ab5
                        provider:
                          id: 5
                          name: PSE
                        payer:
                          name: Juan Perez
                          email: juan.perez@example.com
                          document: 1020304050
                        payment_order:
                          public_code: fac7e1b1-37d4-45eb-a4d3-90b7c1acfe1b
                          amount: 100000
                          status: paid
                        costs:
                          fixed_cost: 1
                          spread: 2
                        redirect_urls:
                          success_redirect_url: https://www.google.com/success
                          cancel_redirect_url: https://www.google.com/cancel
                          error_redirect_url: https://www.google.com/error
                          pending_redirect_url: https://www.google.com/pending
                        provider_data:
                          provider_url: null
                          frame: null
                          qr_code: null
                        created_at: '2026-04-24T16:55:04Z'
                        updated_at: '2026-04-24T16:55:05Z'
                CancelledOrder:
                  summary: Cancelled Order
                  value:
                    data:
                      id: 981
                      type: payment_order_attempt
                      attributes:
                        status: cancelled
                        provider_code: g0xc7oen6ziv
                        payment_reference: null
                        cancel_message: El usuario ha rechazado la transacción
                        statuses:
                          - status: cancelled
                            changed_at: '2025-12-23T16:25:05.223Z'
                          - status: pending
                            changed_at: '2025-12-23T16:23:16.619Z'
                        id: 8641a815-bbdb-47da-980e-cb9558f3e266
                        provider:
                          id: 5
                          name: PSE
                        payer: null
                        payment_order:
                          public_code: ba047724-219c-45ee-a332-fdf0e2e87437
                          amount: 100000
                          status: pending
                        costs:
                          fixed_cost: 10
                          spread: 10
                        redirect_urls:
                          success_redirect_url: https://www.google.com/success
                          cancel_redirect_url: https://www.google.com/cancel
                          error_redirect_url: https://www.google.com/error
                          pending_redirect_url: https://www.google.com/pending
                        provider_data:
                          provider_url: null
                          frame: null
                          qr_code: null
                        created_at: '2025-12-23T16:23:16Z'
                        updated_at: '2025-12-23T16:23:16Z'
components:
  securitySchemes:
    xLogin:
      type: apiKey
      in: header
      name: x-login
      description: Business xLogin
    xTransKey:
      type: apiKey
      in: header
      name: x-trans-key
      description: Business xTransKey
    xDate:
      type: apiKey
      in: header
      name: x-date
      description: ISO8601 datetime
    hmacSignature:
      type: apiKey
      in: header
      name: Authorization
      description: 'V2-HMAC-SHA256 signature. Example: `V2-HMAC-SHA256, Signature: <hash>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.