### Install integrify-epoint Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Install the library using pip. ```bash pip install integrify-epoint ``` -------------------------------- ### Async Payment Example with EPoint SDK Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Demonstrates making an asynchronous payment using the EPoint SDK. All methods are available in async mode via `EPointAsyncRequest` or by instantiating `EPointClientClass(sync=False)`. The async client uses `httpx.AsyncClient`. ```python import asyncio from integrify.epoint import EPointAsyncRequest from integrify.epoint.schemas.enums import TransactionStatus async def process_payment(): resp = await EPointAsyncRequest.pay( amount=75.00, currency='AZN', order_id='async-order-001', description='Async payment example', ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.redirect_url) return resp.body.redirect_url asyncio.run(process_payment()) ``` -------------------------------- ### Async Payment Example Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Demonstrates how to perform an asynchronous payment using the `EPointAsyncRequest` client. ```APIDOC ## Async Usage All methods are available in async mode via `EPointAsyncRequest` or by instantiating `EPointClientClass(sync=False)`. The async client uses `httpx.AsyncClient` under the hood. ```python import asyncio from integrify.epoint import EPointAsyncRequest from integrify.epoint.schemas.enums import TransactionStatus async def process_payment(): resp = await EPointAsyncRequest.pay( amount=75.00, currency='AZN', order_id='async-order-001', description='Async payment example', ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.redirect_url) return resp.body.redirect_url asyncio.run(process_payment()) ``` ``` -------------------------------- ### Initialize EPoint Client Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Initialize synchronous or asynchronous EPoint clients. Custom instantiation with dry-run mode is also supported. ```python from integrify.epoint import EPointRequest, EPointAsyncRequest from integrify.epoint.client import EPointClientClass # Pre-built singleton instances (recommended) sync_client = EPointRequest # synchronous async_client = EPointAsyncRequest # asynchronous # Custom instantiation with dry-run mode (no real HTTP calls) dry_client = EPointClientClass(sync=True, dry=True) ``` -------------------------------- ### Configure EPoint Environment Variables Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Set required and optional environment variables for EPoint configuration. Ensure EPOINT_PUBLIC_KEY and EPOINT_PRIVATE_KEY are set. ```bash # Required export EPOINT_PUBLIC_KEY="your_public_key" export EPOINT_PRIVATE_KEY="your_private_key" # Optional export EPOINT_INTERFACE_LANG="az" # Payment page language (default: az) export EPOINT_SUCCESS_REDIRECT_URL="https://yourapp.com/success" export EPOINT_FAILED_REDIRECT_URL="https://yourapp.com/failed" export EPOINT_LOGGER_NAME="epoint" # Logger name (default: epoint) ``` -------------------------------- ### Pay and Register Card Simultaneously with EPoint Python SDK Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Initiates a payment and card registration in one step. The response provides a redirect_url for customer payment and a card_id for future use. A callback is sent after payment completion with order_id and card_id. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus resp = EPointRequest.pay_and_save_card( amount=150.00, currency='AZN', order_id='order-20240101-003', description='Subscription payment with card save', ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.redirect_url) # redirect customer here print(resp.body.card_id) # 'cexxxxxxxxxx' — save for future use print(resp.body.transaction) # 'texxxxxxxxxx' ``` -------------------------------- ### Initiate Payment Request Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Send a payment request to EPoint and obtain a redirect URL. The response includes transaction details and status. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus resp = EPointRequest.pay( amount=99.99, currency='AZN', order_id='order-20240101-001', description='Order payment', # Optional: pass arbitrary extra fields returned in the callback user_id='user-42', ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.redirect_url) # 'https://epoint.az/...' — redirect customer here print(resp.body.transaction) # 'texxxxxxxxxx' ``` -------------------------------- ### `pay` — Initiate a Payment Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Sends a payment request to `/api/1/request`. Returns a `redirect_url` that the customer must visit to enter card details. After successful payment, EPoint POSTs callback data to your configured webhook URL. ```APIDOC ## POST /api/1/request ### Description Initiates a payment request to the EPoint gateway. ### Method POST ### Endpoint /api/1/request ### Parameters #### Request Body - **amount** (float) - Required - The payment amount. - **currency** (string) - Required - The currency code (e.g., 'AZN'). - **order_id** (string) - Required - Unique identifier for the order. - **description** (string) - Required - Description of the payment. - **user_id** (string) - Optional - Arbitrary extra field to be returned in the callback. ### Response #### Success Response (200) - **status** (TransactionStatus) - The status of the transaction. - **redirect_url** (string) - The URL to redirect the customer for payment. - **transaction** (string) - The transaction ID. ### Request Example ```python from integrify.epoint import EPointRequest resp = EPointRequest.pay( amount=99.99, currency='AZN', order_id='order-20240101-001', description='Order payment', user_id='user-42', ) ``` ### Response Example ```json { "status": "success", "redirect_url": "https://epoint.az/pay?token=...", "transaction": "texxxxxxxxxx" } ``` ``` -------------------------------- ### Register Card Without Payment Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Register a customer's card without initiating a charge. A redirect URL and a card ID are returned, and a callback is sent upon completion. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus resp = EPointRequest.save_card() assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.redirect_url) # redirect customer here to enter card details print(resp.body.card_id) # 'cexxxxxxxxxx' — persist this for future use ``` -------------------------------- ### Split Payment and Save Card with EPoint Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Combines a split payment with card registration. Returns a redirect URL and card ID. A callback is sent after the customer completes payment. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus resp = EPointRequest.split_pay_and_save_card( amount=100.00, currency='AZN', order_id='split-save-001', split_user_id='partner_epoint_user_id', split_amount=40.00, description='Split with card registration', ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.redirect_url) # redirect customer here print(resp.body.card_id) # 'cexxxxxxxxxx' — persist for future payments print(resp.body.transaction) # 'texxxxxxxxxx' ``` -------------------------------- ### Split Payment Between Merchants with EPoint Python SDK Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Splits a payment between your merchant account and another EPoint user. Returns a redirect_url for customer payment. A callback is sent after payment with both original and split amounts. Requires a split_user_id and split_amount. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus resp = EPointRequest.split_pay( amount=100.00, currency='AZN', order_id='split-order-001', split_user_id='partner_epoint_user_id', split_amount=40.00, # amount routed to split_user_id description='Marketplace split payment', # extra kwargs are returned in callback as other_attr product_id='prod-999', ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.redirect_url) # redirect customer here print(resp.body.transaction) # 'texxxxxxxxxx' ``` -------------------------------- ### pay_and_save_card Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Initiates a payment and card registration in one step. It returns a redirect URL for the customer to complete payment and a card ID for future use. A callback is sent after payment completion. ```APIDOC ## `pay_and_save_card` — Pay and Register Card Simultaneously Initiates a payment and card registration in one step via `/api/1/card-registration-with-pay`. Returns `redirect_url` and `card_id`. After the customer completes payment, a callback is sent containing both `order_id` and `card_id`. ### Method POST ### Endpoint /api/1/card-registration-with-pay ### Parameters #### Request Body - **amount** (float) - Required - The transaction amount. - **currency** (string) - Required - The currency code (e.g., 'AZN'). - **order_id** (string) - Required - Unique identifier for the order. - **description** (string) - Optional - A description for the transaction. ### Request Example ```python { "amount": 150.00, "currency": "AZN", "order_id": "order-20240101-003", "description": "Subscription payment with card save" } ``` ### Response #### Success Response (200) - **status** (TransactionStatus) - The status of the transaction. - **redirect_url** (string) - The URL to redirect the customer for payment. - **card_id** (string) - The ID of the newly registered card. - **transaction** (string) - The transaction ID. ### Response Example ```json { "status": "SUCCESS", "redirect_url": "https://example.com/pay?token=...", "card_id": "cexxxxxxxxxx", "transaction": "texxxxxxxxxx" } ``` ``` -------------------------------- ### Split Payment with Saved Card using EPoint Python SDK Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Performs a split payment using a previously saved card. Returns the final split result directly, without requiring a redirect or callback. Requires a card_id, split_user_id, and split_amount. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus resp = EPointRequest.split_pay_with_saved_card( amount=100.00, currency='AZN', order_id='split-saved-001', card_id='cexxxxxxxxxx', split_user_id='partner_epoint_user_id', split_amount=40.00, ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.transaction) # 'texxxxxxxxxx' print(resp.body.split_amount) # Decimal('40.00') print(resp.body.amount) # Decimal('100.00') ``` -------------------------------- ### Manually Handle Raw EPoint Callback Data Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Manually verifies the SHA-1 HMAC signature and decodes the incoming callback POST body from EPoint. Use this if not using FastAPI. Raises ValueError on signature mismatch. ```python import os from fastapi import FastAPI, APIRouter, Depends from integrify.epoint.helpers import decode_callback_data from integrify.epoint.schemas.callback import CallbackDataSchema, DecodedCallbackDataSchema app = FastAPI() router = APIRouter() # --- Manual usage (non-FastAPI) --- def handle_raw_callback(raw_body: bytes): # raw_body example: b'data=eyJzdGF0dXMiOiAic3VjY2VzcyJ9&signature=EG7cna...' callback_raw = CallbackDataSchema.model_validate(raw_body) decoded = decode_callback_data(callback_raw) if decoded is None: raise ValueError('Signature mismatch — reject request') return decoded app.include_router(router) ``` -------------------------------- ### Charge a Saved Card with EPoint Python SDK Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Use this method to charge a previously saved card directly. No redirect or callback is involved; the response contains the final transaction result immediately. Ensure the card_id is from a prior save_card or pay_and_save_card call. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus resp = EPointRequest.pay_with_saved_card( amount=49.50, currency='AZN', order_id='order-20240101-002', card_id='cexxxxxxxxxx', # card_id from a prior save_card or pay_and_save_card call ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.transaction) # 'texxxxxxxxxx' print(resp.body.bank_transaction) # bank-side transaction ID print(resp.body.rrn) # 'RRN-123456789' ``` -------------------------------- ### Verify and Decode EPoint Webhook Payload with FastAPI Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Automatically verifies the SHA-1 HMAC signature and decodes the incoming callback POST body from EPoint using FastAPI's dependency injection. Returns a DecodedCallbackDataSchema on success, or None if the signature is invalid. ```python import os from fastapi import FastAPI, APIRouter, Depends from integrify.epoint.helpers import decode_callback_data from integrify.epoint.schemas.callback import CallbackDataSchema, DecodedCallbackDataSchema app = FastAPI() router = APIRouter() # --- FastAPI (recommended): automatic signature verification via Depends --- @router.post('/payments/epoint/callback') async def epoint_callback(data: DecodedCallbackDataSchema = Depends(decode_callback_data)): if data is None: return {'error': 'Invalid signature'} # data is fully decoded and validated print(data.status) # 'success' or 'error' print(data.order_id) # 'order-20240101-001' print(data.transaction) # 'texxxxxxxxxx' print(data.amount) # Decimal('99.99') print(data.card_id) # 'cexxxxxxxxxx' (if card was saved) print(data.split_amount) # Decimal('40.00') (if split payment) return {'ok': True} app.include_router(router) ``` -------------------------------- ### Transfer Funds to a Card (Payout) with EPoint Python SDK Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Transfers funds from your EPoint merchant balance to a saved card. No callback is triggered; the final result is returned directly. Requires a valid card_id. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus resp = EPointRequest.payout( amount=200.00, currency='AZN', order_id='payout-20240101-001', card_id='cexxxxxxxxxx', description='Vendor payout', ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.transaction) # 'texxxxxxxxxx' print(resp.body.amount) # Decimal('200.00') print(resp.body.rrn) # retrieval reference number ``` -------------------------------- ### Refund a Transaction with EPoint Python SDK Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Reverses a completed transaction, either fully or partially. Omit the 'amount' parameter for a full refund. No callback is triggered; the result is returned directly. Requires the transaction_id of the original transaction. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus # Full refund resp = EPointRequest.refund( transaction_id='texxxxxxxxxx', currency='AZN', ) assert resp.body.status == TransactionStatus.SUCCESS # Partial refund resp = EPointRequest.refund( transaction_id='texxxxxxxxxx', currency='AZN', amount=25.00, ) assert resp.ok print(resp.body.status) # TransactionStatus.SUCCESS print(resp.body.message) # 'Approved' ``` -------------------------------- ### EPoint Response Schema Reference Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Reference for EPoint API response schemas. All API methods return `APIResponse[T]` where `.ok: bool` and `.body: T` is a Pydantic model. ```python from integrify.epoint.schemas.enums import TransactionStatus, TransactionStatusExtended ``` -------------------------------- ### Standard Transaction Statuses Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt These are the common transaction statuses available for most EPoint API endpoints. ```python TransactionStatus.SUCCESS # 'success' TransactionStatus.ERROR # 'error' TransactionStatus.FAILED # 'failed' TransactionStatus.SERVER_ERROR # 'server_error' ``` -------------------------------- ### split_pay Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Splits a payment between your merchant account and another EPoint user. It returns a redirect URL for payment completion, and a callback is sent afterward. ```APIDOC ## `split_pay` — Split Payment Between Merchants Splits a payment between your merchant account and another EPoint user via `/api/1/split-request`. Returns a `redirect_url`. After payment, a callback is sent with both `amount` and `split_amount`. ### Method POST ### Endpoint /api/1/split-request ### Parameters #### Request Body - **amount** (float) - Required - The total payment amount. - **currency** (string) - Required - The currency code (e.g., 'AZN'). - **order_id** (string) - Required - Unique identifier for the split payment order. - **split_user_id** (string) - Required - The EPoint user ID to split the payment with. - **split_amount** (float) - Required - The amount to be routed to the `split_user_id`. - **description** (string) - Optional - A description for the transaction. - **product_id** (string) - Optional - Identifier for the product being paid for. ### Request Example ```python { "amount": 100.00, "currency": "AZN", "order_id": "split-order-001", "split_user_id": "partner_epoint_user_id", "split_amount": 40.00, "description": "Marketplace split payment", "product_id": "prod-999" } ``` ### Response #### Success Response (200) - **status** (TransactionStatus) - The status of the split payment. - **redirect_url** (string) - The URL to redirect the customer for payment. - **transaction** (string) - The transaction ID. ### Response Example ```json { "status": "SUCCESS", "redirect_url": "https://example.com/split-pay?token=...", "transaction": "texxxxxxxxxx" } ``` ``` -------------------------------- ### Split Payment and Save Card Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Combines a split payment with card registration via `/api/1/split-card-registration-with-pay`. Returns `redirect_url` and `card_id`. A callback is sent after the customer completes payment. ```APIDOC ## `split_pay_and_save_card` — Split Payment and Save Card Combines a split payment with card registration via `/api/1/split-card-registration-with-pay`. Returns `redirect_url` and `card_id`. A callback is sent after the customer completes payment. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatus resp = EPointRequest.split_pay_and_save_card( amount=100.00, currency='AZN', order_id='split-save-001', split_user_id='partner_epoint_user_id', split_amount=40.00, description='Split with card registration', ) assert resp.ok assert resp.body.status == TransactionStatus.SUCCESS print(resp.body.redirect_url) # redirect customer here print(resp.body.card_id) # 'cexxxxxxxxxx' — persist for future payments print(resp.body.transaction) # 'texxxxxxxxxx' ``` ``` -------------------------------- ### `save_card` — Register a Card Without Payment Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Registers a card without charging via `/api/1/card-registration`. Returns a `redirect_url` and a `card_id`. After the customer enters card details, a callback is sent to your webhook with the `card_id` that can be used for future payments. ```APIDOC ## POST /api/1/card-registration ### Description Registers a customer's card without initiating a payment. ### Method POST ### Endpoint /api/1/card-registration ### Parameters No specific parameters are required for the request body. ### Response #### Success Response (200) - **status** (TransactionStatus) - The status of the card registration. - **redirect_url** (string) - The URL to redirect the customer to enter card details. - **card_id** (string) - The ID of the registered card. ### Request Example ```python from integrify.epoint import EPointRequest resp = EPointRequest.save_card() ``` ### Response Example ```json { "status": "success", "redirect_url": "https://epoint.az/register-card?token=...", "card_id": "cexxxxxxxxxx" } ``` ``` -------------------------------- ### Verify and Decode Webhook Payload Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Verifies the SHA-1 HMAC signature and Base64-decodes the incoming callback POST body from EPoint. Returns a `DecodedCallbackDataSchema` on success, or `None` if the signature is invalid. Integrates directly with FastAPI's dependency injection. ```APIDOC ## `decode_callback_data` — Verify and Decode Webhook Payload Verifies the SHA-1 HMAC signature and Base64-decodes the incoming callback POST body from EPoint. Returns a `DecodedCallbackDataSchema` on success, or `None` if the signature is invalid. Integrates directly with FastAPI's dependency injection. ```python import os from fastapi import FastAPI, APIRouter, Depends from integrify.epoint.helpers import decode_callback_data from integrify.epoint.schemas.callback import CallbackDataSchema, DecodedCallbackDataSchema app = FastAPI() router = APIRouter() # --- FastAPI (recommended): automatic signature verification via Depends --- @router.post('/payments/epoint/callback') async def epoint_callback(data: DecodedCallbackDataSchema = Depends(decode_callback_data)): if data is None: return {'error': 'Invalid signature'} # data is fully decoded and validated print(data.status) # 'success' or 'error' print(data.order_id) # 'order-20240101-001' print(data.transaction) # 'texxxxxxxxxx' print(data.amount) # Decimal('99.99') print(data.card_id) # 'cexxxxxxxxxx' (if card was saved) print(data.split_amount) # Decimal('40.00') (if split payment) return {'ok': True} # --- Manual usage (non-FastAPI) --- def handle_raw_callback(raw_body: bytes): # raw_body example: b'data=eyJzdGF0dXMiOiAic3VjY2VzcyJ9&signature=EG7cna...' callback_raw = CallbackDataSchema.model_validate(raw_body) decoded = decode_callback_data(callback_raw) if decoded is None: raise ValueError('Signature mismatch — reject request') return decoded app.include_router(router) ``` ``` -------------------------------- ### payout Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Transfers funds from your EPoint merchant balance to a saved card. This operation does not trigger a callback, and the final result is returned directly. ```APIDOC ## `payout` — Transfer Funds to a Card Transfers funds from your EPoint merchant balance to a saved card via `/api/1/refund-request`. No callback is triggered; the final result is returned directly. ### Method POST ### Endpoint /api/1/refund-request ### Parameters #### Request Body - **amount** (float) - Required - The amount to transfer. - **currency** (string) - Required - The currency code (e.g., 'AZN'). - **order_id** (string) - Required - Unique identifier for the payout order. - **card_id** (string) - Required - The ID of the saved card to transfer funds to. - **description** (string) - Optional - A description for the payout. ### Request Example ```python { "amount": 200.00, "currency": "AZN", "order_id": "payout-20240101-001", "card_id": "cexxxxxxxxxx", "description": "Vendor payout" } ``` ### Response #### Success Response (200) - **status** (TransactionStatus) - The status of the payout. - **transaction** (string) - The transaction ID. - **amount** (Decimal) - The amount transferred. - **rrn** (string) - The retrieval reference number. ### Response Example ```json { "status": "SUCCESS", "transaction": "texxxxxxxxxx", "amount": "200.00", "rrn": "retrieval-reference-number" } ``` ``` -------------------------------- ### refund Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Reverses a completed transaction, either fully or partially. Omit the amount for a full refund. No callback is triggered. ```APIDOC ## `refund` — Refund a Transaction (Full or Partial) Reverses a completed transaction via `/api/1/reverse`. Omit `amount` for a full refund; provide `amount` for a partial refund. No callback is triggered. ### Method POST ### Endpoint /api/1/reverse ### Parameters #### Request Body - **transaction_id** (string) - Required - The ID of the transaction to refund. - **currency** (string) - Required - The currency code (e.g., 'AZN'). - **amount** (float) - Optional - The amount to refund for a partial refund. ### Request Example (Full Refund) ```python { "transaction_id": "texxxxxxxxxx", "currency": "AZN" } ``` ### Request Example (Partial Refund) ```python { "transaction_id": "texxxxxxxxxx", "currency": "AZN", "amount": 25.00 } ``` ### Response #### Success Response (200) - **status** (TransactionStatus) - The status of the refund. - **message** (string) - A message indicating the result of the refund. ### Response Example ```json { "status": "SUCCESS", "message": "Approved" } ``` ``` -------------------------------- ### Extended Transaction Statuses Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt These extended statuses are specifically available for the `get_transaction_status` endpoint. ```python TransactionStatusExtended.NEW # 'new' TransactionStatusExtended.SUCCESS # 'success' TransactionStatusExtended.RETURNED # 'returned' TransactionStatusExtended.ERROR # 'error' TransactionStatusExtended.SERVER_ERROR # 'server_error' ``` -------------------------------- ### pay_with_saved_card Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Charges a previously saved card directly. This method does not involve a redirect or callback, providing the final transaction result immediately. ```APIDOC ## `pay_with_saved_card` — Charge a Saved Card Charges a previously saved card directly via `/api/1/execute-pay`. No redirect or callback is involved — the response contains the final transaction result immediately. ### Method POST ### Endpoint /api/1/execute-pay ### Parameters #### Request Body - **amount** (float) - Required - The transaction amount. - **currency** (string) - Required - The currency code (e.g., 'AZN'). - **order_id** (string) - Required - Unique identifier for the order. - **card_id** (string) - Required - The ID of the saved card to use. ### Request Example ```python { "amount": 49.50, "currency": "AZN", "order_id": "order-20240101-002", "card_id": "cexxxxxxxxxx" } ``` ### Response #### Success Response (200) - **status** (TransactionStatus) - The status of the transaction. - **transaction** (string) - The transaction ID. - **bank_transaction** (string) - The bank-side transaction ID. - **rrn** (string) - The retrieval reference number. ### Response Example ```json { "status": "SUCCESS", "transaction": "texxxxxxxxxx", "bank_transaction": "bank-side-tx-id", "rrn": "RRN-123456789" } ``` ``` -------------------------------- ### Compute EPoint Request Signature Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Generates the SHA-1-based HMAC signature used in all EPoint API requests. Exposed publicly for custom use or testing. The signature is computed as base64(sha1(PRIVATE_KEY + b64data + PRIVATE_KEY)). ```python from integrify.epoint.helpers import generate_signature import base64, json # Internally used for every API call payload = {'public_key': 'pub_key', 'amount': '100', 'currency': 'AZN', 'order_id': 'ord-1'} b64data = base64.b64encode(json.dumps(payload).encode()).decode() signature = generate_signature(b64data) # signature = base64(sha1(PRIVATE_KEY + b64data + PRIVATE_KEY)) print(signature) # 'EG7cnaJteYS6cVuR2aqDvpecQtk=' ``` -------------------------------- ### `get_transaction_status` — Query Transaction Status Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Queries the status of an existing transaction via `/api/1/get-status`. Returns an extended status enum including `new`, `success`, `returned`, `error`, `server_error`. Does not trigger a callback. ```APIDOC ## GET /api/1/get-status ### Description Queries the status of a specific transaction. ### Method GET ### Endpoint /api/1/get-status ### Parameters #### Query Parameters - **transaction_id** (string) - Required - The ID of the transaction to query. ### Response #### Success Response (200) - **status** (TransactionStatusExtended) - The extended status of the transaction. - **order_id** (string) - The order ID associated with the transaction. - **amount** (Decimal) - The transaction amount. - **rrn** (string) - The RRN of the transaction. - **card_mask** (string) - The masked card number used for the transaction. - **message** (string) - Additional message, especially for errors. ### Request Example ```python from integrify.epoint import EPointRequest resp = EPointRequest.get_transaction_status(transaction_id='texxxxxxxxxx') ``` ### Response Example ```json { "status": "success", "order_id": "order-20240101-001", "amount": "99.99", "rrn": "RRN-123456789", "card_mask": "*******1234" } ``` ``` -------------------------------- ### Compute Request Signature Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Generates the SHA-1-based HMAC signature used in all EPoint API requests. Called internally by all payload handlers; exposed publicly for custom use or testing. ```APIDOC ## `generate_signature` — Compute Request Signature Generates the SHA-1-based HMAC signature used in all EPoint API requests. Called internally by all payload handlers; exposed publicly for custom use or testing. ```python from integrify.epoint.helpers import generate_signature import base64, json # Internally used for every API call payload = {'public_key': 'pub_key', 'amount': '100', 'currency': 'AZN', 'order_id': 'ord-1'} b64data = base64.b64encode(json.dumps(payload).encode()).decode() signature = generate_signature(b64data) # signature = base64(sha1(PRIVATE_KEY + b64data + PRIVATE_KEY)) print(signature) # 'EG7cnaJteYS6cVuR2aqDvpecQtk=' ``` ``` -------------------------------- ### split_pay_with_saved_card Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Performs a split payment using a previously saved card. This method returns the final split result directly without requiring a redirect or callback. ```APIDOC ## `split_pay_with_saved_card` — Split Payment with Saved Card Performs a split payment using a previously saved card via `/api/1/split-execute-pay`. Returns the final split result directly with no redirect or callback needed. ### Method POST ### Endpoint /api/1/split-execute-pay ### Parameters #### Request Body - **amount** (float) - Required - The total payment amount. - **currency** (string) - Required - The currency code (e.g., 'AZN'). - **order_id** (string) - Required - Unique identifier for the split payment order. - **card_id** (string) - Required - The ID of the saved card to use. - **split_user_id** (string) - Required - The EPoint user ID to split the payment with. - **split_amount** (float) - Required - The amount to be routed to the `split_user_id`. ### Request Example ```python { "amount": 100.00, "currency": "AZN", "order_id": "split-saved-001", "card_id": "cexxxxxxxxxx", "split_user_id": "partner_epoint_user_id", "split_amount": 40.00 } ``` ### Response #### Success Response (200) - **status** (TransactionStatus) - The status of the split payment. - **transaction** (string) - The transaction ID. - **split_amount** (Decimal) - The amount successfully split. - **amount** (Decimal) - The total amount processed. ### Response Example ```json { "status": "SUCCESS", "transaction": "texxxxxxxxxx", "split_amount": "40.00", "amount": "100.00" } ``` ``` -------------------------------- ### Query Transaction Status Source: https://context7.com/integrify-sdk/integrify-epoint-python/llms.txt Query the status of an existing transaction using its ID. This method does not trigger a callback and returns extended status information. ```python from integrify.epoint import EPointRequest from integrify.epoint.schemas.enums import TransactionStatusExtended resp = EPointRequest.get_transaction_status(transaction_id='texxxxxxxxxx') assert resp.ok print(resp.body.status) # TransactionStatusExtended.SUCCESS print(resp.body.order_id) # 'order-20240101-001' print(resp.body.amount) # Decimal('99.99') print(resp.body.rrn) # 'RRN-123456789' print(resp.body.card_mask) # '*******1234' # Distinguish a failed transaction from a server error if resp.body.status == TransactionStatusExtended.ERROR: print('Payment failed:', resp.body.message) elif resp.body.status == TransactionStatusExtended.SERVER_ERROR: print('API error:', resp.body.message) # e.g. 'Signature did not match' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.