### Get Consumer Details 200 Response Source: https://github.com/easycardng/api/blob/main/MetadataApi.md Example of a successful response when retrieving consumer details. This includes all information associated with the specified consumer. ```json { "consumerID": "9e541e9d-045d-45e2-8cf0-ead10a4f23cf", "merchantID": "c30c8496-c2db-425f-8614-0e5f16767e31", "active": true, "updateTimestamp": "string", "consumerEmail": "string", "consumerName": "string", "consumerPhone": "string", "consumerAddress": { "countryCode": "string", "city": "string", "zip": "string", "street": "string", "house": "string", "apartment": "string" }, "consumerNationalID": "string", "created": "2019-08-24T14:15:22Z", "operationDoneBy": "string", "correlationId": "string", "externalReference": "string", "origin": "string", "billingDesktopRefNumber": "string", "consumerSecondPhone": "string", "consumerNote": "string", "bankDetails": { "bank": 0, "bankBranch": 0, "bankAccount": "string", "paymentType": "card", "amount": 0 }, "woocommerceID": "string", "ecwidID": "string" } ``` -------------------------------- ### Get Access Token using Node.js Source: https://github.com/easycardng/api/blob/main/Authorization.md This Node.js example uses the 'axios' library to fetch an access token. It requires the 'qs' library for query string formatting. SSL certificate verification is disabled for testing; use with caution in production. ```Node.js const axios = require('axios'); const qs = require('qs'); async function getToken() { try { const url = 'https://identity.e-c.co.il/connect/token'; const data = { client_id: 'terminal', grant_type: 'terminal_rest_api', authorizationKey: 'YOUR_TERMINAL_PRIVATE_KEY' }; const response = await axios.post(url, qs.stringify(data), { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, // For testing only: ignore SSL certificate (use with caution!) httpsAgent: new (require('https').Agent)({ rejectUnauthorized: false }) }); return response.data.access_token; } catch (error) { console.error('Error fetching token:', error.response?.data || error.message); return false; } } // Example usage getToken().then(token => { if (token) { ``` -------------------------------- ### Get Access Token using C# Source: https://github.com/easycardng/api/blob/main/Authorization.md This C# code demonstrates how to obtain an access token using HttpClient. Replace 'YOUR_TERMINAL_PRIVATE_KEY' with your key. The example includes disabling SSL certificate validation for testing purposes. ```C# using System; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; public class TokenResponse { [JsonProperty("access_token")] public string AccessToken { get; set; } } public class Program { static async Task GetTokenAsync() { var url = "https://identity.e-c.co.il/connect/token"; // Data to send in the request var data = new { client_id = "terminal", grant_type = "terminal_rest_api", authorizationKey = "YOUR_TERMINAL_PRIVATE_KEY" }; using (var httpClient = new HttpClient()) { // For testing purposes; in production, remove this line ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; var jsonData = JsonConvert.SerializeObject(data); var content = new StringContent(jsonData, Encoding.UTF8, "application/x-www-form-urlencoded"); // Sending POST request var response = await httpClient.PostAsync(url, content); var responseString = await response.Content.ReadAsStringAsync(); if (response.IsSuccessStatusCode) { var tokenResponse = JsonConvert.DeserializeObject(responseString); return tokenResponse?.AccessToken; } else { // Handle error or return null return null; } } } static async Task Main(string[] args) { var token = await GetTokenAsync(); Console.WriteLine($"Access Token: {token}"); } } ``` -------------------------------- ### Implement J5 Deal Response Example (Error) Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md This JSON shows an example error response for the 'Implement J5 Deal' endpoint, similar to the blocking funds error, indicating potential issues with transaction amounts or data formatting. ```json { "message": "Validation Errors", "status": "error", "correlationId": "64908061-eac8-4ed0-aed6-cd6af268ae47", "errors": [ { "code": "paymentRequestAmount", "description": "Could not convert string to decimal: 1200$. Path 'paymentRequestAmount', line 10, position 33." } ] } ``` -------------------------------- ### Get Consumers List Response Example Source: https://github.com/easycardng/api/blob/main/MetadataApi.md This JSON structure represents a successful response when retrieving a list of consumers. It includes the total number of records and an array of consumer summary objects. ```json { "numberOfRecords": 0, "data": [ { "consumerID": "9e541e9d-045d-45e2-8cf0-ead10a4f23cf", "terminalID": "57d5dd68-4280-44f6-a8f7-547180e3a1d6", "consumerEmail": "string", "consumerName": "string", "consumerPhone": "string", "consumerNationalID": "string", "consumerAddress": { "countryCode": "string", "city": "string", "zip": "string", "street": "string", "house": "string", "apartment": "string" }, "externalReference": "string", "woocommerceID": "string", "ecwidID": "string", "active": true, "hasBankAccount": true, "hasCreditCard": true } ] } ``` -------------------------------- ### Get Access Token using cURL Source: https://github.com/easycardng/api/blob/main/Readme.md Use this PHP cURL example to obtain an access token from the Identity Server. Ensure you replace '{{TerminalApiKey}}' with your actual terminal API key. ```php ``` -------------------------------- ### QuickDateFilterTypeEnum Example Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md Defines predefined date ranges for filtering. 'today' is a common filter. ```json "today" ``` -------------------------------- ### QuickStatusFilterTypeEnum Example Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md Specifies available status filters for transactions. 'Pending' indicates an ongoing transaction. ```json "Pending" ``` -------------------------------- ### BillingSchedule JSON Example Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md Represents the schedule for billing, including repeat period, start, and end times. Used for recurring payments. ```json { "repeatPeriodType": "oneTime", "startAtType": "today", "startAt": "2019-08-24T14:15:22Z", "endAtType": "never", "endAt": "2019-08-24T14:15:22Z", "endAtNumberOfPayments": 0 } ``` -------------------------------- ### Sample Checkout Page Query String Source: https://github.com/easycardng/api/blob/main/ClassicCheckoutPage.md This is a sample query string demonstrating how to initiate a payment through the EasyCard Checkout Page. Ensure all required parameters like Description, Name, Currency, Amount, and ApiKey are correctly provided. ```url https://checkout.e-c.co.il/?Description=Goods%20and%20services%20from%20Test%20Web%20Store%3A%20My%20Product&Name=John%20Smith&Email=testemail@gmail.com&Currency=ILS&Amount=99.99&RedirectUrl=https%3A%2F%2Fecng-testwebstore.azurewebsites.net%3A443%2FPaymentResult%3FInternalOrderID%3D123456&ApiKey=XXXXXXXX&IssueInvoice=True&AllowPinPad=False&UserAmount=False ``` -------------------------------- ### Get Payment Transaction Details Response Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md Example JSON response for a successful retrieval of payment transaction details. This schema outlines the structure and fields returned. ```json { "paymentTransactionID": "bf54f8bc-b997-4345-b37b-8eb3328651d0", "transactionDate": "2022-10-07T00:00:00", "transactionTimestamp": "2022-10-07T15:08:18.7523005Z", "status": "awaitingForTransmission", "paymentTypeEnum": "card", "quickStatus": 0, "transactionType": "installments", "specialTransactionType": "regularDeal", "jDealType": "J4", "currency": "USD", "cardPresence": "cardNotPresent", "numberOfPayments": 6, "transactionAmount": 1200, "amount": 0, "initialPaymentAmount": 200, "totalAmount": 1200, "installmentPaymentAmount": 200, "creditCardDetails": { "cardNumber": "123456****1234", "cardExpiration": "12/22", "cardBrand": "VISA", "cardOwnerName": "John Smith", "cardOwnerNationalID": "1234567" }, "dealDetails": { "dealReference": "123456", "dealDescription": "some product pack: 3kg.", "consumerEmail": "email@example.com", "consumerPhone": "555-765", "consumerID": "fc5056e5-6b9b-429c-988d-74072e12189d" }, "shvaTransactionDetails": { "shvaShovarNumber": "123456", "shvaDealID": "12345678901234567890" }, "vatRate": 0.17, "vatTotal": 174.36, "netTotal": 1025.64, "correlationId": "5347f8d2-4357-4623-a92d-11fb848832c4", "invoiceID": "7508f660-1341-45a8-92aa-e836c36f722b", "issueInvoice": true, "documentOrigin": "checkout", "paymentRequestID": "98f7eba5-9ab0-4023-81f1-cbecb45a3d4f", "extension": { "customPropertyInMySystem": "MyCustomValue" }, "allowTransmission": false, "allowTransmissionCancellation": true, "allowRefund": false, "allowInvoiceCreation": false } ``` -------------------------------- ### Create Recurring Billing Deal Source: https://context7.com/easycardng/api/llms.txt Set up automated recurring charges using a stored credit card token. Requires a valid credit card token and billing schedule details. ```bash curl -X POST "https://api.e-c.co.il/api/billing" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "terminalID": "57d5dd68-4280-44f6-a8f7-547180e3a1d6", "currency": "ILS", "creditCardToken": "8000dee3-fd2b-4f6f-9c2f-678fb99e8ae4", "transactionAmount": 99, "billingSchedule": { "repeatPeriodType": "monthly", "startAtType": "today", "endAtType": "afterNumberOfPayments", "endAtNumberOfPayments": 12 }, "issueInvoice": true, "dealDetails": { "dealReference": "SUB-12345", "dealDescription": "Monthly subscription", "consumerEmail": "customer@example.com", "consumerName": "John Smith", "consumerID": "9e541e9d-045d-45e2-8cf0-ead10a4f23cf" } }' ``` -------------------------------- ### Example Response for Get Payment Transactions Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md This JSON structure represents a successful response when retrieving a list of payment transactions. It includes total amounts, record counts, and detailed transaction data. ```json { "totalAmountILS": 0, "totalAmountUSD": 0, "totalAmountEUR": 0, "numberOfRecords": 0, "data": [ { "paymentTransactionID": "19fb5b03-41a8-4687-a896-97851484218b", "terminalName": "string", "terminalID": "57d5dd68-4280-44f6-a8f7-547180e3a1d6", "documentOrigin": "UI", "cardNumber": "string", "rejectionMessage": "string", "processorResultCode": 0, "transactionAmount": 0, "initialPaymentAmount": 0, "installmentPaymentAmount": 0, "transactionType": "regularDeal", "currency": "ILS", "transactionTimestamp": "2019-08-24T14:15:22Z", "status": "initial", "paymentTypeEnum": "card", "quickStatus": "Pending", "specialTransactionType": "regularDeal", "jDealType": "J4", "rejectionReason": "unknown", "cardPresence": "cardNotPresent", "cardOwnerName": "string", "consumerExternalReference": "string", "shvaDealID": "string", "invoiceID": "4f03a727-9c4b-43a5-b699-271a3e6fdc9c", "dealDescription": "string" } ] } ``` -------------------------------- ### Create Consumer Source: https://github.com/easycardng/api/blob/main/BillingCustomer.md Use this endpoint to create a new consumer in the system. Ensure all required fields, including terminal ID and consumer details, are provided. ```json { "terminalID": "0b03e7af-4bde-4dc1-a89c-ad86007e7562", "consumerName": "Customer name", "consumerPhone": "0580000000", "consumerEmail": "yelenak@e-c.co.il", "consumerAddress": { "city": null, "zip": null, "street": null, "house": null, "apartment": null }, "externalReference": "RW67484683", "origin": null, "bankDetails": { "bank": "10", "bankBranch": "456", "bankAccount": "5553535345" } } ``` -------------------------------- ### Create Installment Payment Transaction Source: https://context7.com/easycardng/api/llms.txt Process a payment that is split across multiple installments. Requires installment details including number of payments and amounts. ```json { "terminalID": "57d5dd68-4280-44f6-a8f7-547180e3a1d6", "transactionType": "installments", "currency": "ILS", "transactionAmount": 1200, "creditCardToken": "8000dee3-fd2b-4f6f-9c2f-678fb99e8ae4", "installmentDetails": { "numberOfPayments": 6, "initialPaymentAmount": 200, "totalAmount": 1200, "installmentPaymentAmount": 200 }, "dealDetails": { "dealReference": "INSTALL-001", "consumerEmail": "customer@example.com" } } ``` -------------------------------- ### Get Billing Deals List with Filters Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md Use this endpoint to retrieve billing deals. Various query parameters are available to filter the results, such as status, dates, consumer information, and deal specifics. The response includes total amounts and a paginated list of deals. ```json { "totalAmountILS": 0, "totalAmountUSD": 0, "totalAmountEUR": 0, "numberOfRecords": 0, "data": [ { "billingDealID": "4cd118ba-cace-48f5-9541-35d080140955", "terminalName": "string", "terminalID": "57d5dd68-4280-44f6-a8f7-547180e3a1d6", "merchantID": "c30c8496-c2db-425f-8614-0e5f16767e31", "transactionAmount": 0, "currency": "ILS", "billingDealTimestamp": "2019-08-24T14:15:22Z", "nextScheduledTransaction": "2019-08-24T14:15:22Z", "currentTransactionTimestamp": "2019-08-24T14:15:22Z", "consumerName": "string", "billingSchedule": { "repeatPeriodType": "oneTime", "startAtType": "today", "startAt": "2019-08-24T14:15:22Z", "endAtType": "never", "endAt": "2019-08-24T14:15:22Z", "endAtNumberOfPayments": 0 }, "cardNumber": "string", "cardExpired": true, "active": true, "currentDeal": 0, "pausedFrom": "2019-08-24T14:15:22Z", "pausedTo": "2019-08-24T14:15:22Z", "paused": true, "paymentType": "card", "dealDetails": { "dealReference": "string", "dealDescription": "string", "consumerEmail": "user@example.com", "consumerName": "string", "consumerNationalID": "string", "consumerPhone": "string", "consumerID": "9e541e9d-045d-45e2-8cf0-ead10a4f23cf", "items": [ { "itemID": "f1f85a48-b9b1-447d-a06c-c1acf57ed3a8", "externalReference": "string", "itemName": "string", "sku": "string", "price": 0, "netPrice": 0, "quantity": 0.01, "amount": 0, "vatRate": 1, "vat": 0, "netAmount": 0, "discount": 0, "netDiscount": 0, "extension": null, "woocommerceID": "string", "ecwidID": "string" } ], "consumerAddress": { "countryCode": "string", "city": "string", "zip": "string", "street": "string", "house": "string", "apartment": "string" }, "consumerExternalReference": "string", "consumerWoocommerceID": "string", "consumerEcwidID": "string", "responsiblePerson": "string", "externalUserID": "string", "branch": "string", "department": "string" }, "invoiceOnly": true, "creditCardToken": "8000dee3-fd2b-4f6f-9c2f-678fb99e8ae4", "consumerExternalReference": "string" } ] } ``` -------------------------------- ### Installment Details Structure Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md Contains details for installment payments, including the number of payments, initial amount, total amount, and installment payment amount. Used for defining payment plans. ```json { "numberOfPayments": 1, "initialPaymentAmount": 0.01, "totalAmount": 0.01, "installmentPaymentAmount": 0.01 } ``` -------------------------------- ### Create New Custom Item Source: https://github.com/easycardng/api/blob/main/MetadataApi.md Creates a new custom selling item with specified details. ```APIDOC ## POST /api/items ### Description Creates a new custom selling item. Requires item details such as name, price, and currency in the request body. ### Method POST ### Endpoint /api/items ### Parameters #### Request Body - **itemName** (string) - Required - The name of the item. - **price** (number) - Required - The price of the item. - **active** (boolean) - Required - Indicates if the item is active. - **currency** (string) - Required - The currency of the item's price (e.g., "ILS"). - **externalReference** (string) - Optional - An external reference ID for the item. - **billingDesktopRefNumber** (string) - Optional - A reference number for billing desktop. - **sku** (string) - Optional - The Stock Keeping Unit for the item. - **origin** (string) - Optional - The origin of the item. - **woocommerceID** (string) - Optional - The WooCommerce ID for the item. - **ecwidID** (string) - Optional - The Ecwid ID for the item. ### Request Example ```json { "itemName": "string", "price": 0, "active": true, "currency": "ILS", "externalReference": "string", "billingDesktopRefNumber": "string", "sku": "string", "origin": "string", "woocommerceID": "string", "ecwidID": "string" } ``` ### Response #### Success Response (201) - **message** (string) - A message indicating the status of the operation. - **status** (string) - The status of the operation (e.g., "success"). - **entityID** (integer) - The ID of the created entity. - **entityUID** (string) - The unique identifier (UID) of the created entity. - **entityReference** (string) - A reference to the created entity. - **correlationId** (string) - An ID for tracing the request. - **entityType** (string) - The type of the created entity. - **errors** (array) - An array of errors, if any occurred. - **code** (string) - The error code. - **description** (string) - The error description. - **concurrencyToken** (string) - Token for concurrency control. - **innerResponse** (object) - Contains details of the inner operation response. - **additionalData** (any) - Additional data related to the response. #### Response Example (201) ```json { "message": "string", "status": "success", "entityID": 0, "entityUID": "1a366e78-0ad8-4c6d-9367-977d46d0652e", "entityReference": "string", "correlationId": "string", "entityType": "string", "errors": [ { "code": "string", "description": "string" } ], "concurrencyToken": "string", "innerResponse": { "message": "string", "status": "success", "entityID": 0, "entityUID": "1a366e78-0ad8-4c6d-9367-977d46d0652e", "entityReference": "string", "correlationId": "string", "entityType": "string", "errors": [ { "code": "string", "description": "string" } ], "concurrencyToken": "string", "innerResponse": {}, "additionalData": null }, "additionalData": null } ``` ``` -------------------------------- ### Create Installment Payment Source: https://context7.com/easycardng/api/llms.txt Process a payment split across multiple installments. ```APIDOC ## POST /api/transactions/create ### Description Process a payment split across multiple installments. This endpoint is used for installment transactions. ### Method POST ### Endpoint /api/transactions/create ### Parameters #### Request Body - **terminalID** (string) - Required - The ID of the terminal processing the transaction. - **transactionType** (string) - Required - The type of transaction. Use 'installments' for installment payments. - **currency** (string) - Required - The currency of the transaction (e.g., 'ILS', 'USD'). - **transactionAmount** (number) - Required - The total amount for all installments. - **creditCardToken** (string) - Required - A token representing the credit card to be used. - **installmentDetails** (object) - Required - Details about the installment plan. - **numberOfPayments** (integer) - Required - The total number of payments. - **initialPaymentAmount** (number) - Required - The amount of the first payment. - **totalAmount** (number) - Required - The total amount to be paid across all installments. - **installmentPaymentAmount** (number) - Required - The amount of each subsequent installment payment. - **dealDetails** (object) - Required - Details about the deal. - **dealReference** (string) - Required - A reference identifier for the deal. - **consumerEmail** (string) - Optional - The email address of the consumer. ### Request Example ```json { "terminalID": "57d5dd68-4280-44f6-a8f7-547180e3a1d6", "transactionType": "installments", "currency": "ILS", "transactionAmount": 1200, "creditCardToken": "8000dee3-fd2b-4f6f-9c2f-678fb99e8ae4", "installmentDetails": { "numberOfPayments": 6, "initialPaymentAmount": 200, "totalAmount": 1200, "installmentPaymentAmount": 200 }, "dealDetails": { "dealReference": "INSTALL-001", "consumerEmail": "customer@example.com" } } ``` ``` -------------------------------- ### POST /api/billing - Create billing deal Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md Creates a new billing deal. Requires authentication with terminal_or_manager_or_admin scopes. ```APIDOC ## POST /api/billing ### Description Creates a new billing deal with specified details. ### Method POST ### Endpoint /api/billing ### Parameters #### Request Body - **terminalID** (string) - Required - The ID of the terminal. - **currency** (string) - Required - The currency code (e.g., ILS). - **creditCardToken** (string) - Required - Token representing the credit card. - **transactionAmount** (number) - Required - The amount of the transaction. - **vatRate** (number) - Required - The VAT rate. - **vatTotal** (number) - Required - The total VAT amount. - **netTotal** (number) - Required - The net total amount. - **billingSchedule** (object) - Required - Details about the billing schedule. - **repeatPeriodType** (string) - Required - Type of repeat period (e.g., oneTime). - **startAtType** (string) - Required - Type of start date (e.g., today). - **startAt** (string) - Required - The start date and time in ISO format. - **endAtType** (string) - Required - Type of end date (e.g., never). - **endAt** (string) - Optional - The end date and time in ISO format. - **endAtNumberOfPayments** (integer) - Optional - The number of payments for the end date. - **issueInvoice** (boolean) - Required - Whether to issue an invoice. - **invoiceDetails** (object) - Optional - Details for the invoice. - **invoiceType** (string) - Required - Type of invoice (e.g., invoice). - **invoiceSubject** (string) - Optional - Subject of the invoice. - **sendCCTo** (array) - Optional - List of email addresses to send the invoice to. - **donation** (boolean) - Optional - Whether it's a donation. - **invoiceLanguage** (string) - Optional - Language of the invoice. - **paymentType** (string) - Required - The payment type (e.g., card). - **bankDetails** (object) - Optional - Bank details for the transaction. - **bank** (integer) - Optional - Bank number. - **bankBranch** (integer) - Optional - Bank branch number. - **bankAccount** (string) - Optional - Bank account number. - **paymentType** (string) - Optional - Payment type for bank details. - **amount** (number) - Optional - Amount associated with bank details. - **origin** (string) - Optional - Origin of the deal. - **dealDetails** (object) - Optional - Detailed information about the deal. - **dealReference** (string) - Optional - Reference for the deal. - **dealDescription** (string) - Optional - Description of the deal. - **consumerEmail** (string) - Optional - Consumer's email address. - **consumerName** (string) - Optional - Consumer's name. - **consumerNationalID** (string) - Optional - Consumer's national ID. - **consumerPhone** (string) - Optional - Consumer's phone number. - **consumerID** (string) - Optional - Consumer's unique ID. - **items** (array) - Optional - List of items in the deal. - **itemID** (string) - Required - Item's unique ID. - **externalReference** (string) - Optional - External reference for the item. - **itemName** (string) - Required - Name of the item. - **sku** (string) - Optional - Stock Keeping Unit. - **price** (number) - Required - Price of the item. - **netPrice** (number) - Required - Net price of the item. - **quantity** (number) - Required - Quantity of the item. - **amount** (number) - Required - Total amount for the item. - **vatRate** (number) - Required - VAT rate for the item. - **vat** (number) - Required - VAT amount for the item. - **netAmount** (number) - Required - Net amount for the item. - **discount** (number) - Optional - Discount amount. - **netDiscount** (number) - Optional - Net discount amount. - **extension** (any) - Optional - Extension data. - **woocommerceID** (string) - Optional - WooCommerce ID. - **ecwidID** (string) - Optional - Ecwid ID. - **consumerAddress** (object) - Optional - Consumer's address. - **countryCode** (string) - Optional - Country code. - **city** (string) - Optional - City. - **zip** (string) - Optional - Zip code. - **street** (string) - Optional - Street. - **house** (string) - Optional - House number. - **apartment** (string) - Optional - Apartment number. - **consumerExternalReference** (string) - Optional - Consumer's external reference. - **consumerWoocommerceID** (string) - Optional - Consumer's WooCommerce ID. - **consumerEcwidID** (string) - Optional - Consumer's Ecwid ID. - **responsiblePerson** (string) - Optional - Name of the responsible person. - **externalUserID** (string) - Optional - External user ID. - **branch** (string) - Optional - Branch identifier. - **department** (string) - Optional - Department identifier. ### Request Example ```json { "terminalID": "57d5dd68-4280-44f6-a8f7-547180e3a1d6", "currency": "ILS", "creditCardToken": "8000dee3-fd2b-4f6f-9c2f678fb99e8ae4", "transactionAmount": 0.01, "vatRate": 1, "vatTotal": 0, "netTotal": 0.01, "billingSchedule": { "repeatPeriodType": "oneTime", "startAtType": "today", "startAt": "2019-08-24T14:15:22Z", "endAtType": "never", "endAt": "2019-08-24T14:15:22Z", "endAtNumberOfPayments": 0 }, "issueInvoice": true, "invoiceDetails": { "invoiceType": "invoice", "invoiceSubject": "string", "sendCCTo": [ "string" ], "donation": true, "invoiceLanguage": "string" }, "paymentType": "card", "bankDetails": { "bank": 0, "bankBranch": 0, "bankAccount": "string", "paymentType": "card", "amount": 0 }, "origin": "string", "dealDetails": { "dealReference": "string", "dealDescription": "string", "consumerEmail": "user@example.com", "consumerName": "string", "consumerNationalID": "string", "consumerPhone": "string", "consumerID": "9e541e9d-045d-45e2-8cf0-ead10a4f23cf", "items": [ { "itemID": "f1f85a48-b9b1-447d-a06c-c1acf57ed3a8", "externalReference": "string", "itemName": "string", "sku": "string", "price": 0, "netPrice": 0, "quantity": 0.01, "amount": 0, "vatRate": 1, "vat": 0, "netAmount": 0, "discount": 0, "netDiscount": 0, "extension": null, "woocommerceID": "string", "ecwidID": "string" } ], "consumerAddress": { "countryCode": "string", "city": "string", "zip": "string", "street": "string", "house": "string", "apartment": "string" }, "consumerExternalReference": "string", "consumerWoocommerceID": "string", "consumerEcwidID": "string", "responsiblePerson": "string", "externalUserID": "string", "branch": "string", "department": "string" } } ``` ### Response #### Success Response (201) - **message** (string) - Confirmation message. - **status** (string) - Status of the operation (e.g., success). - **entityUID** (string) - Unique identifier for the created entity. #### Response Example ```json { "message": "Billing Deal Created", "status": "success", "entityUID": "253d8de2-b5ed-4f9a-9a23-63b0aa1c30c6" } ``` #### Error Response (400) - **message** (string) - Error message indicating validation failure. - **status** (string) - Status of the operation (e.g., error). - **correlationId** (string) - Unique ID for tracing the request. - **errors** (array) - List of validation errors. - **code** (string) - Error code. - **description** (string) - Description of the error. #### Response Example ```json { "message": "Validation Errors", "status": "error", "correlationId": "0607b859-87d0-4fc8-bf4d-cc364c2f5d15", "errors": [ { "code": "paymentRequestAmount", "description": "Could not convert string to decimal: 1200$. Path 'paymentRequestAmount', line 10, position 33." } ] } ``` #### Error Response (404) - **message** (string) - Error message indicating entity not found. - **status** (string) - Status of the operation (e.g., error). - **correlationId** (string) - Unique ID for tracing the request. - **entityType** (string) - The type of entity that was not found. #### Response Example ```json { "message": "Entity Not Found", "status": "error", "correlationId": "29639763-b16a-4547-bff0-05e6b2f199b2", "entityType": "Consumer" } ``` ### Authentication Requires authentication with scopes: terminal_or_manager_or_admin. ``` -------------------------------- ### PaymentTypeEnum Example Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md An enumeration representing the different types of payments accepted. Examples include card, cheque, cash, and bank. ```json "card" ``` -------------------------------- ### Example Error Response Source: https://github.com/easycardng/api/blob/main/TransactionsApi.md This is an example of a validation error response. It indicates issues with the provided payment request amount, such as incorrect formatting. ```json { "message": "Validation Errors", "status": "error", "correlationId": "d9f18253-22c5-4edf-a753-fd1b35ea40c0", "errors": [ { "code": "paymentRequestAmount", "description": "Could not convert string to decimal: 1200$. Path 'paymentRequestAmount', line 10, position 33." } ] } ``` -------------------------------- ### EasyCard Configuration Source: https://github.com/easycardng/api/blob/main/WIX.md Configuration details for the EasyCard payment provider plugin in WIX. This includes setting up payment methods, logos, and credentials. ```APIDOC ## EasyCard Configuration ### Description Configuration for the EasyCard payment provider plugin in WIX. This section details how to set up the plugin within the WIX dashboard, including payment method display and required credentials. ### Method N/A (Configuration) ### Endpoint N/A (Configuration) ### Parameters #### Request Body (getConfig function) - **title** (string) - Required - The display name of the payment method. - **paymentMethods** (array) - Required - An array of payment methods offered. - **hostedPage** (object) - Configuration for hosted payment pages. - **title** (string) - Required - The title for the hosted payment page. - **logos** (object) - Logos for the payment method. - **white** (object) - White version of the logo. - **svg** (string) - URL to the SVG logo. - **png** (string) - URL to the PNG logo. - **colored** (object) - Colored version of the logo. - **svg** (string) - URL to the SVG logo. - **png** (string) - URL to the PNG logo. - **credentialsFields** (array) - Required - Fields for collecting merchant credentials. - **simpleField** (object) - A simple input field for credentials. - **name** (string) - Required - The internal name of the credential field. - **label** (string) - Required - The display label for the credential field. ### Request Example (getConfig function) ```javascript export function getConfig() { return { title: "EasyCard", paymentMethods: [ { hostedPage: { title: "EasyCard", logos: { white: { svg: 'https://static.wixstatic.com/media/87b5fd_5f8435f73b4943b9918a9effa83bd8ec~mv2.png', png: 'https://static.wixstatic.com/media/87b5fd_5f8435f73b4943b9918a9effa83bd8ec~mv2.png' }, colored: { svg: 'https://static.wixstatic.com/media/87b5fd_5f8435f73b4943b9918a9effa83bd8ec~mv2.png', png: 'https://static.wixstatic.com/media/87b5fd_5f8435f73b4943b9918a9effa83bd8ec~mv2.png' } }, }, }, ], credentialsFields: [ { simpleField: { name: "privateApiKey", label: "Private Api Key", }, } ], }; } ``` ### Response N/A (Configuration function returns configuration object) ```