### Status Embed Installation Check Source: https://docs.clover.com/dev/recipes This JSON response indicates a successful installation or correct configuration of a status embed. It is typically shown when no incidents or maintenance are active. ```json {"success":true} ``` -------------------------------- ### Android Payments API - Accept a Payment Example (February 2025) Source: https://docs.clover.com/dev/changelog Documentation update for the Android Payments API's Accept a payment endpoint, including a new TenderOptions section and a Bypass Tenders example. ```APIDOC ## Accept a payment (Android) ### Description This section provides updated documentation for accepting payments using the Android Payments API, including examples for `TenderOptions` and bypassing tenders to go directly to card payment. ### Method (Implied POST or similar transaction initiation) ### Endpoint (Specific Android SDK method or endpoint) ### Request Parameters (Conceptual) - **paymentRequest** (object) - Contains details for the payment. - **amount** (integer) - The payment amount. - **tenderOptions** (object) - Options for tender selection. - **bypassTenders** (boolean) - If true, skips tender selection and proceeds directly to card payment. - Other payment-related fields... ### Request Example (Conceptual - Bypass Tenders) ```json { "amount": 1000, // Example amount in cents "tenderOptions": { "bypassTenders": true } } ``` ### Response (Conceptual) - **transactionResult** (object) - Details of the payment transaction. ``` -------------------------------- ### Build an Order Cart - Python Source: https://docs.clover.com/dev/recipes This snippet demonstrates how to construct an order cart payload in Python, including line items, discounts, and modifiers. Ensure you have the 'requests' library installed. ```python import requests ``` ```python url = "https://sandbox.dev.clover.com/v3/merchants/{mId}/atomic_order/checkouts" ``` ```python payload = {"orderCart": { ``` ```python "discounts": [ ``` ```python { ``` ```python "name": "20c Tuesday", ``` ```python "amount": -20 ``` ```python } ``` ```python ], ``` ```python "lineItems": [ ``` ```python { ``` ```python "item": {"id": "92QGKXJB4BXW0"}, ``` ```python "printed": "false", ``` ```python "exchanged": "false", ``` ```python "modifications": [ ``` ```python { ``` ```python "modifier": { ``` ```python "available": "true", ``` ```python "id": "4KAZY3PXJQ4P0" ``` ```python } ``` ```python } ``` ```python ] ``` ```python } ``` ```python ] ``` ```python } ``` ```python } ``` -------------------------------- ### Set Additional Query Parameters Source: https://docs.clover.com/reference This cURL example demonstrates how to set additional query parameters, such as `expand=openingHours`, to retrieve more information from REST API requests. Replace `{mId}` and `{auth_token}` accordingly. ```curl curl --request GET \ --url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}?expand=openingHours' \ --header 'accept: application/json' \ --header 'authorization: Bearer {auth_token}' ``` -------------------------------- ### Charge API - Add Installment Fields Source: https://docs.clover.com/dev/changelog/clover-api-updates-july-2024 New fields have been added to the `installment_info` object for the Create a charge endpoint to comply with RCL 31/32 upgrade. ```APIDOC ## POST /v1/charges ### Description Creates a charge. New fields have been added to the `installment_info` object. ### Method POST ### Endpoint /v1/charges ### Parameters #### Request Body - **amount** (integer) - Required - The amount to charge in cents. - **currency** (string) - Required - The currency of the charge (e.g., "USD"). - **source** (string) - Required - The payment source token or ID. - **installment_info** (object) - Optional - Information about installments. - **total_count** (integer) - Required - The total number of installments. - **total_amount** (integer) - Required - The total amount for all installments. - **sequence_number** (integer) - Required - The current installment number. - **amount_type** (string) - Required - The type of amount (e.g., "FIXED", "PERCENTAGE"). - **interval** (string) - Required - The interval for installments (e.g., "MONTHLY", "WEEKLY"). - **interval_count** (integer) - Required - The number of intervals between installments. ### Request Example { "amount": 10000, "currency": "USD", "source": "tok_abcdef123456", "installment_info": { "total_count": 3, "total_amount": 30000, "sequence_number": 1, "amount_type": "FIXED", "interval": "MONTHLY", "interval_count": 1 } } ### Response #### Success Response (201) - **id** (string) - The ID of the charge. - **amount** (integer) - The amount charged. - **currency** (string) - The currency of the charge. - **status** (string) - The status of the charge. #### Response Example { "id": "ch_abcdef123456", "amount": 10000, "currency": "USD", "status": "succeeded" } ``` -------------------------------- ### GET /v3/merchants/{mId} Source: https://docs.clover.com/reference Retrieve information about a specific test merchant using their merchant ID. ```APIDOC ## GET /v3/merchants/{mId} ### Description Retrieve test merchant information. ### Method GET ### Endpoint `https://apisandbox.dev.clover.com/v3/merchants/{mId}` ### Parameters #### Path Parameters - **mId** (string) - Required - The test merchant's universally unique identifier (UUID), also known as the `merchantId`. #### Request Headers - **Authorization** (string) - Required - Bearer token type, followed by the test API token. - **accept** (string) - Required - `application/json` ### Request Example ```curl curl --request GET \ --url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}' \ --header 'accept: application/json' \ --header 'authorization: Bearer {auth_token}' ``` ### Response #### Success Response (200) - **name** (string) - The test merchant's name. ``` -------------------------------- ### Sandbox Base URLs Source: https://docs.clover.com/reference Base URLs for accessing Clover services in the sandbox environment for development and testing. ```APIDOC ## Sandbox Base URLs Use the Android emulator or Developer Kits in the sandbox environment for building and testing your apps with test merchants. In the sandbox environment, Clover provides base URLs for different services: API| URL ---|--- Platform API| `https://apisandbox.dev.clover.com` Tokenization service API| `https://token-sandbox.dev.clover.com` Ecommerce service API| `https://scl-sandbox.dev.clover.com` ``` -------------------------------- ### Query Parameters Source: https://docs.clover.com/dev/reference How to set additional query parameters for REST API requests to retrieve more information. ```APIDOC ## Set additional query parameters To retrieve more information from your REST API requests, set query parameters for supported endpoints in the following format. ### cURL Example with `expand` parameter ```curl curl --request GET \ --url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}?expand=openingHours' \ --header 'accept: application/json' \ --header 'authorization: Bearer {auth_token}' ``` ### Query Parameter Format `[Endpoint URI]?field=value[,additionalValues...]&[additionalQueryParameters...]` ### Note In the API documentation, the Query Params section lists the additional parameters available. For example, use the `expand` query parameter for additional information about a merchant. See Use expandable fields for more information. ``` -------------------------------- ### Query Parameters Source: https://docs.clover.com/reference How to use additional query parameters to expand the information retrieved from REST API requests. ```APIDOC ## Query Parameters ### Description To retrieve more information from your REST API requests, set query parameters for supported endpoints in the following format. ### Format `[Endpoint URI]?field=value[,additionalValues...]&[additionalQueryParameters...]` ### Example To use the `expand` query parameter for additional information about a merchant: ```curl curl --request GET \ --url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}?expand=openingHours' \ --header 'accept: application/json' \ --header 'authorization: Bearer {auth_token}' ``` See Use expandable fields for more information. ``` -------------------------------- ### Production Base URLs Source: https://docs.clover.com/reference Base URLs for accessing Clover services in the production environment across different regions. ```APIDOC ## Production Base URLs In the production environment, Clover provides base URLs for different services in supported markets. API and region| URL ---|--- Platform API (North America: US and Canada)| `https://api.clover.com` Platform API (Europe)| `https://api.eu.clover.com` Platform API (Latin America)| `https://api.la.clover.com` Tokenization service API| `https://token.clover.com` Ecommerce service API| `https://scl.clover.com` ``` -------------------------------- ### Ecommerce API - Charge Intent Correction (April 2025) Source: https://docs.clover.com/changelog Correction to intent name and tutorial link for Create a charge and Pay for an order endpoints. ```APIDOC ## POST /api/charges ### Description Creates a charge. The intent name for saving credentials has been corrected to **save_credentials_on_file**. ### Method POST ### Endpoint /api/charges ### Parameters #### Request Body - **charge** (object) - Required - Details of the charge. - **stored_credentials** (object) - Optional - For storing credentials. - **intent** (string) - Should be set to **save_credentials_on_file**. ### Request Example ```json { "charge": { "amount": 1000, "card": { "number": "...", "exp_month": 12, "exp_year": 2025 }, "stored_credentials": { "purpose": "one_time", "intent": "save_credentials_on_file" } } } ``` ``` ```APIDOC ## POST /api/orders/{orderId}/pay ### Description Pays for an order. The intent name for saving credentials has been corrected to **save_credentials_on_file**. ### Method POST ### Endpoint /api/orders/{orderId}/pay ### Parameters #### Path Parameters - **orderId** (string) - Required - The ID of the order to pay. #### Request Body - **payment** (object) - Required - Details of the payment. - **stored_credentials** (object) - Optional - For storing credentials. - **intent** (string) - Should be set to **save_credentials_on_file**. ### Request Example ```json { "payment": { "amount": 1500, "card": { "number": "...", "exp_month": 11, "exp_year": 2026 }, "stored_credentials": { "purpose": "recurring", "intent": "save_credentials_on_file" } } } ``` ``` -------------------------------- ### Retrieve Test Merchant Information Source: https://docs.clover.com/reference Use this cURL command to retrieve information about your test merchant. Ensure you replace `{mId}` with your test merchant ID and `{auth_token}` with your test API token. ```curl curl --request GET \ --url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}' \ --header 'accept: application/json' \ --header 'authorization: Bearer {auth_token}' ``` -------------------------------- ### Platform API - Payment Data Retrieval (February 2025) Source: https://docs.clover.com/changelog Implementation of a Date Range Restriction for the GetPayments API. ```APIDOC ## GET /api/payments ### Description Retrieves payments. If no DateTime filter is provided, data fetching is restricted to a 90-day date range. ### Method GET ### Endpoint /api/payments ### Parameters #### Query Parameters - **limit** (integer) - Optional - Maximum number of payments to return. - **offset** (integer) - Optional - Number of payments to skip. - **filter_start_date** (string) - Optional - Start date for filtering payments (YYYY-MM-DD). - **filter_end_date** (string) - Optional - End date for filtering payments (YYYY-MM-DD). ### Response #### Success Response (200) - **payments** (array) - An array of payment objects. #### Response Example ```json { "payments": [ { "id": "P1001", "amount": 5000, "date": "2025-02-15T10:30:00Z" } ] } ``` ``` -------------------------------- ### Inventory API - Subcategories (March 2026) Source: https://docs.clover.com/dev/changelog Updates to the Inventory API to support subcategories for more granular inventory organization. ```APIDOC ## POST /api/categories/{categoryId}/subcategories ### Description Creates a new subcategory within an existing parent category. ### Method POST ### Endpoint /api/categories/{categoryId}/subcategories ### Parameters #### Path Parameters - **categoryId** (string) - Required - The ID of the parent category. #### Request Body - **subcategory** (object) - Required - The details of the subcategory to create. - **name** (string) - Required - The name of the subcategory. ### Response #### Success Response (200 or 201) - **subcategory** (object) - The created subcategory. #### Error Response (400) - **error** (string) - Indicates an error during subcategory creation. ``` ```APIDOC ## PUT /api/subcategories/{subcategoryId} ### Description Updates the information for an existing subcategory. ### Method PUT ### Endpoint /api/subcategories/{subcategoryId} ### Parameters #### Path Parameters - **subcategoryId** (string) - Required - The ID of the subcategory to update. #### Request Body - **subcategory** (object) - Required - The updated information for the subcategory. - **name** (string) - Optional - The new name for the subcategory. ### Response #### Success Response (200) - **subcategory** (object) - The updated subcategory. #### Error Response (400) - **error** (string) - Indicates an error during subcategory update. ``` ```APIDOC ## DELETE /api/subcategories/{subcategoryId} ### Description Deletes an existing subcategory. ### Method DELETE ### Endpoint /api/subcategories/{subcategoryId} ### Parameters #### Path Parameters - **subcategoryId** (string) - Required - The ID of the subcategory to delete. ### Response #### Success Response (204) - No content is returned on successful deletion. #### Error Response (400) - **error** (string) - Indicates an error during subcategory deletion. ``` ```APIDOC ## GET /api/categories/{categoryId}/subcategories ### Description Retrieves a list of all subcategories associated with a specific category. ### Method GET ### Endpoint /api/categories/{categoryId}/subcategories ### Parameters #### Path Parameters - **categoryId** (string) - Required - The ID of the category whose subcategories are to be retrieved. ### Response #### Success Response (200) - **subcategories** (array) - An array of subcategory objects. - Each object contains details of a subcategory. #### Error Response (400) - **error** (string) - Indicates an error when retrieving subcategories. ``` ```APIDOC ## GET /api/subcategories/{subcategoryId}/items ### Description Retrieves a list of all items associated with a specific subcategory. ### Method GET ### Endpoint /api/subcategories/{subcategoryId}/items ### Parameters #### Path Parameters - **subcategoryId** (string) - Required - The ID of the subcategory whose items are to be retrieved. ### Response #### Success Response (200) - **items** (array) - An array of item objects associated with the subcategory. #### Error Response (400) - **error** (string) - Indicates an error when retrieving items for the subcategory. ``` ```APIDOC ## POST /api/items/{itemId}/categories ### Description Creates an association between an item and a category or subcategory. ### Method POST ### Endpoint /api/items/{itemId}/categories ### Parameters #### Path Parameters - **itemId** (string) - Required - The ID of the item. #### Request Body - **association** (object) - Required - Details of the category/subcategory association. - **categoryId** (string) - Optional - The ID of the category to associate the item with. - **subcategoryId** (string) - Optional - The ID of the subcategory to associate the item with. ### Response #### Success Response (200 or 201) - **association** (object) - The created association details. #### Error Response (400) - **error** (string) - Indicates an error when creating the association. ``` ```APIDOC ## DELETE /api/items/{itemId}/categories/{categoryIdOrSubcategoryId} ### Description Deletes the association between an item and a specific category or subcategory. ### Method DELETE ### Endpoint /api/items/{itemId}/categories/{categoryIdOrSubcategoryId} ### Parameters #### Path Parameters - **itemId** (string) - Required - The ID of the item. - **categoryIdOrSubcategoryId** (string) - Required - The ID of the category or subcategory to disassociate the item from. ### Response #### Success Response (204) - No content is returned on successful deletion. #### Error Response (400) - **error** (string) - Indicates an error when deleting the association. ``` -------------------------------- ### Ecommerce API - Charge and Payment Updates (April 2025) Source: https://docs.clover.com/dev/changelog Corrections to the Ecommerce API related to intent names and tutorial links for charge and payment endpoints. ```APIDOC ## POST /api/charges ### Description Creates a charge. The `intent` name has been corrected to `save_credentials_on_file`. ### Method POST ### Endpoint /api/charges ### Request Body - **charge** (object) - Required - Charge details. - **intent** (string) - Must be `save_credentials_on_file`. - Other charge fields... ### Response #### Success Response (200 or 201) - **charge** (object) - The created charge details. #### Error Response (400) - **error** (string) - Indicates an error during charge creation. ``` ```APIDOC ## POST /api/orders/{orderId}/pay ### Description Processes payment for an order. The `intent` name has been corrected to `save_credentials_on_file`. ### Method POST ### Endpoint /api/orders/{orderId}/pay ### Parameters #### Path Parameters - **orderId** (string) - Required - The ID of the order to pay. #### Request Body - **paymentDetails** (object) - Required - Payment details. - **intent** (string) - Must be `save_credentials_on_file`. - Other payment fields... ### Response #### Success Response (200) - **payment** (object) - The payment details. #### Error Response (400) - **error** (string) - Indicates an error during payment processing. ``` -------------------------------- ### POST /v3/merchants/{mId} Source: https://docs.clover.com/dev/reference Update the name of a test merchant. ```APIDOC ## POST /v3/merchants/{mId} ### Description Update your test merchant's name. ### Method POST ### Endpoint `https://apisandbox.dev.clover.com/v3/merchants/{mId}` ### Parameters #### Path Parameters - **mId** (string) - Required - The test merchant's universally unique identifier (UUID), also known as the `merchantId`. #### Request Headers - **Authorization** (string) - Required - Bearer token type, followed by the test API token. - **accept** (string) - Required - `application/json` #### Request Body - **name** (string) - Required - The updated name for the merchant. ### Request Example ```json { "name": "{updated_merchant_name}" } ``` ### Response #### Success Response (200) - **name** (string) - The updated test merchant's name. ``` -------------------------------- ### POST /v3/merchants/{mId} Source: https://docs.clover.com/reference Update the name of a test merchant. ```APIDOC ## POST /v3/merchants/{mId} ### Description Update your test merchant's name. ### Method POST ### Endpoint `https://apisandbox.dev.clover.com/v3/merchants/{mId}` ### Parameters #### Path Parameters - **mId** (string) - Required - The test merchant's universally unique identifier (UUID), also known as the `merchantId`. #### Request Headers - **Authorization** (string) - Required - Bearer token type, followed by the test API token. - **accept** (string) - Required - `application/json` #### Request Body - **name** (string) - Required - The updated name for the merchant. ### Request Example ```json { "name": "{updated_merchant_name}" } ``` ### Response #### Success Response (200) - **name** (string) - The updated name of the test merchant. ``` -------------------------------- ### Inventory API - Bulk Update Limit (March 2026) Source: https://docs.clover.com/dev/changelog Updates to the Inventory API regarding server-side limits for bulk inventory updates. ```APIDOC ## PUT /api/inventory/items/batch ### Description Updates existing inventory items in bulk. A server-side limit of 2,500 items per request is now enforced. ### Method PUT ### Endpoint /api/inventory/items/batch ### Request Body - **items** (array) - Required - An array of inventory item objects to update. - Each object in the array should contain the `itemId` and the fields to be updated. - The total number of items in the array must not exceed 2,500. ### Response #### Success Response (200) - **results** (array) - An array of results for each updated item. #### Error Response (400) - **error** (string) - Indicates that the request exceeds the maximum number of items allowed per bulk update. ``` -------------------------------- ### Order API - Line Item Limits (March 2026) Source: https://docs.clover.com/dev/changelog Updates to the Order API regarding server-side limits for line items per order. ```APIDOC ## POST /api/orders/{orderId}/lineitems ### Description Creates a new line item for an order. A server-side limit of 2,500 line items per order is now enforced. ### Method POST ### Endpoint /api/orders/{orderId}/lineitems ### Parameters #### Path Parameters - **orderId** (string) - Required - The ID of the order to which the line item will be added. #### Request Body - **lineItem** (object) - Required - Details of the line item to be created. - **itemId** (string) - Required - The ID of the item. - **name** (string) - Required - The name of the item. - **price** (integer) - Required - The price of the item in the smallest currency unit. - **quantity** (integer) - Required - The quantity of the item. ### Response #### Success Response (200 or 201) - **lineItem** (object) - The created line item. #### Error Response (400) - **error** (string) - Indicates that the request exceeds the maximum number of line items allowed per order. ``` ```APIDOC ## POST /api/orders/{orderId}/lineitems/batch ### Description Creates multiple line items for an order in a single request. A server-side limit of 2,500 line items per order is now enforced. ### Method POST ### Endpoint /api/orders/{orderId}/lineitems/batch ### Parameters #### Path Parameters - **orderId** (string) - Required - The ID of the order to which the line items will be added. #### Request Body - **lineItems** (array) - Required - An array of line item objects to be created. - Each object in the array should follow the structure of a single line item in the `Create a new line item` endpoint. ### Response #### Success Response (200 or 201) - **lineItems** (array) - An array of the created line items. #### Error Response (400) - **error** (string) - Indicates that the request exceeds the maximum number of line items allowed per order. ``` ```APIDOC ## POST /api/orders/atomic ### Description Creates an atomic order, which is an order that is created and finalized in a single transaction. A server-side limit of 2,500 line items per order is now enforced. ### Method POST ### Endpoint /api/orders/atomic ### Request Body - **order** (object) - Required - The order details. - **lineItems** (array) - Required - An array of line item objects. The total number of line items across all orders in the atomic request must not exceed 2,500. ### Response #### Success Response (200 or 201) - **order** (object) - The created atomic order. #### Error Response (400) - **error** (string) - Indicates that the request exceeds the maximum number of line items allowed per order. ``` -------------------------------- ### Inventory API - Bulk Updates Limit (March 2026) Source: https://docs.clover.com/changelog Updates to the Inventory API regarding server-side limits for bulk inventory updates. ```APIDOC ## PUT /api/inventory/items/batch ### Description Updates existing inventory items in bulk. Allows a maximum of 2,500 items per request. ### Method PUT ### Endpoint /api/inventory/items/batch ### Parameters #### Request Body - **items** (array) - Required - An array of inventory item objects to update. ### Request Example ```json { "items": [ { "id": "ITEM001", "price": 1200, "stock": 50 }, { "id": "ITEM002", "price": 1500, "stock": 100 } ] } ``` ### Response #### Success Response (200) - **results** (array) - An array indicating the success or failure of each item update. #### Error Response (400) - **error** (string) - Indicates that the request exceeds the maximum number of items allowed for bulk update. ``` -------------------------------- ### Platform API - GetPayments Date Range Restriction (February 2025) Source: https://docs.clover.com/dev/changelog Updates to the GetPayments API to restrict data fetching to a 90-day date range when no DateTime filter is provided. ```APIDOC ## GET /api/payments ### Description Retrieves a list of payments. If no `DateTime` filter is provided, data fetching is restricted to a 90-day date range. ### Method GET ### Endpoint /api/payments ### Query Parameters - **DateTime** (string) - Optional - Filter payments by date and time. If omitted, a 90-day range is used. - **limit** (integer) - Optional - The maximum number of payments to return. - **offset** (integer) - Optional - The number of payments to skip. ### Response #### Success Response (200) - **payments** (array) - An array of payment objects. #### Error Response (400) - **error** (string) - Indicates an error when retrieving payments. ``` -------------------------------- ### Print Response Text - Python Source: https://docs.clover.com/dev/recipes This snippet shows how to print the text content of a response object in Python. This is useful for debugging API calls. ```python print(response.text) ``` -------------------------------- ### Ecommerce API - Token API Updates Source: https://docs.clover.com/dev/changelog/clover-api-updates-october-2024 Updates to the Token API within the Ecommerce API, including attribute additions and new endpoint introductions. ```APIDOC ## POST /v1/tokens/external ### Description Creates a Clover token from an external token. The `token_type` attribute has been added under the `external_token` object. ### Method POST ### Endpoint /v1/tokens/external ### Parameters #### Request Body - **external_token** (object) - Required - An object containing the external token details. - **token** (string) - Required - The external token value. - **token_type** (string) - Required - The type of the external token (e.g., "PAYPAL", "STRIPE"). ### Request Example ```json { "external_token": { "token": "ext_tok_12345", "token_type": "PAYPAL" } } ``` ### Response #### Success Response (200) - **token** (string) - The generated Clover token. - **expires_at** (string) - The expiration date and time of the token. #### Response Example ```json { "token": "clv_tok_abcde", "expires_at": "2025-10-26T10:00:00Z" } ``` ``` ```APIDOC ## POST /v1/tokens/applepay ### Description Creates an Apple Pay payment token for use with Clover endpoints. ### Method POST ### Endpoint /v1/tokens/applepay ### Parameters #### Request Body - **apple_pay_token** (object) - Required - The Apple Pay token object. - **payment_data** (string) - Required - The raw payment data from Apple Pay. - **header** (object) - Required - The header information from Apple Pay. - **ephemeralPublicKey** (string) - Required - The ephemeral public key. - **publicKeyHash** (string) - Required - The public key hash. - **transactionId** (string) - Required - The transaction ID. ### Request Example ```json { "apple_pay_token": { "payment_data": "base64EncodedPaymentData", "header": { "ephemeralPublicKey": "EPHEMERAL_PUBLIC_KEY", "publicKeyHash": "PUBLIC_KEY_HASH", "transactionId": "TRANSACTION_ID" } } } ``` ### Response #### Success Response (200) - **token** (string) - The generated Clover token for Apple Pay. - **expires_at** (string) - The expiration date and time of the token. #### Response Example ```json { "token": "clv_tok_applepay_xyz789", "expires_at": "2025-10-26T10:00:00Z" } ``` ``` -------------------------------- ### Gift Card API - Update Parameter Source: https://docs.clover.com/dev/changelog/clover-api-updates-july-2024 The 'card_number' parameter has been renamed to 'number' for the Create a gift card token endpoint. ```APIDOC ## POST /v1/gift_cards/token ### Description Creates a token for a gift card. The `card_number` parameter has been updated to `number`. ### Method POST ### Endpoint /v1/gift_cards/token ### Parameters #### Request Body - **number** (string) - Required - The gift card number. - **merchant_id** (string) - Required - The ID of the merchant. ### Request Example { "number": "1234567890123456", "merchant_id": "YOUR_MERCHANT_ID" } ### Response #### Success Response (201) - **token** (string) - The generated gift card token. - **id** (string) - The ID of the gift card. #### Response Example { "token": "tok_abcdef123456", "id": "gc_abcdef123456" } ``` -------------------------------- ### Inventory API - Age Restriction Flags (August 2025) Source: https://docs.clover.com/dev/changelog Updates to the Inventory API to include age-restriction-related flags for items. ```APIDOC ## POST /api/items ### Description Creates a new item in the inventory. Supports the `isAgeRestricted` flag. ### Method POST ### Endpoint /api/items ### Request Body - **item** (object) - Required - The details of the item to create. - **isAgeRestricted** (boolean) - Optional - A flag to indicate that the item requires age verification at the time of sale. - Other item fields... ### Response #### Success Response (200 or 201) - **item** (object) - The created item, including the `isAgeRestricted` flag if provided. #### Error Response (400) - **error** (string) - Indicates an error during item creation. ``` ```APIDOC ## PUT /api/items/{itemId} ### Description Updates an existing item in the inventory. Supports updating the `isAgeRestricted` flag. ### Method PUT ### Endpoint /api/items/{itemId} ### Parameters #### Path Parameters - **itemId** (string) - Required - The ID of the item to update. #### Request Body - **itemUpdate** (object) - Required - The fields to update for the item. - **isAgeRestricted** (boolean) - Optional - A flag to indicate that the item requires age verification at the time of sale. - Other updatable item fields... ### Response #### Success Response (200) - **item** (object) - The updated item, including the `isAgeRestricted` flag if updated. #### Error Response (400) - **error** (string) - Indicates an error during item update. ``` ```APIDOC ## GET /api/items/{itemId} ### Description Retrieves details for a specific item. Includes the `isAgeRestricted` flag. ### Method GET ### Endpoint /api/items/{itemId} ### Parameters #### Path Parameters - **itemId** (string) - Required - The ID of the item to retrieve. ### Response #### Success Response (200) - **item** (object) - The item details. - **isAgeRestricted** (boolean) - A flag indicating if the item requires age verification. - Other item fields... #### Error Response (400) - **error** (string) - Indicates an error when retrieving the item. ``` ```APIDOC ## GET /api/items ### Description Retrieves a list of all items in the inventory. Each item includes the `isAgeRestricted` flag. ### Method GET ### Endpoint /api/items ### Response #### Success Response (200) - **items** (array) - An array of item objects. - Each object contains item details, including the `isAgeRestricted` flag. #### Error Response (400) - **error** (string) - Indicates an error when retrieving items. ``` -------------------------------- ### POST /v1/apple_pay/token Source: https://docs.clover.com/dev/changelog/clover-api-updates-november-2024 This endpoint creates a unique, single-use token representing an Apple Pay wallet. This token can be used as a payment source in subsequent payment-related endpoints, ensuring secure transactions without direct handling of sensitive wallet information. ```APIDOC ## POST /v1/apple_pay/token ### Description Creates a unique, single-use token that represents an Apple Pay wallet. This token securely processes payments without exposing actual wallet details or directly handling sensitive information. Use this token as the payment source in single-payment endpoints. ### Method POST ### Endpoint /v1/apple_pay/token ### Parameters #### Request Body - **payment_data** (object) - Required - The encrypted Apple Pay payment data. - **merchant_id** (string) - Required - The Clover merchant ID. ### Request Example ```json { "payment_data": { "version": "3", "data": "...encrypted data...", "signature": "...signature...", "header": { "wrappedKey": "...wrapped key...", "ephemeralPublicKey": "...ephemeral public key...", "transactionId": "...transaction ID..." } }, "merchant_id": "YOUR_MERCHANT_ID" } ``` ### Response #### Success Response (200) - **token** (string) - A unique token representing the Apple Pay wallet. - **expires_at** (string) - The expiration date of the token in ISO 8601 format. #### Response Example ```json { "token": "tok_12345abcde67890fghij", "expires_at": "2024-12-31T23:59:59Z" } ``` ``` -------------------------------- ### Inventory API - Age Restriction Flag (August 2025) Source: https://docs.clover.com/changelog Updates to the Inventory API to include an age-restriction flag for items. ```APIDOC ## POST /api/items ### Description Creates a new item. Supports an `isAgeRestricted` flag. ### Method POST ### Endpoint /api/items ### Parameters #### Request Body - **item** (object) - Required - Details of the item to create. - **isAgeRestricted** (boolean) - Optional - Flag to indicate if the item requires age verification. ### Request Example ```json { "item": { "name": "Alcoholic Beverage", "price": 2000, "isAgeRestricted": true } } ``` ### Response #### Success Response (200) - **item** (object) - The created item details, including the `isAgeRestricted` flag. #### Response Example ```json { "item": { "id": "ITEM003", "name": "Alcoholic Beverage", "price": 2000, "isAgeRestricted": true } } ``` ``` ```APIDOC ## PUT /api/items/{itemId} ### Description Updates an existing item. Supports updating the `isAgeRestricted` flag. ### Method PUT ### Endpoint /api/items/{itemId} ### Parameters #### Path Parameters - **itemId** (string) - Required - The ID of the item to update. #### Request Body - **item** (object) - Required - The updated item information. - **isAgeRestricted** (boolean) - Optional - Flag to indicate if the item requires age verification. ### Request Example ```json { "item": { "price": 2200, "isAgeRestricted": false } } ``` ### Response #### Success Response (200) - **item** (object) - The updated item details. #### Response Example ```json { "item": { "id": "ITEM003", "name": "Alcoholic Beverage", "price": 2200, "isAgeRestricted": false } } ``` ``` ```APIDOC ## GET /api/items/{itemId} ### Description Retrieves details for a specific item, including the `isAgeRestricted` flag. ### Method GET ### Endpoint /api/items/{itemId} ### Parameters #### Path Parameters - **itemId** (string) - Required - The ID of the item to retrieve. ### Response #### Success Response (200) - **item** (object) - The item details. - **isAgeRestricted** (boolean) - Indicates if the item requires age verification. - **ageRestriction** (object) - Optional - Details about the age restriction. - **id** (string) - The unique identifier for the age restriction rule. - **name** (string) - The name of the restriction category. - **minimumAge** (integer) - The minimum age required for purchase. #### Response Example ```json { "item": { "id": "ITEM003", "name": "Alcoholic Beverage", "price": 2200, "isAgeRestricted": true, "ageRestriction": { "id": "AR001", "name": "Alcohol", "minimumAge": 21 } } } ``` ``` ```APIDOC ## GET /api/items ### Description Retrieves a list of all items, including their `isAgeRestricted` status. ### Method GET ### Endpoint /api/items ### Parameters #### Query Parameters - **limit** (integer) - Optional - Maximum number of items to return. - **offset** (integer) - Optional - Number of items to skip. ### Response #### Success Response (200) - **items** (array) - An array of item objects, each potentially including `isAgeRestricted`. #### Response Example ```json { "items": [ { "id": "ITEM003", "name": "Alcoholic Beverage", "price": 2200, "isAgeRestricted": true }, { "id": "ITEM004", "name": "Snack", "price": 500, "isAgeRestricted": false } ] } ``` ``` -------------------------------- ### Orders API - Age Restriction Details (August 2025) Source: https://docs.clover.com/dev/changelog Updates to the Orders API to include age-restriction details for orders and line items. ```APIDOC ## GET /api/orders/{orderId}/lineitems ### Description Retrieves all line items for a specific order. Each line item includes age-restriction details. ### Method GET ### Endpoint /api/orders/{orderId}/lineitems ### Parameters #### Path Parameters - **orderId** (string) - Required - The ID of the order. ### Response #### Success Response (200) - **lineItems** (array) - An array of line item objects. - Each object contains: - **isAgeRestricted** (boolean) - A flag indicating if the line item is age-restricted. - **ageRestrictedType** (string) - The name of the restriction category for the item. - **minimumAge** (integer) - The minimum age required to purchase the item. - Other line item fields... #### Error Response (400) - **error** (string) - Indicates an error when retrieving line items. ``` ```APIDOC ## POST /api/orders/{orderId}/lineitems ### Description Creates a new line item for an order. Supports age-restriction details for the line item. ### Method POST ### Endpoint /api/orders/{orderId}/lineitems ### Parameters #### Path Parameters - **orderId** (string) - Required - The ID of the order. #### Request Body - **lineItem** (object) - Required - Details of the line item to be created. - **isAgeRestricted** (boolean) - Optional - A flag indicating if the line item is age-restricted. - **ageRestrictedType** (string) - Optional - The name of the restriction category for the item. - **minimumAge** (integer) - Optional - The minimum age required to purchase the item. - Other line item fields... ### Response #### Success Response (200 or 201) - **lineItem** (object) - The created line item, including age-restriction details if provided. #### Error Response (400) - **error** (string) - Indicates an error during line item creation. ``` ```APIDOC ## GET /api/orders/{orderId}/lineitems/{lineItemId} ### Description Retrieves a specific line item for an order. Includes age-restriction details. ### Method GET ### Endpoint /api/orders/{orderId}/lineitems/{lineItemId} ### Parameters #### Path Parameters - **orderId** (string) - Required - The ID of the order. - **lineItemId** (string) - Required - The ID of the line item. ### Response #### Success Response (200) - **lineItem** (object) - The line item details. - **isAgeRestricted** (boolean) - A flag indicating if the line item is age-restricted. - **ageRestrictedType** (string) - The name of the restriction category for the item. - **minimumAge** (integer) - The minimum age required to purchase the item. - Other line item fields... #### Error Response (400) - **error** (string) - Indicates an error when retrieving the line item. ``` ```APIDOC ## POST /api/orders/{orderId}/lineitems/batch ### Description Creates multiple line items for an order. Supports age-restriction details for each line item. ### Method POST ### Endpoint /api/orders/{orderId}/lineitems/batch ### Parameters #### Path Parameters - **orderId** (string) - Required - The ID of the order. #### Request Body - **lineItems** (array) - Required - An array of line item objects to be created. - Each object can include: - **isAgeRestricted** (boolean) - Optional - A flag indicating if the line item is age-restricted. - **ageRestrictedType** (string) - Optional - The name of the restriction category for the item. - **minimumAge** (integer) - Optional - The minimum age required to purchase the item. - Other line item fields... ### Response #### Success Response (200 or 201) - **lineItems** (array) - An array of the created line items, including age-restriction details if provided. #### Error Response (400) - **error** (string) - Indicates an error during line item creation. ``` -------------------------------- ### Update Test Merchant Name Source: https://docs.clover.com/reference Send a POST request to update your test merchant's name. Replace `{mId}` with your test merchant ID and `{auth_token}` with your test API token. The new name is provided in the JSON data. ```curl curl --request POST \ --url 'https://apisandbox.dev.clover.com/v3/merchants/{mId}' \ --header 'accept: application/json' \ --header 'authorization: Bearer {auth_token}' \ --data '{"name":"{updated_merchant_name}"}' ```