Review Data scheme tables
Data scheme tables
The following Database schemes describe the structure of the core entities used within the payment processing flow. Each Scheme represents a specific stage of the payment lifecycle and contains the data required for transaction processing, tracking, reconciliation, and analytics.
These Schemes are designed to provide structured and denormalised access to payment data, enabling efficient querying, monitoring, and integration with external systems such as BI platforms, reporting tools, and accounting services.
Payment Request scheme
| Field Name | Index | DB Type | Description | Example |
| id | unique (primary key) | text | Unique identifier of the Payment Request | pr_VJF8YEOsda8b0Bpu |
| organization_id | standard | text | Organization context within which the Payment Request was created | org_tAvzLEWhpSVsGuJa |
| active_payment_ commit_id |
no index | text|null | Active Payment Commit used in the last attempt to process the Payment Request | pc_Rt9pq2InJ4GXzghM |
| test_mode | no index | bool | Indicates whether the payment is in test mode | true |
| origin_ reference_id |
standard | text | Link to a high-level Order (since multiple requests can be created within a single order) | 67af09fbaf8ad |
| merchant_account_id | standard | text | Unique identifier of the Merchant Account | ma_G0urINj5XTR0IKxf |
| active_payment_ transaction_id |
no index | text|null | Active Payment Transaction used in the last attempt to process the Payment Request | ptr_ZVMiYYsavrpRJnI |
| payment_ scheme_id |
no index | text | Payment Scheme ID | ps_ImZE79UPT5yWYsJE |
| customer_id | no index | text|null | Customer ID | cus_kE0ZEeL9bQvaJqL3 |
| checkout_id | standard | text | Checkout ID | co_P0Bt2rlF5VipD5eK |
| status | standard | text | Payment status | created |
| resolution | standard | text | Description of the current payment status state | ok |
| reference_id | standard | text | Unique identifier on the client side (transaction ID in the client's system) | 67af09fbb03b7 |
| strategy | standard | text |
Payment processing scenarios:
|
direct |
| amount | no index | numeric(19,8)|null | Amount during PR creation. If null, the user can enter the amount manually at Checkout. | 100.00000000 |
| paid_amount | no index | numeric(19,8)|null | Actual amount paid by the customer. Consists of amount + fee. | 110.00000000 |
| paid_fee | no index | numeric(19,8)|null | Fee applied during payment | 10.00000000 |
| refunded_amount | no index | numeric(19,8)|null | Amount of funds returned to the customer | 10.00000000 |
| charged_back _amount |
no index | numeric(19,8)|null | Chargeback amount (funds withdrawn by the bank) | 10.00000000 |
| currency | standard | text | Currency | UAH |
| paid_at | standard | timestamp(3)|null | Actual date and time when the transaction was completed (reached "paid" status) | 2025-02-14 09:16:43.722 |
| created_at | standard | timestamp(3) | PR creation time | 2025-02-14 09:16:43.722 |
| expires_at | no index | timestamp(3)|null | PR lifetime expiry | 2025-02-14 09:16:43.722 |
| metadata | no index | jsonb|null | Metadata passed by the client |
{ "field1": "test123" }
|
| options | no index | jsonb | Options for processing the PR |
{ "instant": false, "tokenize": false,
"descriptor": null,
"return_url": null,
"action_delay": 0,
"commits_limit": 5,
"delayed_action": false,
"auth_auto_retry": false,
"variable_amount": false,
"transactions_limit": null,
"complete_auth_url_template": null
}
|
Payment Commit scheme
| Field Name | Index | DB Type | Description | Example |
| id | unique (primary key) | text | Unique identifier of the Payment Commit | pc_VJF8YEOsda8b0Bpu |
| organization_id | standard | text | Organization context within which the Payment Request was created | org_tAvzLEWhpSVsGuJa |
| test_mode | no index | bool | Whether the payment is a test one | true |
| origin_reference_id | standard | text | Link to a high-level Order (as multiple requests can be created within one order) | 67af09fbaf8ad |
| merchant_account_id | standard | text | Unique identifier of the Merchant Account | ma_G0urINj5XTR0IKxf |
| active_payment_transaction_id | no index | text|null | Active Payment Transaction used for the last attempt to process the Payment Request | ptr_ZVMiYYsavrpRJnI |
| payment_method_scheme_id | no index | text | ID of the Payment Method Scheme | pss_rvpuUiovssaKJBf4 |
| currency_account_id | no index | text | ID of the Currency Account | ca_MHT3IPGBbdzCbmq |
| payment_account_id | no index | text|null | ID of the payment account used for the payment attempt | pa_rd2EHL3OPGBDCmW8 |
| payment_request_id | no index | text | Payment Request ID for which the payment processing attempt was made | pr_Rt9pq2InJ4GXzghM |
| status | standard | text | Payment status | created |
| resolution | standard | text | Description of the state regarding the current payment status | ok |
| method_type | no index | text | Method type used for payment processing | card |
| method_flow | no index | text | Flow used for the payment | card |
| method_currency | no index | text | Currency used for the payment | USD |
| amount | no index | numeric(19,8) | Amount at PC creation | 100.00000000 |
| paid_amount | no index | numeric(19,8)|null | Actual amount paid by the customer. Consists of amount + fee | 100.00000000 |
| paid_fee | no index | numeric(19,8)|null | Commission during payment | 10.00000000 |
| refunded_amount | no index | numeric(19,8)|null | Amount of funds returned to the customers | 10.00000000 |
| charged_back_amount | no index | numeric(19,8)|null | Chargeback amount (funds withdrawn by banks) | 10.00000000 |
| currency | standard | text | Currency | UAH |
| paid_at | standard | timestamp(3)|null | Actual date and time when the transaction was completed (reached "paid" status) | 2025-02-14 09:16:43.722 |
| created_at | standard | timestamp(3) | PR creation time | 2025-02-14 09:16:43.722 |
| expires_at | no index | timestamp(3)|null | lifetime PR | 2025-02-14 09:16:43.722 |
| fields | no index | jsonb | Set of fields passed for processing |
{ "card.test_status": "captured" }
|
| rate_conversion | no index | jsonb|null | Information about currencies and exchange rates during payment processing |
{ "base_currency": "UAH", "counter_currency": "USD",
"conversion_ratio": "20.00" }
|
Payment Transaction scheme
| Field Name | Index | DB Type | Description | Example |
| id | unique (primary key) | text | Unique identifier of the Payment Request | ptr_94YPGWNCVqxhfk52 |
| organization_id | standard | text | Organization context within which the Payment Request was created | org_tAvzLEWhpSVsGuJa |
| payment_commit_id | standard | text | Payment Commit for which there was an attempt to process the Payment Request | pc_Rt9pq2InJ4GXzghM |
| payment_request_id | standard | text | Payment Request for which the Payment Transaction was created | pr_t93tktSXRzIwpWDQ |
| route_id | no index | text | Route ID | prt_aNIOFbWFAfhRSmoJ |
| original_token_id | no index | text|null | Token ID used for the payment | ot_KA5FW4NpGvjst1ci |
| origin_reference_id | standard | text | Link to a high-level Order (as multiple requests can be created within one order) | 67af09fbaf8ad |
| test_mode | no index | bool | Whether the payment is a test one | true |
| flow | no index | text | Flow used for the payment | card |
| method_type | no index | text | Method type used for the payment processing attempt | card |
| provider | standard | text | Payment provider code | test |
| provider_reference_id | no index | text | Payment ID that will be sent to the provider | 67af402066554 |
| status | standard | text | Payment status | created |
| resolution | standard | text | Description of the state regarding the current payment status | ok |
| original_id | standard | text|null | Payment ID generated by the provider | 67af09fbb03b7 |
| provider_currency | standard | text | Provider Account currency | UAH |
| amount | no index | numeric(19,8) | Amount | |
| paid_amount | no index | numeric(19,8)|null | Actual amount paid by the customer. Consists of amount + fee | 100.00000000 |
| paid_fee | no index | numeric(19,8)|null | Commission during payment | 10.00000000 |
| refunded_amount | no index | numeric(19,8)|null | Amount of funds returned to the customers | 10.00000000 |
| charged_back_amount | no index | numeric(19,8)|null | Chargeback amount (funds withdrawn by banks) | 10.00000000 |
| paid_at | standard | timestamp(3)|null | Actual date and time when the transaction was completed (reached "paid" status) | 2025-02-14 09:16:43.722 |
| created_at | standard | timestamp(3) | PR creation time | 2025-02-14 09:16:43.722 |
| expires_at | no index | timestamp(3)|null | PR lifetime | 2025-02-14 09:16:43.722 |
| status_updated_at | no index | timestamp(3) | Time when the status was last changed | 2025-02-14 09:16:43.722 |
Refund scheme
| Field Name | Index | DB Type | Description | example |
| id | unique (primary key) | text | Unique identifier of the Payment Request | ptr_94YPGWNCVqxhfk52 |
| organization_id | standard | text | Organization context within which the Payment Request was created | org_tAvzLEWhpSVsGuJa |
| payment_commit_id | standard | text | Payment Transaction for which an attempt to process a Payment Commit was made | ptr_Rt9pq2InJ4GXzghM |
| payment_transaction_id | standard | text | Payment Request for which the Payment Transaction was created | pr_t93tktSXRzIwpWDQ |
| test_mode | no index | bool | Whether the payment is a test one | true |
| refund_type | standard | text | Refund type | payment |
| description | no index | text|null | Description | |
| status | standard | text | Payment status | created |
| resolution | standard | text | Description of the state regarding the current payment status | ok |
| original_id | no index | text|null | Payment ID generated by the provider | 67af09fbb03b7 |
| amount | no index | numeric(19,8) | Amount | |
| currency | no index | text | Currency | UAH |
| created_at | standard | timestamp(3) | Refund creation time | 2025-02-14 09:16:43.722 |
Updated 1 day ago
