### Get Products Source: https://dev-pymts.zilver.com/docs/index Retrieves a list of available products. ```APIDOC ## GET /_api/PublicApi/GetProducts ### Description Retrieves a list of available products. ### Method GET ### Endpoint /_api/PublicApi/GetProducts ### Parameters #### Query Parameters * **query** (string) - Optional - Search query for products. ### Response #### Success Response (200) - **products** (array) - A list of product objects. - **id** (string) - The unique identifier for the product. - **name** (string) - The name of the product. - **description** (string) - A detailed description of the product. - **price** (number) - The price of the product. - **currency** (string) - The currency of the product price. #### Response Example { "products": [ { "id": "prod_123", "name": "Example Product", "description": "A sample product for demonstration purposes.", "price": 99.99, "currency": "USD" } ] } ``` -------------------------------- ### Create Product API Request Example (cURL) Source: https://dev-pymts.zilver.com/docs/CreateProduct Demonstrates how to create a new product using a cURL request to the `/_api/PublicApi/CreateProduct` endpoint. This example includes setting product name, pricing type, amount, currency, billing period, and tax inclusive status. It requires an Authorization header with a bearer token and a JSON payload. ```curl curl -X POST "https://api.yourdomain.com/_api/PublicApi/CreateProduct" \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "name": "Premium Plan", "pricingType": "recurring", "amount": 2999, "currency": "USD", "billingPeriod": "monthly", "taxInclusive": false }' ``` -------------------------------- ### Create Checkout Session with Ad-Hoc Product (cURL) Source: https://dev-pymts.zilver.com/docs/CreateCheckoutSession Example of creating a checkout session for an ad-hoc product definition via a cURL request. This includes detailed product information like name, description, pricing, and tax. ```curl curl -X POST "https://api.yourdomain.com/_api/PublicApi/CreateCheckoutSession" \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "adHocProduct": { "name": "Custom Consultation", "description": "One hour consultation", "imageUrl": "https://example.com/image.png", "pricingType": "one_time", "amount": 15000, "currency": "USD", "taxInclusive": true, "taxPrice": 0, "taxType": "fixed" }, "processor": "fluidpay", "successUrl": "https://your-site.com/success" }' ``` -------------------------------- ### Retrieve All Products using cURL Source: https://dev-pymts.zilver.com/docs/GetProducts This snippet demonstrates how to retrieve all products for a given workspace using the GetProducts API endpoint with a cURL request. It includes authorization and an example payload for limiting results. ```bash curl -X GET "https://api.yourdomain.com/_api/PublicApi/GetProducts?payload=%7B%22limit%22%3A10%7D" \ -H "Authorization: Bearer sk_live_..." ``` -------------------------------- ### GET /_api/PublicApi/GetProducts Source: https://dev-pymts.zilver.com/docs/GetProducts Retrieve all products for the workspace associated with the API key. Returns products matching the environment of the key. ```APIDOC ## GET /_api/PublicApi/GetProducts ### Description Retrieve all products for the workspace associated with the API key. Returns products matching the environment of the key. ### Method GET ### Endpoint `/_api/PublicApi/GetProducts` ### Parameters #### Query Parameters - **payload** (string) - Optional - JSON encoded object. Schema: { "type": "object", "properties": { "limit": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "cursor": { "type": "string" } }, "additionalProperties": false } ### Request Example ```curl curl -X GET "https://api.yourdomain.com/_api/PublicApi/GetProducts?payload=%7B%22limit%22%3A10%7D" \ -H "Authorization: Bearer sk_live_..." ``` ### Response #### Success Response (200) - **products** (array) - List of products. - **nextCursor** (string) - Cursor for the next page of results. #### Response Example ```json { "products": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "workspaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "description": "string", "imageUrl": "string", "pricingType": "recurring", "amount": 0, "currency": "str", "billingPeriod": "daily", "taxInclusive": true, "taxPrice": 0, "taxType": "fixed", "isTest": false, "createdAt": "2026-01-06T00:55:14.964Z", "updatedAt": "2026-01-06T00:55:14.964Z" } ], "nextCursor": "string" } ``` ``` -------------------------------- ### Create Checkout Session with Existing Product (cURL) Source: https://dev-pymts.zilver.com/docs/CreateCheckoutSession Example of creating a checkout session using an existing product ID via a cURL request. It specifies the product, processor, and return URLs. ```curl curl -X POST "https://api.yourdomain.com/_api/PublicApi/CreateCheckoutSession" \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "productId": "prod_123...", "processor": "stripe", "successUrl": "https://your-site.com/success", "cancelUrl": "https://your-site.com/cancel" }' ``` -------------------------------- ### Get Transactions Source: https://dev-pymts.zilver.com/docs/index Retrieves a list of transactions. ```APIDOC ## GET /_api/PublicApi/GetTransactions ### Description Retrieves a list of transactions. ### Method GET ### Endpoint /_api/PublicApi/GetTransactions ### Parameters #### Query Parameters * **limit** (integer) - Optional - The maximum number of transactions to return. Defaults to 10. * **offset** (integer) - Optional - The number of transactions to skip. Defaults to 0. * **status** (string) - Optional - Filter transactions by status (e.g., 'completed', 'failed'). ### Response #### Success Response (200) - **transactions** (array) - A list of transaction objects. - **id** (string) - The unique identifier for the transaction. - **amount** (number) - The transaction amount. - **currency** (string) - The currency of the transaction. - **status** (string) - The status of the transaction. - **createdAt** (string) - The timestamp when the transaction was created. #### Response Example { "transactions": [ { "id": "txn_789", "amount": 50.00, "currency": "USD", "status": "completed", "createdAt": "2023-10-27T10:00:00Z" } ] } ``` -------------------------------- ### Process Payment - cURL Request (Existing Product) Source: https://dev-pymts.zilver.com/docs/ProcessPayment Example cURL request for processing a payment with an existing product using the ProcessPayment endpoint. It demonstrates the required headers and JSON payload, including product ID, processor, contact information, credit card details, and billing address. ```curl curl -X POST "https://api.yourdomain.com/_api/PublicApi/ProcessPayment" \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "productId": "prod_123...", "processor": "nmi", "contactInfo": { "email": "customer@example.com", "name": "John Doe" }, "creditCard": { "number": "4111111111111111", "expiry": "12/25", "cvc": "123" }, "billingAddress": { "addressLine1": "123 Main St", "city": "New York", "state": "NY", "postalCode": "10001", "country": "US" } }' ``` -------------------------------- ### Get Transactions API Request (cURL) Source: https://dev-pymts.zilver.com/docs/GetTransactions This snippet demonstrates how to make a GET request to the GetTransactions endpoint using cURL. It shows how to include the authorization header and pass query parameters, such as 'limit', which is JSON encoded. ```curl curl -X GET "https://api.yourdomain.com/_api/PublicApi/GetTransactions?payload=%7B%22limit%22%3A10%7D" \ -H "Authorization: Bearer sk_live_..." ``` -------------------------------- ### Process Payment - cURL Request (Ad-Hoc Product) Source: https://dev-pymts.zilver.com/docs/ProcessPayment Example cURL request for processing a payment with an ad-hoc product using the ProcessPayment endpoint. This showcases how to define a product directly within the request payload, including its name, description, pricing, currency, and tax information, alongside other transaction details. ```curl curl -X POST "https://api.yourdomain.com/_api/PublicApi/ProcessPayment" \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "adHocProduct": { "name": "Custom Service", "description": "Special service charge", "pricingType": "one_time", "amount": 5000, "currency": "USD", "taxInclusive": false }, "processor": "authorize_net", "contactInfo": { "email": "customer@example.com", "name": "Jane Doe" }, "creditCard": { "number": "4111111111111111", "expiry": "12/25", "cvc": "123" }, "billingAddress": { "addressLine1": "123 Main St", "city": "New York", "state": "NY", "postalCode": "10001", "country": "US" } }' ``` -------------------------------- ### GET /_api/PublicApi/GetTransactions Source: https://dev-pymts.zilver.com/docs/GetTransactions Retrieves a paginated list of transactions from the local database for the workspace associated with the API key. Returns transactions matching the environment of the key. ```APIDOC ## GET /_api/PublicApi/GetTransactions ### Description Retrieve a paginated list of transactions for the workspace. ### Method GET ### Endpoint `/_api/PublicApi/GetTransactions` ### Parameters #### Query Parameters - **payload** (string) - Required - JSON encoded object. Schema: { "type": "object", "properties": { "limit": { "type": "number", "minimum": 1, "maximum": 100, "default": 20 }, "cursor": { "type": "string" } }, "additionalProperties": false } ### Request Example ``` curl -X GET "https://api.yourdomain.com/_api/PublicApi/GetTransactions?payload=%7B%22limit%22%3A10%7D" \ -H "Authorization: Bearer sk_live_..." ``` ### Response #### Success Response (200) - **transactions** (array) - List of transaction objects. - **nextCursor** (string) - A cursor for paginating the next set of results. #### Response Example ```json { "transactions": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "workspaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "processor": { "id": "fluidpay", "name": "string", "logoUrl": "string" }, "externalId": "string", "orderNumber": "string", "isTest": false, "customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "customer": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string" }, "amount": 0, "originalAmount": 0, "discountAmount": 0, "taxAmount": 0, "subtotalAmount": 0, "refundedAmount": 0, "currency": "str", "status": "string", "type": "string", "paymentMethodId": "string", "cardBrand": "string", "cardLast4": "string", "cardExpirationDate": "string", "description": "string", "subscriptionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "productName": "string", "items": [ { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "productName": "string", "quantity": 1, "amount": 0, "totalAmount": 0, "type": "primary" } ], "discountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "discountCode": "string", "discountDuration": "once", "billingAddress": { "id": "string", "firstName": "string", "lastName": "string", "company": "string", "addressLine1": "string", "addressLine2": "string", "city": "string", "state": "string", "postalCode": "string", "country": "string", "email": "string", "phone": "string", "fax": "string" }, "shippingAddress": { "id": "string", "firstName": "string", "lastName": "string", "company": "string", "addressLine1": "string", "addressLine2": "string", "city": "string", "state": "string", "postalCode": "string", "country": "string", "email": "string", "phone": "string", "fax": "string" }, "metadata": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" }, "createdAt": "2026-01-06T00:55:15.202Z", "isRelated": true } ], "nextCursor": "string" } ``` ``` -------------------------------- ### UpdateProduct API Request Example (cURL) Source: https://dev-pymts.zilver.com/docs/UpdateProduct This snippet demonstrates how to update an existing product using the Paysio Public API via a cURL command. It specifies the endpoint, HTTP method, headers for authorization and content type, and the JSON payload containing the product's ID and updated fields. ```curl curl -X POST "https://api.yourdomain.com/_api/PublicApi/UpdateProduct" \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "id": "prod_123...", "name": "Updated Plan Name", "amount": 3500 }' ``` -------------------------------- ### Create Product Source: https://dev-pymts.zilver.com/docs/index Creates a new product in the system. ```APIDOC ## POST /_api/PublicApi/CreateProduct ### Description Creates a new product in the system. ### Method POST ### Endpoint /_api/PublicApi/CreateProduct ### Parameters #### Request Body - **product** (object) - Required - The details of the product to create. - **name** (string) - Required - The name of the product. - **description** (string) - Optional - A detailed description of the product. - **price** (number) - Required - The price of the product. - **currency** (string) - Required - The currency of the product price. ### Request Example { "product": { "name": "New Gadget", "description": "The latest innovation in personal technology.", "price": 199.50, "currency": "EUR" } } ### Response #### Success Response (200) - **productId** (string) - The unique identifier of the newly created product. #### Response Example { "productId": "prod_456" } ``` -------------------------------- ### Create Checkout Session Source: https://dev-pymts.zilver.com/docs/index Creates a checkout session for a product. ```APIDOC ## POST /_api/PublicApi/CreateCheckoutSession ### Description Creates a checkout session for a product. ### Method POST ### Endpoint /_api/PublicApi/CreateCheckoutSession ### Parameters #### Request Body - **checkoutRequest** (object) - Required - Details for creating the checkout session. - **productId** (string) - Required - The ID of the product for which to create a session. - **quantity** (integer) - Optional - The quantity of the product. Defaults to 1. - **successUrl** (string) - Required - The URL to redirect to upon successful payment. - **cancelUrl** (string) - Required - The URL to redirect to if the payment is cancelled. ### Request Example { "checkoutRequest": { "productId": "prod_123", "quantity": 2, "successUrl": "https://example.com/success", "cancelUrl": "https://example.com/cancel" } } ### Response #### Success Response (200) - **sessionId** (string) - The unique identifier for the checkout session. - **paymentUrl** (string) - The URL where the user can complete the payment. #### Response Example { "sessionId": "sess_abc", "paymentUrl": "https://paysio.com/pay?session_id=sess_abc" } ``` -------------------------------- ### POST /_api/PublicApi/CreateCheckoutSession Source: https://dev-pymts.zilver.com/docs/CreateCheckoutSession Initiates a trackable checkout session. This endpoint supports creating sessions for either existing products (using `productId`) or ad-hoc product definitions. It returns a unique checkout URL and a session ID for completing the payment. The specified `processor` must be stored and honored throughout the checkout flow. ```APIDOC ## POST /_api/PublicApi/CreateCheckoutSession ### Description Initiate a trackable checkout session. Supports either an existing product (via productId) or an ad-hoc product definition. Returns a unique checkout URL and session ID. The `processor` specified in the input MUST be stored and strictly honored during the checkout flow, overriding any workspace default processor settings. ### Method POST ### Endpoint `/_api/PublicApi/CreateCheckoutSession` ### Parameters #### Query Parameters No query parameters are documented for this endpoint. #### Request Body - **productId** (string) - Optional - The ID of an existing product. - **adHocProduct** (object) - Optional - Defines an ad-hoc product for the checkout session. - **name** (string) - Required - The name of the ad-hoc product. - **description** (string) - Optional - A description of the ad-hoc product. - **imageUrl** (string) - Optional - URL for an image representing the ad-hoc product. - **pricingType** (string) - Required - The pricing model (e.g., "one_time", "recurring"). - **amount** (integer) - Required - The price amount in the smallest currency unit (e.g., cents). - **currency** (string) - Required - The currency code (e.g., "USD"). - **billingPeriod** (string) - Optional - The billing period for recurring payments (e.g., "daily", "monthly"). - **taxInclusive** (boolean) - Optional - Indicates if taxes are included in the price. - **taxPrice** (integer) - Optional - The amount of tax to be applied. - **taxType** (string) - Optional - The type of tax (e.g., "fixed"). - **processor** (string) - Optional - The payment processor to use (e.g., "stripe", "fluidpay", "nmi", "authorize.net"). Defaults to workspace settings if omitted. - **successUrl** (string) - Required - The URL to redirect to upon successful payment. - **cancelUrl** (string) - Optional - The URL to redirect to if the payment is canceled. - **metadata** (object) - Optional - Additional key-value pairs to associate with the session. ### Request Example (Existing Product) ```curl curl -X POST "https://api.yourdomain.com/_api/PublicApi/CreateCheckoutSession" \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "productId": "prod_123...", "processor": "stripe", "successUrl": "https://your-site.com/success", "cancelUrl": "https://your-site.com/cancel" }' ``` ### Request Example (Ad-Hoc Product) ```curl curl -X POST "https://api.yourdomain.com/_api/PublicApi/CreateCheckoutSession" \ -H "Authorization: Bearer sk_live_..." \ -H "Content-Type: application/json" \ -d '{ "adHocProduct": { "name": "Custom Consultation", "description": "One hour consultation", "imageUrl": "https://example.com/image.png", "pricingType": "one_time", "amount": 15000, "currency": "USD", "taxInclusive": true, "taxPrice": 0, "taxType": "fixed" }, "processor": "fluidpay", "successUrl": "https://your-site.com/success" }' ``` ### Response #### Success Response (200) - **checkoutUrl** (string) - The URL for the hosted checkout page. - **sessionId** (string) - The unique identifier for the created checkout session. #### Response Example ```json { "checkoutUrl": "https://app.yourdomain.com/checkout/sess_123...", "sessionId": "sess_123..." } ``` ``` -------------------------------- ### POST /_api/PublicApi/CreateProduct Source: https://dev-pymts.zilver.com/docs/CreateProduct Allows for the creation of a new product within your workspace. This product will be created in the environment associated with your API key. ```APIDOC ## POST /_api/PublicApi/CreateProduct ### Description Create a new product in the workspace associated with the API key. The product is created in the environment of the key. ### Method POST ### Endpoint `/_api/PublicApi/CreateProduct` ### Parameters #### Path Parameters No path parameters. #### Query Parameters No query parameters. #### Request Body - **name** (string) - Required - The name of the product. - **description** (string) - Optional - A description for the product. - **imageUrl** (string) - Optional - URL for an image representing the product. - **pricingType** (string) - Required - The type of pricing (e.g., 'recurring'). - **amount** (integer) - Required - The price amount. - **currency** (string) - Required - The currency code (e.g., 'USD'). - **billingPeriod** (string) - Required - The billing period (e.g., 'monthly'). - **taxInclusive** (boolean) - Required - Whether the price is tax-inclusive. - **taxPrice** (integer) - Optional - The tax price. - **taxType** (string) - Optional - The type of tax (e.g., 'fixed'). ### Request Example ```json { "name": "Premium Plan", "pricingType": "recurring", "amount": 2999, "currency": "USD", "billingPeriod": "monthly", "taxInclusive": false } ``` ### Response #### Success Response (200) - **product** (object) - Contains details of the created product. - **id** (string) - The unique identifier of the product. - **workspaceId** (string) - The ID of the workspace the product belongs to. - **name** (string) - The name of the product. - **description** (string) - The description of the product. - **imageUrl** (string) - The URL of the product image. - **pricingType** (string) - The type of pricing. - **amount** (integer) - The price amount. - **currency** (string) - The currency code. - **billingPeriod** (string) - The billing period. - **taxInclusive** (boolean) - Indicates if the price is tax-inclusive. - **taxPrice** (integer) - The tax price. - **taxType** (string) - The type of tax. - **isTest** (boolean) - Indicates if the product is in test mode. - **createdAt** (string) - The timestamp when the product was created. - **updatedAt** (string) - The timestamp when the product was last updated. #### Response Example ```json { "product": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "workspaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "description": "string", "imageUrl": "string", "pricingType": "recurring", "amount": 0, "currency": "str", "billingPeriod": "daily", "taxInclusive": true, "taxPrice": 0, "taxType": "fixed", "isTest": false, "createdAt": "2026-01-06T00:55:14.826Z", "updatedAt": "2026-01-06T00:55:14.826Z" } } ``` ``` -------------------------------- ### Update Product Source: https://dev-pymts.zilver.com/docs/index Updates an existing product. ```APIDOC ## POST /_api/PublicApi/UpdateProduct ### Description Updates an existing product. ### Method POST ### Endpoint /_api/PublicApi/UpdateProduct ### Parameters #### Request Body - **productUpdate** (object) - Required - The details for updating the product. - **productId** (string) - Required - The ID of the product to update. - **name** (string) - Optional - The new name of the product. - **description** (string) - Optional - The new description of the product. - **price** (number) - Optional - The new price of the product. - **currency** (string) - Optional - The new currency of the product price. ### Request Example { "productUpdate": { "productId": "prod_123", "price": 109.99, "currency": "USD" } } ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the product was updated. #### Response Example { "message": "Product prod_123 updated successfully." } ``` -------------------------------- ### Product Request Body Schema (JSON) Source: https://dev-pymts.zilver.com/docs/CreateProduct Defines the JSON schema for the request body required by the `CreateProduct` endpoint. It outlines the fields for product creation, including name, description, pricing details (type, amount, currency, billing period), and tax information. Optional fields like imageUrl and taxPrice are also specified. ```json { "name": "string", "description": "string", "imageUrl": "string", "pricingType": "recurring", "amount": 0, "currency": "str", "billingPeriod": "daily", "taxInclusive": true, "taxPrice": 0, "taxType": "fixed" } ``` -------------------------------- ### Successful Product Creation Response Schema (JSON) Source: https://dev-pymts.zilver.com/docs/CreateProduct Presents the JSON schema for a successful response from the `CreateProduct` endpoint. It details the structure of the 'product' object returned, including its unique ID, workspace ID, name, pricing and billing configuration, tax details, creation and update timestamps, and a flag indicating if it's a test product. ```json { "product": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "workspaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "description": "string", "imageUrl": "string", "pricingType": "recurring", "amount": 0, "currency": "str", "billingPeriod": "daily", "taxInclusive": true, "taxPrice": 0, "taxType": "fixed", "isTest": false, "createdAt": "2026-01-06T00:55:14.826Z", "updatedAt": "2026-01-06T00:55:14.826Z" } } ``` -------------------------------- ### Create Checkout Session Request Body Schema Source: https://dev-pymts.zilver.com/docs/CreateCheckoutSession Defines the structure of the JSON request body for the CreateCheckoutSession endpoint, detailing fields for existing products, ad-hoc products, processor selection, and URLs. ```json { "productId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "adHocProduct": { "name": "string", "description": "string", "imageUrl": "string", "pricingType": "recurring", "amount": 0, "currency": "str", "billingPeriod": "daily", "taxInclusive": true, "taxPrice": 0, "taxType": "fixed" }, "processor": "stripe", "successUrl": "string", "cancelUrl": "string", "metadata": { "additionalProp1": "string", "additionalProp2": "string", "additionalProp3": "string" } } ``` -------------------------------- ### Process Payment Source: https://dev-pymts.zilver.com/docs/index Processes a payment for a given order. ```APIDOC ## POST /_api/PublicApi/ProcessPayment ### Description Processes a payment for a given order. ### Method POST ### Endpoint /_api/PublicApi/ProcessPayment ### Parameters #### Request Body - **paymentDetails** (object) - Required - The details required to process the payment. - **orderId** (string) - Required - The ID of the order to pay for. - **paymentMethodToken** (string) - Required - A token representing the customer's payment method. - **amount** (number) - Required - The amount to charge. - **currency** (string) - Required - The currency for the payment. ### Request Example { "paymentDetails": { "orderId": "order_xyz", "paymentMethodToken": "tok_valid123", "amount": 75.25, "currency": "GBP" } } ### Response #### Success Response (200) - **transactionId** (string) - The unique identifier of the processed transaction. - **status** (string) - The status of the payment (e.g., 'succeeded', 'pending'). #### Response Example { "transactionId": "txn_abc", "status": "succeeded" } ``` -------------------------------- ### POST /_api/PublicApi/UpdateProduct Source: https://dev-pymts.zilver.com/docs/UpdateProduct Updates an existing product in the workspace associated with the API key. The product must exist in the environment of the key. ```APIDOC ## POST /_api/PublicApi/UpdateProduct ### Description Update an existing product in the workspace associated with the API key. The product must exist in the environment of the key. ### Method POST ### Endpoint `/_api/PublicApi/UpdateProduct` ### Parameters #### Query Parameters No query parameters. #### Request Body - **id** (string) - Required - The unique identifier of the product to update. - **name** (string) - Optional - The new name for the product. - **description** (string) - Optional - The new description for the product. - **imageUrl** (string) - Optional - The URL for the product's image. - **pricingType** (string) - Optional - The pricing type (e.g., "recurring"). - **amount** (number) - Optional - The price of the product. - **currency** (string) - Optional - The currency of the price (e.g., "USD"). - **billingPeriod** (string) - Optional - The billing period for recurring products (e.g., "daily"). - **taxInclusive** (boolean) - Optional - Whether taxes are included in the price. - **taxPrice** (number) - Optional - The tax amount. - **taxType** (string) - Optional - The type of tax (e.g., "fixed"). ### Request Example ```json { "id": "prod_123...", "name": "Updated Plan Name", "amount": 3500 } ``` ### Response #### Success Response (200) - **product** (object) - Contains details of the updated product. - **id** (string) - The unique identifier of the product. - **workspaceId** (string) - The identifier of the workspace. - **name** (string) - The name of the product. - **description** (string) - The description of the product. - **imageUrl** (string) - The URL for the product's image. - **pricingType** (string) - The pricing type. - **amount** (number) - The price of the product. - **currency** (string) - The currency of the price. - **billingPeriod** (string) - The billing period. - **taxInclusive** (boolean) - Indicates if taxes are inclusive. - **taxPrice** (number) - The tax amount. - **taxType** (string) - The type of tax. - **isTest** (boolean) - Indicates if it's a test product. - **createdAt** (string) - The timestamp when the product was created. - **updatedAt** (string) - The timestamp when the product was last updated. #### Response Example ```json { "product": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "workspaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "description": "string", "imageUrl": "string", "pricingType": "recurring", "amount": 0, "currency": "str", "billingPeriod": "daily", "taxInclusive": true, "taxPrice": 0, "taxType": "fixed", "isTest": false, "createdAt": "2026-01-06T00:55:15.366Z", "updatedAt": "2026-01-06T00:55:15.366Z" } } ``` ``` -------------------------------- ### Create Checkout Session Response Body Schema Source: https://dev-pymts.zilver.com/docs/CreateCheckoutSession Defines the structure of the JSON response body for a successful CreateCheckoutSession request, containing the generated checkout URL and session ID. ```json { "checkoutUrl": "string", "sessionId": "string" } ``` -------------------------------- ### POST /_api/PublicApi/ProcessPayment Source: https://dev-pymts.zilver.com/docs/ProcessPayment Processes payments directly via server-to-server integration. This endpoint supports FluidPay, NMI, and Authorize.net. Stripe is not supported due to PCI compliance. ```APIDOC ## POST /_api/PublicApi/ProcessPayment ### Description Processes payments directly via server-to-server integration. This endpoint supports FluidPay, NMI, and Authorize.net. Stripe is not supported due to PCI compliance requirements. ### Method POST ### Endpoint `/_api/PublicApi/ProcessPayment` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **productId** (string) - Optional - The ID of an existing product to charge. - **adHocProduct** (object) - Optional - Defines a product on the fly for a one-time charge. Requires `name`, `amount`, and `currency`. - `name` (string) - Required - Name of the ad-hoc product. - `description` (string) - Optional - Description of the ad-hoc product. - `imageUrl` (string) - Optional - URL for an image of the product. - `pricingType` (string) - Required - Type of pricing (e.g., `one_time`, `recurring`). - `amount` (integer) - Required - The price of the product in the smallest currency unit (e.g., cents for USD). - `currency` (string) - Required - The currency code (e.g., `USD`). - `billingPeriod` (string) - Optional - The billing period if `pricingType` is `recurring` (e.g., `daily`, `weekly`, `monthly`, `yearly`). - `taxInclusive` (boolean) - Optional - Whether the price includes tax. - `taxPrice` (integer) - Optional - The tax amount. - `taxType` (string) - Optional - The type of tax (e.g., `fixed`, `percentage`). - **processor** (string) - Optional - Specifies the payment processor to use (e.g., `nmi`, `authorize_net`, `fluidpay`). Defaults to workspace configuration if not provided. - **creditCard** (object) - Required - Details of the credit card to be charged. - `number` (string) - Required - The credit card number. - `expiry` (string) - Required - The expiration date in MM/YY format (e.g., `12/25`). - `cvc` (string) - Required - The card verification code. - **contactInfo** (object) - Optional - Customer's contact information. - `email` (string) - Required - Customer's email address. - `name` (string) - Optional - Customer's full name. - `phone` (string) - Optional - Customer's phone number. - **billingAddress** (object) - Optional - The billing address for the transaction. - `firstName` (string) - Optional. - `lastName` (string) - Optional. - `company` (string) - Optional. - `addressLine1` (string) - Required - Street address. - `addressLine2` (string) - Optional - Apartment, suite, etc. - `city` (string) - Required - City name. - `state` (string) - Required - State or province code. - `postalCode` (string) - Required - Postal or ZIP code. - `country` (string) - Required - Two-letter country code (ISO 3166-1 alpha-2). - `email` (string) - Optional. - `phone` (string) - Optional. - `fax` (string) - Optional. - **shippingAddress** (object) - Optional - The shipping address for the transaction. Schema is the same as `billingAddress`. - **successUrl** (string) - Optional - URL to redirect to upon successful payment. - **cancelUrl** (string) - Optional - URL to redirect to if the payment is cancelled. - **metadata** (object) - Optional - Key-value pairs for additional data. ### Request Example (Existing Product) ```json { "productId": "prod_123...", "processor": "nmi", "contactInfo": { "email": "customer@example.com", "name": "John Doe" }, "creditCard": { "number": "4111111111111111", "expiry": "12/25", "cvc": "123" }, "billingAddress": { "addressLine1": "123 Main St", "city": "New York", "state": "NY", "postalCode": "10001", "country": "US" } } ``` ### Request Example (Ad-Hoc Product) ```json { "adHocProduct": { "name": "Custom Service", "description": "Special service charge", "pricingType": "one_time", "amount": 5000, "currency": "USD", "taxInclusive": false }, "processor": "authorize_net", "contactInfo": { "email": "customer@example.com", "name": "Jane Doe" }, "creditCard": { "number": "4111111111111111", "expiry": "12/25", "cvc": "123" }, "billingAddress": { "addressLine1": "123 Main St", "city": "New York", "state": "NY", "postalCode": "10001", "country": "US" } } ``` ### Response #### Success Response (200) - **transactionId** (string) - The unique identifier for the processed transaction. - **status** (string) - The status of the transaction (e.g., `succeeded`, `failed`, `pending`). - **amount** (integer) - The charged amount. - **currency** (string) - The currency of the transaction. - **processorResponseCode** (string) - The response code from the payment processor. - **processorResponseMessage** (string) - The response message from the payment processor. #### Response Example ```json { "transactionId": "txn_abc123", "status": "succeeded", "amount": 5000, "currency": "USD", "processorResponseCode": "00", "processorResponseMessage": "Approved" } ``` #### Error Response (4xx/5xx) - **error** (string) - A description of the error. - **code** (string) - An error code. #### Error Response Example ```json { "error": "Invalid credit card number", "code": "INVALID_CREDIT_CARD" } ``` ```