Browse Payments

stable · api · 0.1.0

Get a Payment Transaction

GET /api/v1/payment-transactions/{paymentTransactionId}

Capability Domain: Payments

Authentication

projectCredential (payments:read)

Scope: payments:read

Parameters and request body

  • paymentTransactionId — path, required
    paymentTransactionId schema
    {
        "type": "string",
        "format": "uuid"
    }
  • X-Correlation-ID — header, optional
    X-Correlation-ID schema
    {
        "type": "string",
        "format": "uuid"
    }

Responses and errors

StatusDescription
200Project Client scoped Payment Transaction
401Invalid or revoked Project Credential
403Project Credential lacks the required scope
422Request violates the public contract

200 schema

200 response schema
{
    "type": "object",
    "required": [
        "data"
    ],
    "properties": {
        "data": {
            "type": "object",
            "required": [
                "id",
                "project_order_reference",
                "amount",
                "currency",
                "status"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "format": "uuid"
                },
                "project_order_reference": {
                    "type": "string",
                    "maxLength": 180
                },
                "amount": {
                    "type": "integer",
                    "minimum": 1
                },
                "currency": {
                    "type": "string",
                    "const": "TWD"
                },
                "status": {
                    "type": "string",
                    "enum": [
                        "pending",
                        "settled",
                        "failed"
                    ]
                },
                "recurring": {
                    "type": [
                        "object",
                        "null"
                    ],
                    "properties": {
                        "id": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "status": {
                            "type": "string"
                        }
                    }
                }
            }
        }
    }
}

401 schema

401 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

403 schema

403 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

422 schema

422 response schema
{
    "type": "object",
    "required": [
        "error"
    ],
    "properties": {
        "error": {
            "type": "object",
            "required": [
                "code",
                "message",
                "retryable",
                "correlation_id",
                "details"
            ],
            "properties": {
                "code": {
                    "type": "string"
                },
                "message": {
                    "type": "string"
                },
                "retryable": {
                    "type": "boolean"
                },
                "correlation_id": {
                    "type": "string",
                    "format": "uuid"
                },
                "details": {
                    "type": "object"
                }
            }
        }
    }
}

200 example

200 response example
{
    "data": {
        "id": "70000000-0000-4000-8000-000000000007",
        "project_order_reference": "sandbox-order-1001",
        "amount": 100,
        "currency": "TWD",
        "status": "settled"
    }
}

Idempotency

Safe read; retries do not change the Payment Transaction.