### Chargeflow Webhook Payload Examples (JSON) Source: https://docs.chargeflow.io/docs/evidence-as-a-service Provides example JSON payloads for Chargeflow webhooks, including 'evidence.ready' and 'evidence.error' events. These payloads contain details about the generated evidence or any errors encountered during the process. ```json { "event": { "id": "evt_XXXXXXXXXXXXXXXX", "type": "evidence.ready", "created_at": "2025-07-29T12:34:56Z" }, "evidence": { "id": "ev_abc123456789", "account_id": "acct_9876543210", "ext_account_id": "ext_acct_54321", "dispute": "dp_1122334455", "created_at": "2025-07-29T14:35:00Z", "status": "completed", "file_url": "https://cdn.chargeflow.io/evidence/ev_abc123456789/v2/evidence.pdf", "file_version": 1 } } ``` ```json { "event": { "id": "evt_XXXXXXXXXXXXXXXX", "type": "evidence.error", "created_at": "2025-07-29T12:34:56Z" }, "evidence": { "id": "ev_abc123456789", "account_id": "acct_9876543210", "ext_account_id": "ext_acct_54321", "dispute": "dp_1122334455", "created_at": "2025-07-29T14:35:00Z", "status": "error", "file_url": null, "file_version": 1 }, "error_code": "422_dispute_invalid_state", "error_message": "Dispute status must be needs_response" } ``` -------------------------------- ### Appending to an Array Field - JSON Example Source: https://docs.chargeflow.io/docs/the-update-dispute-api This example demonstrates how to append a new product to an existing array of products within the 'order' object. To add an item, you must include all existing items along with the new item in the payload. Omitting existing items will result in their removal. ```JSON { "order": { "products": [ { "name": "Shoes", "id": "123456789", "type": "physical_good", "quantity": 1, "description": "Nice shoes", "price": 150 }, { "name": "Socks", "id": "987654321", "type": "physical_good", "quantity": 2, "description": "Comfort socks", "price": 20 } ] } } ``` -------------------------------- ### Handle Chargeflow Webhook Events (Node.js with Express) Source: https://docs.chargeflow.io/docs/webhooks This example shows how to set up a basic HTTP endpoint using Express.js to receive and process Chargeflow webhook events. It configures the endpoint to accept JSON payloads and return a 2xx status code to acknowledge receipt. The code includes a switch statement to handle different event types, such as 'dispute.ingested', and demonstrates where to optionally add signature verification. ```javascript // This example uses Express to receive webhooks const express = require('express'); const app = express(); // Match the raw body to content type application/json // If you are using Express v4 - v4.16 you need to use body-parser, not express, to retrieve the request body app.post('/webhook', express.json({type: 'application/json'}), (request, response) => { const event = request.body; // Optionally validate request signature against body from x-chargeflow-hmac-sha256 header // Handle the event switch (event.type) { case 'dispute.ingested': const disputeIngested = event.data; // Then define and call a method to handle the dispute ingested event data. // handleDisputeIngested(disputeIngested); break; // ... handle other event types default: console.log(`Unhandled event type ${event.type}`); } // Return a response to acknowledge receipt of the event response.json({received: true}); }); app.listen(8000, () => console.log('Running on port 8000')); ``` -------------------------------- ### Inline Data Creation - Transaction Example Source: https://docs.chargeflow.io/docs/the-update-dispute-api This JSON payload illustrates inline data creation for the transaction object. This method is used when you need to include the actual data directly in the PATCH call, typically when no existing Chargeflow object can be linked or immediate enrichment is required. ```JSON { "transaction": { "payment_method": { "checks": { "three_d_secure_result": "passed", "avs_results": "Y", "address_line1_check": "passed", "address_zip_check": "passed", "cvc_check": "passed" }, "name": "John Doe", "type": "card", "last4": 4242, "expiry_month": "12", "expiry_year": "2027", "brand": "visa", "country": "US" }, "billing_address": { "name": "John Doe", "line1": "123 Main St", "line2": "Apt 4B", "city": "New York", "country": "US", "state": "NY", "zip_code": "10001", "phone": "1(123)4567890" }, "source_id": "trx_1234567890", "created_at": "2025-01-27T10:00:00Z", "type": "paid", "amount": 100, "currency": "USD" } } ``` -------------------------------- ### Example 403 Forbidden Response Format Source: https://docs.chargeflow.io/docs/error-handling This snippet shows the expected JSON response format for a 403 Forbidden error, indicating an invalid API key. It can be used to programmatically check for this specific error condition. ```json { "message": "Forbidden" } ``` -------------------------------- ### Successful Dispute Update Response (HTTP/JSON) Source: https://docs.chargeflow.io/docs/the-update-dispute-api This is an example of the HTTP response returned by Chargeflow after a successful PATCH request to update a dispute. The response includes the full, updated dispute object with all associated enrichment data, allowing for immediate confirmation of the changes. ```http HTTP/1.1 200 OK Content-Type: application/json { "id": "dis_12345", "source_id": "proc_67890", "account_id": "act_112233", "ext_account_id": "ext_act_445566", "created_at": "2025-01-27T10:00:00Z", "reason": "fraud", "due_by": "2025-02-10T10:00:00Z", "source": "stripe", "amount": 150, "currency": "USD", "status": "needs_response", "stage": "chargeback", "closed_at": null, "evidence": {}, "transaction": { "id": "trx_654321", "source_id": "550e8400-e29b-41d4-a716-446655440000", "created_at": "2025-01-26T15:00:00Z", "type": "paid", "amount": 150, "currency": "USD", "payment_method": { "name": "John Doe", "type": "card", "last4": 4242, "expiry_month": "12", "expiry_year": "2027", "brand": "visa", "country": "US", "checks": { "three_d_secure_result": "passed", "avs_results": "Y", "address_line1_check": "passed", "address_zip_check": "passed", "cvc_check": "passed" } }, "billing_address": { "name": "John Doe", "line1": "123 Main Street", "line2": "Apt 4B", "city": "New York", "country": "US", "state": "NY", "zip_code": "10001", "phone": "1(123)4567890" } }, "order": { "id": "ord_98765", "source_id": "748e2a7c-4d21-11ee-8c99-0242ac120002", "account_id": "act_112233", "ext_account_id": "ext_act_445566", "created_at": "2025-01-26T14:30:00Z", "payment_status": "paid", "name": "#ORD-98765", "type": "pre_order", "amount": 150, "currency": "USD", "customer": { "name": "John Doe", "email": "john.doe@example.com", "customer_since": "2023-06-15T12:00:00Z", "order_count": 10, "phone_number": "1(123)4567890", "ip_address": "192.168.1.1", "verified_email": true }, "products": [ { "name": "Wireless Headphones", "id": "prod_12345", "type": "physical_good", "quantity": 1, "description": "Noise-canceling wireless headphones with Bluetooth connectivity.", "image_url": "https://example.com/images/products/12345.jpg", "price": 150 } ], "shipping_address": { "name": "John Doe", "line1": "123 Main Street", "line2": "Apt 4B", "city": "New York", "country": "US", "state": "NY", "zip_code": "10001", "phone": "1(123)4567890" }, "fulfillments": [ { "product_id": "prod_12345", "shipped_at": "2025-01-26T18:00:00Z", "shipping_line_title": "FedEx Air Express Shipping", "shipping_method_price": 0, "tracking_number": "1Z999AA10123456789", "courier": "FedEx" } ] }, "activity_logs": null, "customer_communication": "ccm_01j92p1x8a6y7t4gz8d9w3n5qk", "booking": null } ``` -------------------------------- ### Sign Multipart Requests with Binary Data (JavaScript) Source: https://docs.chargeflow.io/docs/getting-started This JavaScript code demonstrates how to sign multipart/form-data requests containing binary files for the Chargeflow API. It includes functions for generating MD5 hashes of file contents (after Base64 encoding), normalizing form data into a string for signing, and calculating the final HMAC-SHA256 signature. Compatible with Node.js 18+. ```javascript // Compatible with Node.JS 18+ const crypto = require('crypto'); const fs = require('fs'); const { blob } = require('stream/consumers') // Function to generate HMAC-SHA256 signature function generateHmacSignature(data, secretKey) { const hmac = crypto.createHmac('sha256', secretKey); hmac.update(data); return hmac.digest('hex'); } // Function to create MD5 hash of a FormData part async function createPartHash(part) { const isFile = part instanceof File const partString = isFile ? await fileToBase64(part) : part; return getMd5(partString); } function getMd5(contents) { return crypto.createHash('md5').update(contents).digest('hex'); } async function fileToBase64(file) { return Buffer.from(await file.arrayBuffer()).toString('base64') } // Function to normalize FormData into a signing string async function formDataToSignString(formData) { const formDataEntries = Array.from(formData); const hashedParts = [] for (const [key, value] of formDataEntries) { const partHash = await createPartHash(value); hashedParts.push(`${key}=${partHash}`); } return hashedParts.sort().join(';') } // Function to calculate HMAC signature async function calculateHmacForFormData(method, path, formData, secretKey) { const body = await formDataToSignString(formData); const requestData = { method: method.toUpperCase(), path, body, }; // Compose string to sign from request data const dataToSign = `${requestData.method}\n${requestData.path}\n${requestData.body}`; // Generate HMAC signature const hmacSignature = generateHmacSignature(dataToSign, secretKey); return hmacSignature; } async function signRequest() { // Example request data const method = 'POST'; const path = '/public/2024-03-18/disputes/dispute-id/order'; // Prepare FormData, same as when sending a multipart/form-data request const formData = new FormData() formData.append('description', 'File description') formData.append('file', await blob(fs.createReadStream('./foo/bar.jpg')), 'bar.jpg') // Calculate HMAC signature const secretKey = 'your-secret-key'; const hmacSignature = await calculateHmacForFormData(method, path, formData, secretKey); console.log('Generated HMAC-SHA256 Signature:', hmacSignature); // You can now use the generated signature as the 'x-chargeflow-hmac-sha256' header value } signRequest() ``` -------------------------------- ### POST /public/2025-04-01/evidence Source: https://docs.chargeflow.io/docs/evidence-as-a-service Generate evidence for a dispute. This endpoint accepts either an existing dispute ID or a full inline dispute object. Evidence generation is an asynchronous process, and you will be notified via webhooks upon completion or error. ```APIDOC ## Generate Evidence ### Description Initiates the evidence generation process for a given dispute. This can be triggered by providing an existing dispute ID or a complete dispute object. ### Method POST ### Endpoint `/public/2025-04-01/evidence` ### Parameters #### Request Body Either `dispute_id` or a full dispute object must be provided. - **dispute_id** (string, optional) - The ID of an existing dispute. - **dispute** (object, optional) - A full dispute object if not using `dispute_id`. - **id** (string) - Unique identifier for the dispute. - **account_id** (string) - Identifier for the Chargeflow account. - **ext_account_id** (string) - External identifier for the merchant account. - **created_at** (string) - Timestamp when the dispute was created. - **status** (string) - The current status of the dispute (e.g., `needs_response`). - ... (other relevant dispute fields) ### Request Example (using dispute_id) ```json { "dispute_id": "dp_1122334455" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the generated evidence. - **account_id** (string) - Identifier for the Chargeflow account. - **ext_account_id** (string) - External identifier for the merchant account. - **dispute_id** (string) - The ID of the associated dispute. - **created_at** (string) - Timestamp when the evidence generation was initiated. - **status** (string) - The initial status of the evidence generation (e.g., `in_progress`). - **file_url** (string or null) - URL to the evidence file, null if not yet available. - **file_version** (integer) - The version of the evidence file. #### Response Example ```json { "id": "ev_abc123456789", "account_id": "acct_9876543210", "ext_account_id": "ext_acct_54321", "dispute_id": "dp_1122334455", "created_at": "2025-07-29T14:35:00Z", "status": "in_progress", "file_url": null, "file_version": 1 } ``` ``` -------------------------------- ### Webhook Subscriptions Source: https://docs.chargeflow.io/docs/evidence-as-a-service Subscribe to Chargeflow webhooks to receive real-time notifications for evidence generation events, such as 'evidence.ready' when a PDF is ready and 'evidence.error' when an error occurs during generation. ```APIDOC ## Webhook Events ### Description Chargeflow sends webhook notifications for key events related to evidence generation. The primary events are `evidence.ready` and `evidence.error`. ### Method POST (Webhook Delivery) ### Endpoint Your configured webhook URL ### Request Body **event** (object) - Details about the event. - **id** (string) - Unique identifier for the event. - **type** (string) - The type of event (e.g., `evidence.ready`, `evidence.error`). - **created_at** (string) - Timestamp when the event was created. **evidence** (object) - Details about the evidence generated. - **id** (string) - Unique identifier for the evidence. - **account_id** (string) - Identifier for the Chargeflow account. - **ext_account_id** (string) - External identifier for the merchant account. - **dispute** (string) - Identifier for the associated dispute. - **created_at** (string) - Timestamp when the evidence was created. - **status** (string) - The current status of the evidence generation (e.g., `completed`, `error`). - **file_url** (string) - URL to the generated evidence file (null if error). - **file_version** (integer) - The version of the evidence file. **error_code** (string, optional) - Error code if the event type is `evidence.error`. **error_message** (string, optional) - Detailed error message if the event type is `evidence.error`. ### Request Example (evidence.ready) ```json { "event": { "id": "evt_XXXXXXXXXXXXXXXX", "type": "evidence.ready", "created_at": "2025-07-29T12:34:56Z" }, "evidence": { "id": "ev_abc123456789", "account_id": "acct_9876543210", "ext_account_id": "ext_acct_54321", "dispute": "dp_1122334455", "created_at": "2025-07-29T14:35:00Z", "status": "completed", "file_url": "https://cdn.chargeflow.io/evidence/ev_abc123456789/v2/evidence.pdf", "file_version": 1 } } ``` ### Request Example (evidence.error) ```json { "event": { "id": "evt_XXXXXXXXXXXXXXXX", "type": "evidence.error", "created_at": "2025-07-29T12:34:56Z" }, "evidence": { "id": "ev_abc123456789", "account_id": "acct_9876543210", "ext_account_id": "ext_acct_54321", "dispute": "dp_1122334455", "created_at": "2025-07-29T14:35:00Z", "status": "error", "file_url": null, "file_version": 1 }, "error_code": "422_dispute_invalid_state", "error_message": "Dispute status must be needs_response" } ``` ### Common Errors - **`422_dispute_invalid_state`**: Dispute must have status `needs_response` to generate evidence. - **`409_generation_in_progress`**: Evidence generation already in progress; use `idempotency-key` to avoid duplicates. - **`404_*_not_found`**: Dispute not found; verify `dispute.id`. - **`403_eaas_not_enabled`**: API key not entitled to EaaS; contact account manager. - **`504_generation_timeout`**: Operation timed out; retry required. ``` -------------------------------- ### Chargeflow Generate Evidence API Response (JSON) Source: https://docs.chargeflow.io/docs/evidence-as-a-service Illustrates the expected JSON response when successfully calling the Generate Evidence API. This payload includes details about the newly created evidence object, such as its ID, status, and associated dispute. ```json { "id": "ev_abc123456789", "account_id": "acct_9876543210", "ext_account_id": "ext_acct_54321", "dispute_id": "dp_1122334455", "created_at": "2025-07-29T14:35:00Z", "status": "in_progress", "file_url": null, "file_version": 1 } ``` -------------------------------- ### Retrieve All Alerts Source: https://docs.chargeflow.io/docs/alerts-api-overview Retrieves a paginated list of all alerts associated with the account. Supports filtering by date, type, status, and reason. ```APIDOC ## GET /alerts ### Description Retrieve a paginated list of all alerts associated with your account. Supports filtering by date, type, status, and reason. ### Method GET ### Endpoint /alerts ### Parameters #### Query Parameters - **date** (string) - Optional - Filter alerts by date. - **type** (string) - Optional - Filter alerts by type. - **status** (string) - Optional - Filter alerts by status. - **reason** (string) - Optional - Filter alerts by reason. ### Request Example ``` GET /alerts?date=2023-10-27&status=open ``` ### Response #### Success Response (200) - **alerts** (array) - A list of alert objects. - **id** (string) - The unique identifier for the alert. - **status** (string) - The current status of the alert. - **type** (string) - The type of the alert. - **reason** (string) - The reason for the alert. - **createdAt** (string) - The timestamp when the alert was created. #### Response Example ```json { "alerts": [ { "id": "alert_123", "status": "open", "type": "pre_chargeback", "reason": "customer_inquiry", "createdAt": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### POST /public/2025-04-01/accounts Source: https://docs.chargeflow.io/docs/evidence-as-a-service Create a merchant entity with minimal details such as Business Name, Business URL, and Email Address. This entity is used by Chargeflow to enrich merchant profiles and align evidence strategies. ```APIDOC ## Create Merchant Entity ### Description Creates a new merchant entity within Chargeflow. This is a prerequisite for managing disputes and generating evidence for a specific merchant. ### Method POST ### Endpoint `/public/2025-04-01/accounts` ### Parameters #### Request Body - **business_name** (string) - Required - The legal or trading name of the business. - **business_url** (string) - Required - The primary website URL for the business. - **email_address** (string) - Required - The primary contact email address for the merchant. ### Request Example ```json { "business_name": "Example Merchant Inc.", "business_url": "https://www.examplemerchant.com", "email_address": "contact@examplemerchant.com" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created merchant entity. - **business_name** (string) - The business name. - **business_url** (string) - The business URL. - **email_address** (string) - The merchant's email address. - **created_at** (string) - Timestamp when the entity was created. #### Response Example ```json { "id": "acct_9876543210", "business_name": "Example Merchant Inc.", "business_url": "https://www.examplemerchant.com", "email_address": "contact@examplemerchant.com", "created_at": "2025-07-29T10:00:00Z" } ``` ``` -------------------------------- ### API Versioning Source: https://docs.chargeflow.io/docs/version-management Chargeflow uses a date-based API versioning strategy managed through a path parameter. Developers can select a specific API version by replacing the `{apiVersion}` placeholder in the endpoint URL. ```APIDOC ## API Versioning ### Description Chargeflow employs path parameter-based version management for its APIs, utilizing a date-based system to ensure stability and allow for controlled updates. Developers can select a specific API version by modifying the path parameter. ### Method N/A (This describes a general API pattern, not a specific HTTP method) ### Endpoint `https://api.chargeflow.io/public/{apiVersion}/...` ### Parameters #### Path Parameters - **apiVersion** (string) - Required - The date representing the desired API version (e.g., `2024-03-18`). ### Request Example ``` https://api.chargeflow.io/public/2024-03-18/some/endpoint ``` ### Response This section describes a pattern, not a specific response. #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### HMAC-SHA256 Signature Generation (Python) Source: https://docs.chargeflow.io/docs/getting-started This section provides a Python implementation for generating HMAC-SHA256 signatures required for Chargeflow API requests, ensuring secure and authenticated communication. ```APIDOC ## POST /public/2024-03-18/disputes/dispute-id/order ### Description This endpoint is used for creating or updating disputes. To ensure the integrity and authenticity of the request, an HMAC-SHA256 signature must be generated and included in the request headers. ### Method POST ### Endpoint /public/2024-03-18/disputes/dispute-id/order ### Parameters #### Query Parameters None #### Request Body - **param** (string) - Required - Example value: 'value' ### Request Example ```python import hashlib import hmac import json def generate_hmac_signature(data, secret_key): signature = hmac.new( bytes(secret_key, 'utf-8'), msg = bytes(data, 'utf-8'), digestmod = hashlib.sha256).hexdigest() return signature method = 'POST' path = '/public/2024-03-18/disputes/dispute-id/order' body = json.dumps({'param': 'value'}) secret_key = 'your-secret-key' data_to_sign = f"{method.upper()}\n{path}\n{body}" hmac_signature = generate_hmac_signature(data_to_sign, secret_key) print('Generated HMAC-SHA256 Signature:', hmac_signature) # Use this signature in the 'x-chargeflow-hmac-sha256' header ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **message** (string) - A confirmation message. #### Response Example ```json { "status": "success", "message": "Dispute created successfully." } ``` ### Headers - **x-chargeflow-hmac-sha256** (string) - The generated HMAC-SHA256 signature. ``` -------------------------------- ### HMAC-SHA256 Signature Generation (Node.js) Source: https://docs.chargeflow.io/docs/getting-started This section details how to generate an HMAC-SHA256 signature for API requests using Node.js. The signature is crucial for authenticating requests to the Chargeflow API. ```APIDOC ## POST /public/2024-03-18/disputes/dispute-id/order ### Description This endpoint is used for creating or updating disputes. To ensure the integrity and authenticity of the request, an HMAC-SHA256 signature must be generated and included in the request headers. ### Method POST ### Endpoint /public/2024-03-18/disputes/dispute-id/order ### Parameters #### Query Parameters None #### Request Body - **param** (string) - Required - Example value: 'value' ### Request Example ```javascript const crypto = require('crypto'); function generateHmacSignature(data, secretKey) { const hmac = crypto.createHmac('sha256', secretKey); hmac.update(data); return hmac.digest('hex'); } const method = 'POST'; const path = '/public/2024-03-18/disputes/dispute-id/order'; const body = JSON.stringify({ param: 'value' }); const secretKey = 'your-secret-key'; const dataToSign = `${method.toUpperCase()}\n${path}\n${body}`; const hmacSignature = generateHmacSignature(dataToSign, secretKey); console.log('Generated HMAC-SHA256 Signature:', hmacSignature); // Use this signature in the 'x-chargeflow-hmac-sha256' header ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **message** (string) - A confirmation message. #### Response Example ```json { "status": "success", "message": "Dispute created successfully." } ``` ### Headers - **x-chargeflow-hmac-sha256** (string) - The generated HMAC-SHA256 signature. ``` -------------------------------- ### PATCH /public/2025-04-01/disputes/{disputeId} Source: https://docs.chargeflow.io/docs/evidence-as-a-service Enrich an existing dispute with additional details. This is part of the merchant self-serve integration pattern, allowing merchants to provide information through your portal, which Chargeflow then uses to enrich the dispute. ```APIDOC ## Enrich Dispute Details ### Description Updates an existing dispute with additional information. This endpoint is typically used in merchant self-serve scenarios where merchants add details via your platform. ### Method PATCH ### Endpoint `/public/2025-04-01/disputes/{disputeId}` ### Parameters #### Path Parameters - **disputeId** (string) - Required - The unique identifier of the dispute to enrich. #### Request Body - **field_name** (any) - The field to update and its new value. Accepts various dispute-related fields. ### Request Example ```json { "customer_name": "John Doe", "reason_code": "fraudulent", "evidence_details": { "tracking_number": "1Z999AA10123456784" } } ``` ### Response #### Success Response (200) - **id** (string) - The updated dispute ID. - **status** (string) - The updated status of the dispute. - ... (other updated dispute fields) #### Response Example ```json { "id": "dp_1122334455", "status": "needs_response", "customer_name": "John Doe", "reason_code": "fraudulent", "evidence_details": { "tracking_number": "1Z999AA10123456784" }, "updated_at": "2025-07-29T15:00:00Z" } ``` ``` -------------------------------- ### Verify Chargeflow Webhook HMAC Signature (Node.js) Source: https://docs.chargeflow.io/docs/webhooks This code snippet demonstrates how to verify the authenticity of incoming Chargeflow webhook requests using HMAC-SHA256 signatures. It requires the 'crypto' module and involves generating a signature based on the request's method, path, and body, then comparing it with the signature provided in the 'X-Chargeflow-Hmac-Sha256' header. Ensure you replace 'your_secret_key' with your actual Chargeflow secret key. ```javascript const crypto = require('crypto') // Function to generate HMAC-SHA256 signature function generateHmacSignature(data, secretKey) { const hmac = crypto.createHmac('sha256', secretKey); hmac.update(data); return hmac.digest('hex'); } function verifySignature(req) { const receivedSig = req.headers['x-chargeflow-hmac-sha256']; const method = req.method const path = req.originalUrl const body = JSON.stringify(req.body) const dataToSign = `${method}\n${path}\n${body}`; const secret = 'your_secret_key'; // Obtain from Chargeflow admin panel const hash = generateHmacSignature(dataToSign, secret); return receivedSig === hash; } ``` -------------------------------- ### Deprecation of API Methods Source: https://docs.chargeflow.io/docs/version-management Chargeflow may mark specific API methods within a version as deprecated during significant updates. Deprecated methods will be removed in future versions, providing users with advance notice for migration. ```APIDOC ## Deprecation of API Methods ### Description During significant updates, Chargeflow may mark specific API methods of a version as deprecated. When a method is marked as deprecated, it indicates that it will no longer be available for usage in upcoming versions. This policy allows users ample time to prepare in advance, facilitating a smooth transition to the new version. ### Method N/A (This describes a policy, not a specific HTTP method) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Retrieve Specific Alert Source: https://docs.chargeflow.io/docs/alerts-api-overview Retrieves full details of a specific alert by its ID, including status, outcome, and transaction details. ```APIDOC ## GET /alerts/{id} ### Description Retrieve full details of a specific alert by its ID, including status, outcome and transaction details. ### Method GET ### Endpoint /alerts/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the alert. ### Request Example ``` GET /alerts/alert_123 ``` ### Response #### Success Response (200) - **alert** (object) - An object containing the full details of the alert. - **id** (string) - The unique identifier for the alert. - **status** (string) - The current status of the alert. - **type** (string) - The type of the alert. - **reason** (string) - The reason for the alert. - **createdAt** (string) - The timestamp when the alert was created. - **outcome** (object) - Details about the alert's outcome. - **transactionDetails** (object) - Details about the associated transaction. #### Response Example ```json { "alert": { "id": "alert_123", "status": "open", "type": "pre_chargeback", "reason": "customer_inquiry", "createdAt": "2023-10-27T10:00:00Z", "outcome": { "status": "prevented", "resolvedAt": "2023-10-27T11:00:00Z" }, "transactionDetails": { "transactionId": "txn_abc", "amount": 100.00, "currency": "USD" } } } ``` ```