### Get Transaction List (Payout Example) API Source: https://developer-hub.paymid.com/index Illustrates fetching a payout transaction using the simplified transaction list endpoint. This example demonstrates how a payout record would appear in the response, including details like amount, currency, reference, and transaction ID. ```json { "success": true, "message": "Transaction list", "data": [ { "type": "payout", "status": "success", "amount": "45.00", "currency": "USD", "reference": "ref-5004", "created_at": "2025-06-05T08:53:08.000000Z", "payment_method": "Card (VISA)", "transaction_id": "56-9-4229389" } ], "pagination": { "total": 1, "current_items_count": 1, "items_per_page": 15, "current_page_no": 1, "last_page_no": 1, "has_more_pages": false } } ``` -------------------------------- ### Get Solution Groups List Response Example (JSON) Source: https://developer-hub.paymid.com/index This JSON object represents a successful response from the API for retrieving a list of merchant solution groups. It includes details for each group such as ID, name, logo, type, supported currencies, and dynamic currency support. ```json { "success": true, "message": "Merchant Solution Groups List", "data": [ { "id": "43ef5004-e4fd-4033-8ebd-d96f3d2f635a", "name": "General Group", "logo": "https://Paymid-staging.s3.amazonaws.com/solution-groups/images/eHaDaILd2trXceSu0lSFhXfYhbWk55KbJwYvAcvs.png", "type": "APM Group", "payment_type": "APM Group", "supported_currencies": [ "USD", "INR" ], "regions": [], "dynamic_currency_supported": 0 }, { "id": "e85c5d9c-84cc-11f0-9736-fc54af722c86", "name": "VIP Group", "logo": "https://Paymid-staging.s3.amazonaws.com/solution-groups/images/uoHbODFyr7UpzS5eeTl1ob8kfhSPjJnO44t19Pvn.png", "type": "APM Group", "payment_type": "APM Group", "supported_currencies": [ "USD", "EUR" ], "regions": [], "dynamic_currency_supported": 0 }, { "id": "e85c40be-84cc-11f0-9736-fc54af722c86", "name": "New Group", "logo": "https://Paymid-staging.s3.amazonaws.com/solution-groups/images/OrUIVRKdsOSz2wi7Rjd48HGZ2VFjQ2Nz8YkjoA9G.png", "type": "APM Group", "payment_type": "APM Group", "supported_currencies": [ "USD", "EUR" ], "regions": [], "dynamic_currency_supported": 0 } ] } ``` -------------------------------- ### Get Active Payment Solutions API Response Example Source: https://developer-hub.paymid.com/index This JSON response lists the available payment solutions for a merchant. Each solution object includes its ID, name, logo URL, supported currencies, regions, and a flag for dynamic currency support. The 'id' can be used in subsequent payment requests. ```json { "success": true, "message": "Success", "data": [ { "id": "bf8ec435-d6ae-4ad3-83fe-61cf30b0dd6b", "name": "ChargeMoney", "logo": "https://Paymid-staging.s3.amazonaws.com/solution/logo/Dchzw7xvWGyWi00abohJg9l60p2pdfTYAh5UuaUk.png", "supported_currencies": [ "USD", "EUR" ], "regions": [], "dynamic_currency_supported": 1 }, { "id": "485093e0-2ed6-466a-8573-7ee659db40c5", "name": "Trust Payments", "logo": "https://Paymid-staging.s3.amazonaws.com/solution/logo/08NXhGpSzOIq7kaTSz1m2s3fuQ27zaBYltnb9dqh.png", "supported_currencies": [ "USD", "EUR" ], "regions": [ "Africa" ], "dynamic_currency_supported": 0 }, { "id": "5fb4b50a-9c9f-4acf-bd61-686ae557c118", "name": "Ecommpay", "logo": "https://Paymid-staging.s3.amazonaws.com/solution/logo/nZQxdt4D3tZzSvFSpuye19LMlvyLcpSikmvjTr5E.jpg", "supported_currencies": [ "USD", "EUR" ], "regions": [], "dynamic_currency_supported": 1 }, { "id": null, "name": "Skrill", "logo": "https://Paymid-staging.s3.amazonaws.com/solution/logo/645c0d1281aab271.png", "supported_currencies": [], "regions": [], "dynamic_currency_supported": 1 }, { "id": "436f06e1-57ee-478d-bc9e-337ca4f2337f", "name": "Paysafe Skrill", "logo": "https://Paymid-staging.s3.amazonaws.com/solution/logo/Ldpu3SX22Ua4lbHlb6ywynBwTIvzvnmdv2f2v6PO.jpg", "supported_currencies": [ "USD", "EUR" ], "regions": [], "dynamic_currency_supported": 1 } ] } ``` -------------------------------- ### JSON Response Example for Get Country List Source: https://developer-hub.paymid.com/index Provides an example of the JSON response when requesting a list of countries. The data field contains an array of country objects, each with details like ID, name, and codes. ```json { "success" : true, "message" : "Country list", "data" :[ { "id": 213, "name": "Sweden", "emoji": "🇸🇪", "flag": null, "maps": [ { "country": "", "solution": "", "solution_id": "" } ], "name_alpha_2": "SE", "name_alpha_3": "SWE", "numeric_code": "752" } ] } ``` -------------------------------- ### Payment Request with Solution ID Body Example (JSON) Source: https://developer-hub.paymid.com/index This JSON object details the payload required for initiating a payment request using a specific solution ID. It includes customer information, transaction details, and the unique identifier for the solution. ```json { "firstName": "John", "middleName": "", "lastName": "Doe", "reference": "DuqXNBv0Q-sk-16", "email": "john@example.com", "dob": "1990-01-01", "contactNumber": "+12345678", "address": "SE", "country": "Sweden", "zipCode": "1212", "currency": "USD", "amount": "10.0", "ttl": 5, "tagName": "VIP Tag", "webhookUrl": "{{webhookUrl}}", "merchantAccountId": "{{your_account_no}}", "solutionUniqueId": [ "485093e0-2ed6-466a-8573-7ee659db40c5" ] } ``` -------------------------------- ### JSON Response Example for Payment Request Source: https://developer-hub.paymid.com/index Illustrates a typical JSON response received after a successful payment request, containing a success status, a message, and a data object with a payment URL and reference. ```json { "success" : true, "message" : "Payment Request Accepted", "data" : { "payment_url" : "https://staging.Paymid.com/secure-payment/2bfec39f-55dc-4f48-976b-9d37b1675007" "reference" : "DuqXNBv0Q-sk-151s2" } } ``` -------------------------------- ### Get Country List Source: https://developer-hub.paymid.com/index Retrieves a list of supported countries. ```APIDOC ## GET /api/v1/country-list ### Description Retrieves a list of all supported countries available for transactions. ### Method GET ### Endpoint /api/v1/country-list?merchantAccountId={{your_account_no}} ### Authorization Basic Auth (Username: App Key, Password: Secret Key) ### Query Parameters - **merchantAccountId** (string) - Required - Your account number. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the country list was retrieved successfully. - **message** (string) - A message indicating the result. - **data** (array) - An array of country objects. - **id** (integer) - The unique identifier for the country. - **name** (string) - The name of the country. - **emoji** (string) - The emoji representation of the country flag. - **flag** (string/null) - URL to the country flag image (can be null). - **maps** (array) - Information related to mapping solutions. - **country** (string) - **solution** (string) - **solution_id** (string) - **name_alpha_2** (string) - The ISO 3166-1 alpha-2 country code. - **name_alpha_3** (string) - The ISO 3166-1 alpha-3 country code. - **numeric_code** (string) - The ISO 3166-1 numeric code. #### Response Example ```json { "success" : True, "message" : "Country list", "data" :[ { "id": 213, "name": "Sweden", "emoji": "🇸🇪", "flag": null, "maps": [ { "country": "", "solution": "", "solution_id": "" } ], "name_alpha_2": "SE", "name_alpha_3": "SWE", "numeric_code": "752" }, ] } ``` ``` -------------------------------- ### JSON Response Example for AFT Payment Request Source: https://developer-hub.paymid.com/index Shows a sample JSON response after a successful Account Funding Transaction (AFT) payment request. It includes a success status, message, and data containing the payment URL, reference, and session ID. ```json { "success": true, "message": "Payment Request Accepted", "data": { "payment_url": "https://sgw.Paymid.com/secure-checkout/d02da6a7-c62e-4a13-b46a-35877fdb2597", "reference": "XYOCJXEBF517", "session_id": "d02da6a7-c62e-4a13-b46a-35877fdb2597" } } ``` -------------------------------- ### Payment Request Response Example (JSON) Source: https://developer-hub.paymid.com/index This JSON response indicates a successful payment request acceptance. It contains a success status, a confirmation message, and a data object with a payment URL that redirects the customer to the checkout page. ```json { "success" : true, "message" : "Payment Request Accepted", "data" : { "payment_url" : "https://staging.Paymid.com/secure-payment/2bfec39f-55dc-4f48-976b-9d37b1675007" } } ``` -------------------------------- ### Get Available Payment Solutions Source: https://developer-hub.paymid.com/index Retrieves a list of active payment solutions available for a given merchant account. This endpoint is useful for understanding the payment methods you can offer to your customers. ```APIDOC ## GET /api/v1/merchant/active/solutions ### Description Retrieves a list of active payment solutions available for a given merchant account. This endpoint is useful for understanding the payment methods you can offer to your customers. ### Method GET ### Endpoint /api/v1/merchant/active/solutions ### Parameters #### Query Parameters - **merchantAccountId** (string) - Required - Your unique merchant account identifier. - **includeGroups** (integer) - Optional - Set to 1 to include group information (default: 0). - **isDepositEnabled** (integer) - Optional - Filter for solutions that support deposits (default: 1). - **isPayoutEnabled** (integer) - Optional - Filter for solutions that support payouts (default: 1). ### Request Example ``` GET https://{{BASE_URL}}/api/v1/merchant/active/solutions?merchantAccountId={{your_account_no}}&includeGroups=0&isDepositEnabled=1&isPayoutEnabled=1 ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **message** (string) - A message describing the outcome of the request. - **data** (array) - A list of payment solution objects. - **id** (string) - The unique identifier for the payment solution. - **name** (string) - The name of the payment solution. - **logo** (string) - The URL of the solution's logo. - **supported_currencies** (array) - A list of currency codes supported by the solution. - **regions** (array) - A list of regions where the solution is available. - **dynamic_currency_supported** (integer) - Indicates if dynamic currency is supported (1 for yes, 0 for no). #### Response Example ```json { "success": true, "message": "Success", "data": [ { "id": "bf8ec435-d6ae-4ad3-83fe-61cf30b0dd6b", "name": "ChargeMoney", "logo": "https://Paymid-staging.s3.amazonaws.com/solution/logo/Dchzw7xvWGyWi00abohJg9l60p2pdfTYAh5UuaUk.png", "supported_currencies": [ "USD", "EUR" ], "regions": [], "dynamic_currency_supported": 1 } ] } ``` ``` -------------------------------- ### Get Active Payment Solutions API Request Parameters Source: https://developer-hub.paymid.com/index This section details the parameters for the 'Get Available Payment Solutions' API endpoint. It requires the merchantAccountId and supports optional parameters to filter the results, such as including groups or specifying if deposits or payouts are enabled. Authorization is handled via Basic Auth using an App Key and Secret Key. ```json { "merchantAccountId" : "{{your_account_no}}", "includeGroups" : 0, // default 0 or can be 1 "isDepositEnabled" : 1, // default 1 or can be 0 "isPayoutEnabled" : 1 // default 1 or can be 0 } ``` -------------------------------- ### Payment Request with Solution Group UUID Body Example (JSON) Source: https://developer-hub.paymid.com/index This JSON object outlines the structure for a payment request utilizing a solution group UUID. It includes customer and payment details, along with the identifier for the solution group to process the payment. ```json { "firstName": "John", "middleName": "", "lastName": "Doe", "reference": "DuqXNBv0Q-sk-16", "email": "john@example.com", "dob": "1990-01-01", "contactNumber": "+12345678", "address": "SE", "country": "Sweden", "zipCode": "1212", "currency": "USD", "amount": "10.0", "ttl": 5, "tagName": "VIP Tag", "webhookUrl": "{{webhookUrl}}", "merchantAccountId": "{{your_account_no}}", "solutionGroupUuid": "485093e0-2ed6-466a-8573-7ee659db40c5" } ``` -------------------------------- ### Get Solution List by Merchant Account ID Source: https://developer-hub.paymid.com/index Retrieves a list of active solutions available for a merchant based on their account ID and payout type. ```APIDOC ## GET /api/v1/merchant/active/solutions ### Description Fetches a list of active payment solutions associated with a specific merchant account. This is useful for determining available payment methods and currencies. ### Method GET ### Endpoint /api/v1/merchant/active/solutions ### Authorization - Type: Basic Auth - Username: App Key - Password: Secret Key ### Parameters #### Query Parameters - **merchantAccountId** (string) - Required - The unique identifier for the merchant's account. - **payout_type** (string) - Required - The type of payout to filter solutions by (e.g., 'bankPayout', 'cardPayout'). ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **message** (string) - A message describing the result of the request. - **data** (array) - An array of active solution objects. - **id** (string) - The unique identifier for the solution. This ID is often required for other API requests. - **name** (string) - The display name of the solution provider. - **logo** (string) - A URL to the logo of the solution provider. - **supported_currencies** (array) - A list of currency codes (ISO 4217) supported by this solution. - **regions** (array) - A list of geographical regions where this solution is available. - **dynamic_currency_supported** (integer) - Indicates if dynamic currency conversion is supported (1 for yes, 0 for no). #### Response Example ```json { "success": true, "message": "Success", "data": [ { "id": "269b8d4a-151e-4f17-b3f0-050277618ac2", "name": "Trust Payments", "logo": "https://Paymid-staging.s3.amazonaws.com/solution/logo/63d134c84edb5490.jpg", "supported_currencies": [ "USD", "EURO" ], "regions": [ "Africa" ], "dynamic_currency_supported": 1 } ] } ``` ``` -------------------------------- ### Get Subscription List (API Call) Source: https://developer-hub.paymid.com/index Retrieves a list of subscriptions for a given merchant account. Supports pagination and filtering by status (active, inactive, cancelled). Requires Basic Authentication. ```http GET {{base_url}}/api/v1/subscriptions/get-list?merchantAccountId={{your_account_no}}&page=1&status=active ``` -------------------------------- ### Paymid API Response Example (JSON) Source: https://developer-hub.paymid.com/index This snippet illustrates a typical success response from the Paymid API. It indicates the status of the transaction, providing a success flag and a message. The 'data' field may contain additional information depending on the transaction type. ```json { "success": true, "message": "success", "data": [] } ``` -------------------------------- ### JSON Response Example for Get State List by Country ID Source: https://developer-hub.paymid.com/index Illustrates the JSON response for retrieving a list of states within a specific country. The data field contains an array of state objects, each with an ID, name, and country code. ```json { "success" : true, "message" : "State list", "data" :[ { "id": 1533, "name": "Gävleborg County", "country_code": "SE", "iso2": "X" } ] } ``` -------------------------------- ### API Configuration Source: https://developer-hub.paymid.com/index Information on configuring API access, including Basic Authentication and setting up IPN/Webhook URLs for notifications. ```APIDOC ## API Configuration ### Description This section details how to configure your Paymid API integration, including authentication methods and webhook settings. ### Basic Authentication To authenticate your API requests, use Basic Auth. Your username should be your "App Key" and your password should be your "Secret Key", both of which can be found in the "Api Config" menu within your Paymid account. ### IPN & Webhook Setting - **IPN Url**: This URL is used to receive real-time notifications from Paymid about transaction events, such as completion or failure. You can configure a default IPN URL in the "Settings -> API Config" section of your Paymid account. It's also possible to override this URL on a per-payment basis by including the `webhookUrl` parameter in the payment request payload. - **Webhook Url**: This is specifically for receiving transaction update notifications. Similar to the IPN URL, it can be set in the "Settings -> API Config" or provided within the payment request payload. #### Webhook Notification Example ```json { "type": "sale", // Other types include "refund", "payout" "amount": "24.00", "status": "success", // Can be "success" or "failed" "reference": "O4j2V5thWT", "transaction_id": "56-9-3485176", "created_at": "2024-01-19T10:49:27.000000Z", "payment_method": "Card (VISA)", "processor_name": "Trust Payments", "currency": "USD" } ``` ### Verify Webhook with Signature To ensure the security and integrity of the data received via webhooks, Paymid includes a digital signature in the request header. You must verify this signature using your "Secret Key" before processing any webhook data to confirm its authenticity. ``` -------------------------------- ### Get Card Token Source: https://developer-hub.paymid.com/index Retrieves stored card tokens associated with a customer. This GET request requires Basic Authentication. Parameters include merchantAccountId, customerReferenceId, and customer email address. ```json { "success": true, "message": "success", "data": [ { "card_token": "b1fbc631-8089-4000-806c-4984adacb3b3", "card_number": "411111XXXXXX1111", "expiry_date": "*******", "card_type": "VISA", "card_name": "JO****OE", "customer": { "customer_reference_id": "8160a328-4906-4835-9071-599702e96f33", "first_name": "John", "middle_name": null, "last_name": "Doe", "email": "john@example.com" }, "solution": { "alias_name": "Trust Payments" } } ] } ``` -------------------------------- ### Get Health Report (GET) Source: https://developer-hub.paymid.com/index Retrieves the health status of the payin and payout systems. Requires merchant account ID. Returns a JSON object indicating the success of the health check and the status of each system. ```json { "success": true, "message": "Health Check Success", "data": { "payin": "healthy", "payout": "healthy" } } ``` -------------------------------- ### Get Customer Histories (GET) Source: https://developer-hub.paymid.com/index Retrieves the payment history for a specific customer associated with a merchant account. Supports pagination and filtering by customer email. Requires merchant account ID and optionally customer email, per page, and page number. ```json { "merchantAccountId" : "{{your_account_no}}", "customerEmail" : "", "perPage" : 20, "page" : 1 } ``` -------------------------------- ### POST Payout Request with Customer Token Response Example Source: https://developer-hub.paymid.com/index This JSON response confirms the successful creation of a payout request using a customer token. It includes a success status, a confirmation message, and a data object containing the payout URL and the reference ID. The payout URL directs to the secure payment interface. ```json { "success": true, "message": "Payout request created successfully", "data": { "payout_url": "https://sgw.Paymid.com/secure-payout/24fbae5b-3ad0-4702-bd4a-c31f5a0db233", "reference": "ref-5015" } } ``` -------------------------------- ### Create Payment Request Source: https://developer-hub.paymid.com/index Initiates a payment request using a previously created customer token, returning a secure payment URL for the user to complete the payment. ```APIDOC ## POST /api/v1/payment/request ### Description This endpoint initiates a payment request using a customer token obtained from the 'Add Customer' step. It returns a secure payment URL that the user can access to complete the payment. ### Method POST ### Endpoint /api/v1/payment/request ### Parameters #### Request Body - **customerToken** (string) - Required - The token of the customer obtained from the 'Add Customer' endpoint. - **reference** (string) - Required - A unique reference for the payment. - **merchantAccountId** (string) - Required - The ID of the merchant's account. - **currency** (string) - Required - The currency for the payment (e.g., "USD"). - **amount** (string) - Required - The amount to be paid. - **webhookUrl** (string) - Required - The URL to receive webhook notifications about the payment status. ### Request Example ```json { "customerToken": "56f74d8274c1cb387e1ad24895905c18", "reference": "1XYOCJXEBFQ9", "merchantAccountId": "{{your_account_no}}", "currency": "USD", "amount": "50", "webhookUrl": "https://webhook.site/b4d48b6d-f965-4bf8-b1bd-180248c6922e" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **message** (string) - A message describing the result of the operation. - **data** (object) - Contains payment details. - **payment_url** (string) - The secure URL for the user to complete the payment. - **reference** (string) - The reference ID for the payment. - **session_id** (string) - The session ID for the payment. #### Response Example ```json { "success": true, "message": "Payment Request Accepted", "data": { "payment_url": "https://sgw.Paymid.com/secure-checkout/ef65e8ff-4768-4fc5-bd34-c549d9414222", "reference": "1XYOCJXEBFQ9", "session_id": "ef65e8ff-4768-4fc5-bd34-c549d9414222" } } ``` ``` -------------------------------- ### Get Active Payment Solution Groups API Request Parameters Source: https://developer-hub.paymid.com/index This section outlines the parameters for the 'Get Active Payment Solution Groups' API endpoint. It requires the merchantAccountId for identification. Authorization is handled via Basic Auth using an App Key and Secret Key. ```json { "merchantAccountId" : "{{your_account_no}}" } ``` -------------------------------- ### POST Payout Request Response Example Source: https://developer-hub.paymid.com/index This JSON response indicates a successful payout request creation. It provides a success status, a confirmation message, and a data object containing the payout URL and the reference ID for the request. This URL is used to proceed with the secure payout process. ```json { "success": true, "message": "Payout request created successfully", "data": { "payout_url": "https://sgw.Paymid.com/secure-payout/c32b46f8-d9b1-482f-b596-4c3a4f227426", "reference": "ref-5001" } } ``` -------------------------------- ### GET /api/v1/health-report Source: https://developer-hub.paymid.com/index Retrieves the health status of the Paymid system for both payin and payout services. ```APIDOC ## GET /api/v1/health-report ### Description Retrieves the health status of the Paymid system for both payin and payout services. This endpoint is useful for monitoring the availability and operational status of the payment gateway. ### Method GET ### Endpoint {{BASE_URL}}/api/v1/health-report?merchantAccountId={{your_account_no}} ### Parameters #### Query Parameters - **merchantAccountId** (string) - Required - The unique identifier for the merchant account. ### Authorization Basic Auth - **Username**: App Key - **Password**: Secret Key ### Response #### Success Response (200) - **success** (boolean) - Indicates if the health check was successful. - **message** (string) - A message describing the health check status. - **data** (object) - Contains the health status of payin and payout services. - **payin** (string) - Health status of the payin service (e.g., 'healthy', 'partially-healthy', 'unhealthy', 'maintenance'). - **payout** (string) - Health status of the payout service (e.g., 'healthy', 'partially-healthy', 'unhealthy', 'maintenance'). #### Response Example ```json { "success": true, "message": "Health Check Success", "data": { "payin": "healthy", "payout": "healthy" } } ``` ``` -------------------------------- ### Get Cities List by State ID Source: https://developer-hub.paymid.com/index Retrieves a list of cities for a specified state. ```APIDOC ## GET /api/v1/cities-by-state/{state_id} ### Description Retrieves a list of cities for a given state ID. ### Method GET ### Endpoint /api/v1/cities-by-state/{{state_id}} ### Authorization Basic Auth (Username: App Key, Password: Secret Key) ### Path Parameters - **state_id** (integer) - Required - The ID of the state for which to retrieve cities. ### Query Parameters - **merchantAccountId** (string) - Required - Your account number. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the city list was retrieved successfully. - **message** (string) - A message indicating the result. - **data** (array) - An array of city objects. - **id** (integer) - The unique identifier for the city. - **name** (string) - The name of the city. - **state_code** (string) - The ISO code of the state. #### Response Example ```json { "success" : True, "message" : "City list", "data" : [ { "id": 12345, "name": "Jämshög", "state_code": "Blekinge" } ] } ``` ``` -------------------------------- ### Get Solution List Response JSON Source: https://developer-hub.paymid.com/index This JSON output details the active solutions available for a given merchant account ID and payout type. It includes the solution's ID, name, logo, supported currencies, regions, and dynamic currency support status. The 'id' field is crucial for other API requests. ```json { "success": true, "message": "Success", "data": [ { "id": "269b8d4a-151e-4f17-b3f0-050277618ac2", // this Solution ID is required in other requests "name": "Trust Payments", "logo": "https://Paymid-staging.s3.amazonaws.com/solution/logo/63d134c84edb5490.jpg", "supported_currencies": [ "USD", "EURO" ], "regions": [ "Africa" ], "dynamic_currency_supported": 1 } ] } ``` -------------------------------- ### JSON Response Example for Customer Histories Source: https://developer-hub.paymid.com/index This JSON object represents a successful retrieval of customer histories. It includes success status, a message, an array of transaction data, pagination details, and a summary of the retrieved data. The data array contains details for each customer history entry. ```json { "success": true, "message": "Customer histories retrieved successfully", "data": [ { "reference_id": "B01E9POMTO", "amount": 40, "fee": 0, "currency_code": "USD", "transaction_status": "Accepted", "customer_email": "test@example.com", "customer_first_name": "Test", "customer_last_name": "Test", "customer_ip": null, "kyc_status": false, "created_at": "2025-12-03 08:26:14" }, ... ... { "reference_id": "CXVl45MUhl", "amount": 25, "fee": 0, "currency_code": "USD", "transaction_status": "Accepted", "customer_email": "test@example.com", "customer_first_name": "John", "customer_last_name": "Doe", "customer_ip": null, "kyc_status": false, "created_at": "2025-08-26 10:10:31" } ], "pagination": { "current_page": 1, "last_page": 4, "per_page": 20, "total": 71, "from": 1, "to": 20 }, "summary": { "total_success_count": 48, "total_success_volume": 3794, "kyc_availability": { "kyc_verified_count": 0, "kyc_not_verified_count": 71, "kyc_availability": false } } } ``` -------------------------------- ### Get State List by Country ID Source: https://developer-hub.paymid.com/index Retrieves a list of states for a specified country. ```APIDOC ## GET /api/v1/states-by-country/{country_id} ### Description Retrieves a list of states or provinces for a given country ID. ### Method GET ### Endpoint /api/v1/states-by-country/{{country_id}}?merchantAccountId={{your_account_no}} ### Authorization Basic Auth (Username: App Key, Password: Secret Key) ### Path Parameters - **country_id** (integer) - Required - The ID of the country for which to retrieve states. ### Query Parameters - **merchantAccountId** (string) - Required - Your account number. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the state list was retrieved successfully. - **message** (string) - A message indicating the result. - **data** (array) - An array of state objects. - **id** (integer) - The unique identifier for the state. - **name** (string) - The name of the state or province. - **country_code** (string) - The ISO 3166-1 alpha-2 code of the country. - **iso2** (string) - An alternative ISO code for the state. #### Response Example ```json { "success" : True, "message" : "State list", "data" :[ { "id": 1533, "name": "Gävleborg County", "country_code": "SE", "iso2": "X" }, ] } ``` ``` -------------------------------- ### Initiate Payment Request Source: https://developer-hub.paymid.com/index Initiates a payment request with detailed customer and transaction information. This endpoint is used to create a payment session for a customer. ```APIDOC ## POST /api/v1/payment-request ### Description Initiates a payment request with detailed customer and transaction information. This endpoint is used to create a payment session for a customer. ### Method POST ### Endpoint /api/v1/payment-request ### Parameters #### Request Body - **firstName** (string) - Required - The first name of the customer. - **middleName** (string) - Optional - The middle name of the customer. - **lastName** (string) - Required - The last name of the customer. - **reference** (string) - Required - A unique reference for the transaction (10+ characters, special characters not allowed). - **dob** (string) - Required - Date of birth in YYYY-MM-DD format. - **email** (string) - Required - The customer's email address. - **contactNumber** (string) - Required - The customer's contact number. - **address** (string) - Required - The customer's address. - **country** (string) - Required - The customer's country. - **state** (string) - Required - The customer's state or province (use "N/A" if not applicable). - **city** (string) - Required - The customer's city. - **zipCode** (integer) - Required - The customer's zip or postal code. - **currency** (string) - Required - The ISO 4217 currency code for the transaction. - **depositCurrency** (string) - Optional - The ISO 4217 currency code for the deposit. - **amount** (number) - Required - The transaction amount. - **ttl** (integer) - Optional - Time to live for the payment request in minutes (default: 15). - **tagName** (string) - Optional - A tag for the transaction. - **merchantAccountId** (string) - Required - The merchant account ID. - **webhookUrl** (string) - Optional - A URL to receive webhook notifications (overwrites config if set). ### Request Example ```json { "firstName": "John", "middleName": "", "lastName": "Doe", "reference": "Test123456", "dob": "2023-07-20", "email": "john@example.com", "contactNumber": "+889943432", "address": "Sweden", "country": "Sweden", "state": "Blekinge", "city": "Jämshög", "zipCode": 11115, "currency": "USD", "depositCurrency": "GBP", "amount": 110, "ttl": 5, "tagName": "macbook pro m2", "merchantAccountId": "100001", "webhookUrl": "https://example.webhook" } ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **message** (string) - A message describing the outcome of the request. - **data** (object) - Contains details about the payment request. - **payment_url** (string) - The URL for the customer to complete the payment. #### Response Example ```json { "success": true, "message": "Payment Request Accepted", "data": { "payment_url": "https://staging.Paymid.com/secure-payment/2bfec39f-55dc-4f48-976b-9d37b1675007" } } ``` ``` -------------------------------- ### GET /api/v1/customer/histories Source: https://developer-hub.paymid.com/index Retrieves the payment or transaction history for a specific customer associated with a merchant account. ```APIDOC ## Get Customer Histories by Merchant Account ID ### Description Retrieves the payment or transaction history for a specific customer associated with a merchant account. You can filter by customer email and paginate the results. ### Method GET ### Endpoint {{base_url}}/api/v1/customer/histories?merchantAccountId={{your_account_no}}&customerEmail=&perPage=20&page=1 ### Parameters #### Query Parameters - **merchantAccountId** (string) - Required - The unique identifier for the merchant account. - **customerEmail** (string) - Optional - The email address of the customer to filter histories for. If empty, may return histories for all customers under the merchant account or an error depending on implementation. - **perPage** (integer) - Optional - The number of records to return per page. Defaults to 20. - **page** (integer) - Optional - The page number of the results to retrieve. Defaults to 1. ### Authorization Basic Auth - **Username**: App Key - **Password**: Secret Key ### Response *Note: The specific structure of the response data for customer histories is not detailed in the provided text. Assuming a typical list of transaction objects.* #### Success Response (200) - **success** (boolean) - Indicates if the histories were retrieved successfully. - **message** (string) - A message describing the result. - **data** (array) - A list of transaction objects, each containing details about a past transaction. #### Response Example *Example response structure is illustrative as not provided in the source text.* ```json { "success": true, "message": "Customer histories retrieved successfully.", "data": [ { "transactionId": "txn_12345", "date": "2023-10-27T10:00:00Z", "amount": "50.00", "currency": "USD", "status": "completed" }, { "transactionId": "txn_67890", "date": "2023-10-26T15:30:00Z", "amount": "25.00", "currency": "USD", "status": "failed" } ] } ``` ```