---
title: "Payment Request Handling"
space: "Integrations"
url: "https://integrations.frappe.cloud/integrations/payment-integration/payment-core/payment-request-handling"
updated: "2026-07-30"
---

Payment requests are managed through Frappe's `Integration Request` doctype, providing comprehensive logging and status tracking.

## Integration Request Lifecycle


| Status       | Description                                  |
| ------------ | -------------------------------------------- |
| `Queued`     | Payment request created, awaiting processing |
| `Authorized` | Payment authorized by gateway (pre-capture)  |
| `Completed`  | Payment successfully completed               |
| `Failed`     | Payment failed, check error field            |
| `Cancelled`  | Payment cancelled/expired                    |


## Request Flow

```python
# 1. Create payment request
integration_request = create_request_log(
    data=payment_details,
    service_name="Stripe"
)

# 2. Process payment
controller = get_payment_gateway_controller("Stripe")
response = controller.create_request(payment_details)

# 3. Handle callback
# Gateway webhook calls back with:
# - integration_request.name (token)
# - payment status
# - transaction details
```

## Status Updates

```python
# Update integration request status
integration_request.update_status(
    data={"transaction_id": "txn_123"},
    status="Completed"
)

# Gateway controllers can update directly
integration_request.db_set("status", "Completed", update_modified=False)
```