### Add/Update Subscription Source: https://linked2checkout.com/docs/3.1/introduction Manages customer subscriptions. This allows for recurring billing setups. ```APIDOC ## POST /websites/linked2checkout_3_1/subscription ### Description Adds or updates a customer subscription. This endpoint facilitates the setup and management of recurring billing. ### Method POST ### Endpoint /websites/linked2checkout_3_1/subscription ### Parameters #### Request Body - **customer_id** (string) - Required - The ID of the customer subscribing. - **plan_id** (string) - Required - The ID of the subscription plan. - **start_date** (string) - Required - The date the subscription begins (YYYY-MM-DD). - **billing_interval** (string) - Required - The frequency of billing (e.g., 'monthly', 'yearly'). - **billing_amount** (number) - Required - The amount to be billed per interval. - **next_billing_date** (string) - Optional - The date of the next scheduled billing (YYYY-MM-DD). ### Request Example ```json { "customer_id": "cust_12345xyz", "plan_id": "plan_basic_monthly", "start_date": "2024-02-01", "billing_interval": "monthly", "billing_amount": 25.00, "next_billing_date": "2024-03-01" } ``` ### Response #### Success Response (200) - **subscription_id** (string) - The unique identifier for the created or updated subscription. - **message** (string) - A confirmation message. #### Response Example ```json { "subscription_id": "sub_abcdef123", "message": "Subscription created successfully." } ``` ``` -------------------------------- ### Get Customer Source: https://linked2checkout.com/docs/3.1/introduction Retrieves the details of a specific customer using their unique identifier. ```APIDOC ## GET /websites/linked2checkout_3_1/customer/{customer_id} ### Description Retrieves the details of a specific customer based on their unique customer ID. ### Method GET ### Endpoint /websites/linked2checkout_3_1/customer/{customer_id} ### Parameters #### Path Parameters - **customer_id** (string) - Required - The unique identifier of the customer. ### Response #### Success Response (200) - **customer_id** (string) - The unique identifier of the customer. - **first_name** (string) - The customer's first name. - **last_name** (string) - The customer's last name. - **email** (string) - The customer's email address. - **phone_number** (string) - The customer's phone number. - **notification_preference** (string) - The customer's preferred notification method. - **created_at** (string) - The timestamp when the customer was created. #### Response Example ```json { "customer_id": "cust_12345xyz", "first_name": "Jane", "last_name": "Doe", "email": "jane.doe@example.com", "phone_number": "+15551234567", "notification_preference": "both", "created_at": "2024-01-10T14:00:00Z" } ``` ``` -------------------------------- ### Get Customers Source: https://linked2checkout.com/docs/3.1/introduction Retrieves a list of customers, with options to filter by email or phone number. ```APIDOC ## GET /websites/linked2checkout_3_1/customers ### Description Retrieves a list of customers. Filters can be applied to narrow down the results. ### Method GET ### Endpoint /websites/linked2checkout_3_1/customers ### Parameters #### Query Parameters - **email** (string) - Optional - Filter customers by email address. - **phone_number** (string) - Optional - Filter customers by phone number. - **limit** (integer) - Optional - The maximum number of customers to return. - **offset** (integer) - Optional - The number of customers to skip. ### Response #### Success Response (200) - **customers** (array) - A list of customer objects. - Each customer object contains: **customer_id**, **first_name**, **last_name**, **email**, **phone_number**, **notification_preference**, **created_at**. #### Response Example ```json { "customers": [ { "customer_id": "cust_12345xyz", "first_name": "Jane", "last_name": "Doe", "email": "jane.doe@example.com", "phone_number": "+15551234567", "notification_preference": "both", "created_at": "2024-01-10T14:00:00Z" }, { "customer_id": "cust_67890uvw", "first_name": "John", "last_name": "Smith", "email": "john.smith@example.com", "phone_number": "+15559876543", "notification_preference": "email", "created_at": "2023-11-20T11:00:00Z" } ] } ``` ``` -------------------------------- ### Get Subscription Source: https://linked2checkout.com/docs/3.1/introduction Retrieves the details of a specific subscription using its unique identifier. ```APIDOC ## GET /websites/linked2checkout_3_1/subscription/{subscription_id} ### Description Retrieves the details of a specific subscription based on its unique subscription ID. ### Method GET ### Endpoint /websites/linked2checkout_3_1/subscription/{subscription_id} ### Parameters #### Path Parameters - **subscription_id** (string) - Required - The unique identifier of the subscription. ### Response #### Success Response (200) - **subscription_id** (string) - The unique identifier of the subscription. - **customer_id** (string) - The ID of the customer. - **plan_id** (string) - The ID of the subscription plan. - **start_date** (string) - The start date of the subscription. - **billing_interval** (string) - The frequency of billing. - **billing_amount** (number) - The amount billed per interval ``` -------------------------------- ### Get Invoices Source: https://linked2checkout.com/docs/3.1/introduction Retrieves a list of invoices, with options to filter by site, customer, or status. ```APIDOC ## GET /websites/linked2checkout_3_1/invoices ### Description Retrieves a list of invoices. Filters can be applied to narrow down the results. ### Method GET ### Endpoint /websites/linked2checkout_3_1/invoices ### Parameters #### Query Parameters - **site_id** (string) - Optional - Filter invoices by site ID. - **customer_id** (string) - Optional - Filter invoices by customer ID. - **status** (string) - Optional - Filter invoices by status (e.g., 'paid', 'unpaid', 'overdue'). - **limit** (integer) - Optional - The maximum number of invoices to return. - **offset** (integer) - Optional - The number of invoices to skip. ### Response #### Success Response (200) - **invoices** (array) - A list of invoice objects. - Each invoice object contains: **invoice_id**, **site_id**, **customer_id**, **amount**, **currency**, **due_date**, **status**, **created_at**. #### Response Example ```json { "invoices": [ { "invoice_id": "inv_98765zyx", "site_id": "site_aabbccddeeff", "customer_id": "cust_12345xyz", "amount": 150.75, "currency": "USD", "due_date": "2024-12-31", "status": "unpaid", "created_at": "2024-01-15T10:30:00Z" }, { "invoice_id": "inv_112233abc", "site_id": "site_aabbccddeeff", "customer_id": "cust_67890uvw", "amount": 75.00, "currency": "USD", "due_date": "2024-11-30", "status": "paid", "created_at": "2023-10-25T09:00:00Z" } ] } ``` ``` -------------------------------- ### Get Invoice Source: https://linked2checkout.com/docs/3.1/introduction Retrieves the details of a specific invoice using its unique identifier. ```APIDOC ## GET /websites/linked2checkout_3_1/invoice/{invoice_id} ### Description Retrieves the details of a specific invoice based on its unique invoice ID. ### Method GET ### Endpoint /websites/linked2checkout_3_1/invoice/{invoice_id} ### Parameters #### Path Parameters - **invoice_id** (string) - Required - The unique identifier of the invoice. ### Response #### Success Response (200) - **invoice_id** (string) - The unique identifier of the invoice. - **site_id** (string) - The ID of the site associated with the invoice. - **customer_id** (string) - The ID of the customer. - **amount** (number) - The total amount of the invoice. - **currency** (string) - The currency of the invoice. - **due_date** (string) - The due date of the invoice. - **status** (string) - The current status of the invoice (e.g., 'paid', 'unpaid', 'overdue'). - **created_at** (string) - The timestamp when the invoice was created. #### Response Example ```json { "invoice_id": "inv_98765zyx", "site_id": "site_aabbccddeeff", "customer_id": "cust_12345xyz", "amount": 150.75, "currency": "USD", "due_date": "2024-12-31", "status": "unpaid", "created_at": "2024-01-15T10:30:00Z" } ``` ``` -------------------------------- ### Get Payment Source: https://linked2checkout.com/docs/3.1/introduction Retrieves the details of a specific payment using its unique identifier. ```APIDOC ## GET /websites/linked2checkout_3_1/payment/{payment_id} ### Description Retrieves the details of a specific payment based on its unique payment ID. ### Method GET ### Endpoint /websites/linked2checkout_3_1/payment/{payment_id} ### Parameters #### Path Parameters - **payment_id** (string) - Required - The unique identifier of the payment. ### Response #### Success Response (200) - **payment_id** (string) - The unique identifier of the payment. - **invoice_id** (string) - The ID of the invoice associated with the payment. - **amount** (number) - The amount paid. - **payment_method** (string) - The method used for payment. - **transaction_id** (string) - The transaction ID from the payment provider. - **payment_date** (string) - The date the payment was made. - **status** (string) - The status of the payment (e.g., 'completed', 'refunded', 'voided'). #### Response Example ```json { "payment_id": "pay_1a2b3c4d5e", "invoice_id": "inv_98765zyx", "amount": 150.75, "payment_method": "credit_card", "transaction_id": "txn_abcdef12345", "payment_date": "2024-01-20", "status": "completed" } ``` ``` -------------------------------- ### Get Payments Source: https://linked2checkout.com/docs/3.1/introduction Retrieves a list of payments, with options to filter by invoice, payment method, or date range. ```APIDOC ## GET /websites/linked2checkout_3_1/payments ### Description Retrieves a list of payments. Filters can be applied to narrow down the results. ### Method GET ### Endpoint /websites/linked2checkout_3_1/payments ### Parameters #### Query Parameters - **invoice_id** (string) - Optional - Filter payments by invoice ID. - **payment_method** (string) - Optional - Filter payments by payment method. - **start_date** (string) - Optional - Filter payments from this date (YYYY-MM-DD). - **end_date** (string) - Optional - Filter payments up to this date (YYYY-MM-DD). - **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) - A list of payment objects. - Each payment object contains: **payment_id**, **invoice_id**, **amount**, **payment_method**, **transaction_id**, **payment_date**, **status**. #### Response Example ```json { "payments": [ { "payment_id": "pay_1a2b3c4d5e", "invoice_id": "inv_98765zyx", "amount": 150.75, "payment_method": "credit_card", "transaction_id": "txn_abcdef12345", "payment_date": "2024-01-20", "status": "completed" }, { "payment_id": "pay_6f7e8d9c0b", "invoice_id": "inv_112233abc", "amount": 75.00, "payment_method": "bank_transfer", "transaction_id": "txn_ghijkl67890", "payment_date": "2023-10-25", "status": "completed" } ] } ``` ``` -------------------------------- ### Add/Update Site Source: https://linked2checkout.com/docs/3.1/introduction Used to create or update a Site, representing a unique business location or merchant ID. Sites can belong to Site Groups and Site Enterprises but must belong to an Agency. ```APIDOC ## POST /websites/linked2checkout_3_1/onboarding/site ### Description Creates or updates a Site. A Site represents a unique business location or merchant ID. It can belong to a Site Group and Site Enterprise, but must belong to an Agency. ### Method POST ### Endpoint /websites/linked2checkout_3_1/onboarding/site ### Parameters #### Request Body - **name** (string) - Required - The name of the Site. - **agency_id** (string) - Required - The ID of the Agency this site belongs to. - **group_id** (string) - Optional - The ID of the Site Group this site belongs to. - **enterprise_id** (string) - Optional - The ID of the Site Enterprise this site belongs to. - **description** (string) - Optional - A description for the Site. ### Request Example ```json { "name": "Downtown Branch", "agency_id": "agn_112233", "group_id": "grp_67890def", "enterprise_id": "ent_12345abc", "description": "Main downtown business location." } ``` ### Response #### Success Response (200) - **site_id** (string) - The unique identifier for the created or updated Site. - **message** (string) - A confirmation message. #### Response Example ```json { "site_id": "site_aabbccddeeff", "message": "Site created successfully." } ``` ``` -------------------------------- ### Add/Update Site Enterprise Source: https://linked2checkout.com/docs/3.1/introduction Allows for the creation and management of Site Enterprises, which can organize multiple Site Groups and Sites under a single entity. ```APIDOC ## POST /websites/linked2checkout_3_1/onboarding/site_enterprise ### Description Creates or updates a Site Enterprise. Site Enterprises are optional and used to group multiple Site Groups and Sites. ### Method POST ### Endpoint /websites/linked2checkout_3_1/onboarding/site_enterprise ### Parameters #### Request Body - **name** (string) - Required - The name of the Site Enterprise. - **description** (string) - Optional - A description for the Site Enterprise. ### Request Example ```json { "name": "Example Enterprise", "description": "A top-level organization for multiple sites." } ``` ### Response #### Success Response (200) - **enterprise_id** (string) - The unique identifier for the created or updated Site Enterprise. - **message** (string) - A confirmation message. #### Response Example ```json { "enterprise_id": "ent_12345abc", "message": "Site Enterprise created successfully." } ``` ``` -------------------------------- ### Refund Payment Source: https://linked2checkout.com/docs/3.1/introduction Initiates a refund for a previously made payment. This endpoint handles the process of returning funds to the customer. ```APIDOC ## POST /websites/linked2checkout_3_1/payment/refund ### Description Initiates a refund for a payment. This endpoint processes the return of funds to the customer. ### Method POST ### Endpoint /websites/linked2checkout_3_1/payment/refund ### Parameters #### Request Body - **payment_id** (string) - Required - The ID of the payment to refund. - **amount** (number) - Required - The amount to refund. - **reason** (string) - Optional - The reason for the refund. ### Request Example ```json { "payment_id": "pay_1a2b3c4d5e", "amount": 100.00, "reason": "Customer returned item." } ``` ### Response #### Success Response (200) - **refund_id** (string) - The unique identifier for the refund transaction. - **message** (string) - A confirmation message. #### Response Example ```json { "refund_id": "ref_fedcba54321", "message": "Refund processed successfully." } ``` ``` -------------------------------- ### Add/Update Site Group Source: https://linked2checkout.com/docs/3.1/introduction Enables the creation and management of Site Groups, which can organize multiple Sites under a single entity. Site Groups are optional. ```APIDOC ## POST /websites/linked2checkout_3_1/onboarding/site_group ### Description Creates or updates a Site Group. Site Groups are optional and can organize multiple Sites. They can optionally belong to a Site Enterprise. ### Method POST ### Endpoint /websites/linked2checkout_3_1/onboarding/site_group ### Parameters #### Request Body - **name** (string) - Required - The name of the Site Group. - **enterprise_id** (string) - Optional - The ID of the Site Enterprise this group belongs to. - **description** (string) - Optional - A description for the Site Group. ### Request Example ```json { "name": "West Coast Group", "enterprise_id": "ent_12345abc", "description": "Group for all West Coast locations." } ``` ### Response #### Success Response (200) - **group_id** (string) - The unique identifier for the created or updated Site Group. - **message** (string) - A confirmation message. #### Response Example ```json { "group_id": "grp_67890def", "message": "Site Group created successfully." } ``` ``` -------------------------------- ### Add/Update Customer Source: https://linked2checkout.com/docs/3.1/introduction Adds or updates customer information. This includes details necessary for sending payment requests and notifications. ```APIDOC ## POST /websites/linked2checkout_3_1/customer ### Description Adds or updates customer information. This endpoint is used to manage customer details required for payment processing and communication. ### Method POST ### Endpoint /websites/linked2checkout_3_1/customer ### Parameters #### Request Body - **first_name** (string) - Required - The customer's first name. - **last_name** (string) - Required - The customer's last name. - **email** (string) - Required - The customer's email address. - **phone_number** (string) - Optional - The customer's phone number. - **notification_preference** (string) - Optional - Preferred notification method ('email', 'sms', 'both'). Defaults to 'email'. ### Request Example ```json { "first_name": "Jane", "last_name": "Doe", "email": "jane.doe@example.com", "phone_number": "+15551234567", "notification_preference": "both" } ``` ### Response #### Success Response (200) - **customer_id** (string) - The unique identifier for the created or updated customer. - **message** (string) - A confirmation message. #### Response Example ```json { "customer_id": "cust_12345xyz", "message": "Customer created successfully." } ``` ``` -------------------------------- ### Send Invoice Source: https://linked2checkout.com/docs/3.1/introduction Manually sends an existing invoice to the customer. This is useful if automatic notification was not triggered or needs to be resent. ```APIDOC ## POST /websites/linked2checkout_3_1/invoice/send ### Description Manually sends an invoice to the customer. This endpoint can be used to resend an invoice or send it if automatic notification failed. ### Method POST ### Endpoint /websites/linked2checkout_3_1/invoice/send ### Parameters #### Request Body - **invoice_id** (string) - Required - The ID of the invoice to send. ### Request Example ```json { "invoice_id": "inv_98765zyx" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the invoice has been sent. #### Response Example ```json { "message": "Invoice sent successfully to the customer." } ``` ``` -------------------------------- ### Add/Update Payment Source: https://linked2checkout.com/docs/3.1/introduction Records a payment made against an invoice. This can be used to mark an invoice as paid. ```APIDOC ## POST /websites/linked2checkout_3_1/payment ### Description Records a payment transaction. This is typically used to mark an invoice as paid or to record a payment made outside the standard payment request flow. ### Method POST ### Endpoint /websites/linked2checkout_3_1/payment ### Parameters #### Request Body - **invoice_id** (string) - Required - The ID of the invoice this payment is for. - **amount** (number) - Required - The amount paid. - **payment_method** (string) - Required - The method used for payment (e.g., 'credit_card', 'bank_transfer', 'cash'). - **transaction_id** (string) - Optional - A unique identifier for the payment transaction from the payment provider. - **payment_date** (string) - Optional - The date the payment was made (YYYY-MM-DD). ### Request Example ```json { "invoice_id": "inv_98765zyx", "amount": 150.75, "payment_method": "credit_card", "transaction_id": "txn_abcdef12345", "payment_date": "2024-01-20" } ``` ### Response #### Success Response (200) - **payment_id** (string) - The unique identifier for the recorded payment. - **message** (string) - A confirmation message. #### Response Example ```json { "payment_id": "pay_1a2b3c4d5e", "message": "Payment recorded successfully." } ``` ``` -------------------------------- ### Add/Update Invoice Source: https://linked2checkout.com/docs/3.1/introduction Adds or updates an invoice within the linked2checkout application. When an invoice is added, a payment request is automatically generated and the customer is notified. ```APIDOC ## POST /websites/linked2checkout_3_1/invoice ### Description Adds or updates an invoice. Upon creation, a payment request is automatically generated and the customer is notified via text, email, or both based on their notification preferences. ### Method POST ### Endpoint /websites/linked2checkout_3_1/invoice ### Parameters #### Request Body - **site_id** (string) - Required - The ID of the site associated with this invoice. - **customer_id** (string) - Required - The ID of the customer to whom the invoice is issued. - **amount** (number) - Required - The total amount of the invoice. - **currency** (string) - Required - The currency of the invoice (e.g., 'USD', 'EUR'). - **due_date** (string) - Required - The date the invoice is due (YYYY-MM-DD). - **description** (string) - Optional - A description for the invoice. ### Request Example ```json { "site_id": "site_aabbccddeeff", "customer_id": "cust_12345xyz", "amount": 150.75, "currency": "USD", "due_date": "2024-12-31", "description": "Monthly service fee" } ``` ### Response #### Success Response (200) - **invoice_id** (string) - The unique identifier for the created or updated invoice. - **payment_request_id** (string) - The ID of the generated payment request. - **message** (string) - A confirmation message. #### Response Example ```json { "invoice_id": "inv_98765zyx", "payment_request_id": "prq_abc123def", "message": "Invoice created and payment request generated." } ``` ``` -------------------------------- ### Void Payment Source: https://linked2checkout.com/docs/3.1/introduction Voids a previously recorded payment. This is typically used for erroneous or fraudulent transactions. ```APIDOC ## POST /websites/linked2checkout_3_1/payment/void ### Description Voids a recorded payment. This action should be used with caution and typically requires specific permissions or reasons. ### Method POST ### Endpoint /websites/linked2checkout_3_1/payment/void ### Parameters #### Request Body - **payment_id** (string) - Required - The ID of the payment to void. - **reason** (string) - Required - The reason for voiding the payment. ### Request Example ```json { "payment_id": "pay_1a2b3c4d5e", "reason": "Duplicate transaction recorded in error." } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the payment has been voided. #### Response Example ```json { "message": "Payment voided successfully." } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.