create_order_transaction
Create a transaction for an order, covering authorization, capture, sale, void, or refund, and update the order's financial status accordingly.
Instructions
Create a transaction for an order (e.g. capture, sale, refund). Side effect: creates a Transaction record and may change order financial_status. kind: authorization | capture | sale | void | refund.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | Transaction kind. Required. | |
| amount | Yes | Transaction amount in VND (float). Required. | |
| gateway | No | Payment gateway name (e.g. "cod", "bank_transfer"). | |
| currency | No | Currency code, defaults to "VND" for Sapo stores. | |
| order_id | Yes | Order ID to create transaction for. Required. | |
| parent_id | No | Parent transaction ID (required for capture/void/refund kinds). |