### C# HttpClient Example Source: https://docs.streampay.sa/api/v2-coupons-list Demonstrates how to make a GET request to the list coupons endpoint using C# HttpClient, including setting the authorization header. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://stream-app-service.streampay.sa/api/v2/coupons"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Get User and Organization Info Example Source: https://docs.streampay.sa/api/v2-me-get This example demonstrates how to retrieve information about the authenticated user and their organization. It requires a valid JWT Bearer token for authorization. ```json { "user": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "email": "string", "first_name": "string", "last_name": "string", "en_first_name": "string", "en_last_name": "string", "created_at": "2024-07-29T15:51:28.071Z" }, "organization": { "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "name": "string", "name_en": "string", "sandbox": true, "created_at": "2024-07-29T15:51:28.071Z", "currency_config": { "home_currency": "SAR", "default_currency": "SAR", "enabled_currencies": [ "SAR" ] } } } ``` -------------------------------- ### C# HttpClient Example Source: https://docs.streampay.sa/api/v2-payments-get This C# code demonstrates how to make a GET request to retrieve payment details using HttpClient. It includes setting the accept header and authorization token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://stream-app-service.streampay.sa/api/v2/payments/:payment_id"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Create Product Request Example Source: https://docs.streampay.sa/api/v2-products-create An example of a request body for creating a new product. ```APIDOC ## POST /products ### Description Creates a new product with the provided details. ### Method POST ### Endpoint `/products` ### Request Body * **name** (string) - Required - Name of the product. * **description** (stringnullable) - Optional - Description of the product. * **type** (ProductType string) - Required - The type of product: `ONE_OFF` or `RECURRING`. * **recurring_interval** (RecurringInterval stringnullable) - Optional - Billing cycle interval if product is recurring. * **recurring_interval_count** (integer) - Optional - Billing cycle multiple if product is recurring. * **price** (string) - Required - Total price including VAT (default currency). * **currency** (string) - Required - Default price currency of the product. * **is_price_exempt_from_vat** (boolean) - Optional - Is the default price exempt from VAT? * **is_price_inclusive_of_vat** (boolean) - Optional - Is the default price inclusive of VAT? * **price_excluding_vat** (string) - Optional - Default price excluding VAT. * **vat_amount** (string) - Optional - VAT amount for default price. * **prices** (object[]) - Optional - All active prices for this product across different currencies. * **id** (string) - Required - Unique identifier for the price. * **currency** (CurrencyCode string) - Required - ISO 4217 currency code. * **amount** (string) - Required - Price amount. * **is_active** (boolean) - Optional - Whether this price is active. * **is_price_inclusive_of_vat** (boolean) - Optional - Is this price inclusive of VAT? * **is_price_exempt_from_vat** (boolean) - Optional - Is this price exempt from VAT? * **price_excluding_vat** (string) - Optional - Price excluding VAT. * **vat_amount** (string) - Optional - VAT amount for this price. * **is_active** (boolean) - Optional - Can this product be used in invoices or subscriptions? * **is_one_time** (boolean) - Optional - Shows if the product was created to be used once. ### Request Example ```json { "name": "Example Product", "description": "This is a sample product description.", "type": "ONE_OFF", "price": "100.00", "currency": "SAR", "is_price_inclusive_of_vat": true, "prices": [ { "id": "price-uuid-123", "currency": "USD", "amount": "26.67", "is_active": true, "is_price_inclusive_of_vat": true } ], "is_active": true } ``` ### Response #### Success Response (200) * **created_at** (string) - Creation timestamp of the object. * **updated_at** (stringnullable) - Last modification timestamp of the object. * **id** (string) - Unique identifier (UUID) of the product. * **name** (string) - Name of the product. * **description** (stringnullable) - Description of the product. * **type** (ProductType string) - The type of product: `ONE_OFF` or `RECURRING`. * **recurring_interval** (RecurringInterval stringnullable) - Billing cycle interval if product is recurring. * **recurring_interval_count** (integer) - Billing cycle multiple if product is recurring. * **price** (string) - Total price including VAT (default currency). * **currency** (string) - Default price currency of the product. * **is_price_exempt_from_vat** (boolean) - Is the default price exempt from VAT? * **is_price_inclusive_of_vat** (boolean) - Is the default price inclusive of VAT? * **price_excluding_vat** (string) - Default price excluding VAT. * **vat_amount** (string) - VAT amount for default price. * **prices** (object[]) - All active prices for this product across different currencies. * **id** (string) - Unique identifier for the price. * **currency** (CurrencyCode string) - ISO 4217 currency code. * **amount** (string) - Price amount. * **is_active** (boolean) - Whether this price is active. * **is_price_inclusive_of_vat** (boolean) - Is this price inclusive of VAT? * **is_price_exempt_from_vat** (boolean) - Is this price exempt from VAT? * **price_excluding_vat** (string) - Price excluding VAT. * **vat_amount** (string) - VAT amount for this price. * **is_active** (boolean) - Can this product be used in invoices or subscriptions? * **is_one_time** (boolean) - Shows if the product was created to be used once. * **is_used_in_finalized_invoice** (boolean) - Is the product used in a finalized invoice? #### Response Example ```json { "created_at": "2024-07-29T15:51:28.071Z", "updated_at": "2024-07-29T15:51:28.071Z", "id": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "name": "Example Product", "description": "This is a sample product description.", "type": "ONE_OFF", "price": "100.00", "currency": "SAR", "is_price_exempt_from_vat": false, "is_price_inclusive_of_vat": true, "price_excluding_vat": "87.00", "vat_amount": "13.00", "prices": [ { "id": "price-uuid-123", "currency": "USD", "amount": "26.67", "is_active": true, "is_price_inclusive_of_vat": true, "is_price_exempt_from_vat": false, "price_excluding_vat": "23.60", "vat_amount": "3.07" } ], "is_active": true, "is_one_time": true, "is_used_in_finalized_invoice": false } ``` ``` -------------------------------- ### Example Success Response Source: https://docs.streampay.sa/api/v2-products-get This is an example of a successful response structure for a product. ```json { "is_active": true, "is_one_time": true, "is_used_in_finalized_invoice": false } ``` -------------------------------- ### C# HttpClient Example Source: https://docs.streampay.sa/api/v2-subscriptions-freezes-list This C# code snippet demonstrates how to make a GET request to the subscription freezes API using HttpClient. It includes setting the Accept and Authorization headers. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://stream-app-service.streampay.sa/api/v2/subscriptions/:subscription_id/freeze"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Get Consumer Request in C# Source: https://docs.streampay.sa/api/v2-consumers-get Example of how to make a GET request to retrieve consumer details using HttpClient in C#. Ensure to replace `` with a valid JWT. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://stream-app-service.streampay.sa/api/v2/consumers/:consumer_id"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Successful Response Example Source: https://docs.streampay.sa/api/v2-coupons-list Example of a successful JSON response when listing coupons, including data and pagination details. ```json { "data": [ { "created_at": "2024-07-29T15:51:28.071Z", "updated_at": "2024-07-29T15:51:28.071Z", "id": "string", "name": "string", "discount_value": "string", "currency": "SAR", "is_percentage": true, "is_active": true, "redemptions": 0 } ], "pagination": { "total_count": 0, "max_page": 0, "current_page": 0, "limit": 0, "has_next_page": true, "has_previous_page": true } } ``` -------------------------------- ### Get Product by ID using C# HttpClient Source: https://docs.streampay.sa/api/v2-products-get Demonstrates how to make a GET request to retrieve a specific product using its ID. Ensure you replace `` with your valid JWT bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://stream-app-service.streampay.sa/api/v2/products/:product_id"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Successful Consumer Response Example Source: https://docs.streampay.sa/api/v2-consumers-get Example JSON structure for a successful response when retrieving consumer details. ```json { "id": "string", "name": "string", "phone_number": "string", "email": "user@example.com", "external_id": "string", "consumer": { "id": "string", "phone_number": "string", "preferred_language": "string" }, "iban": "string", "is_deleted": true, "alias": "string", "created_at": "2024-07-29T15:51:28.071Z", "branch": { "id": "string", "name": "string" }, "comment": "string", "communication_methods": [ "WHATSAPP" ], "preferred_language": "string", "consumer_type": "INDIVIDUAL", "address": { "address_line_1": "string", "address_line_2": "string", "city": "string", "postal_code": "string", "country": "string" }, "vat_number": "string", "commercial_registration": "string" } ``` -------------------------------- ### Successful Response Example Source: https://docs.streampay.sa/api/v2-payments-auto-charge-on-demand This example shows the JSON response when a payment is successfully charged using the consumer's latest tokenized card. It includes the payment ID and the associated invoice ID. ```json { "payment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ``` -------------------------------- ### Get Invoice Source: https://docs.streampay.sa/api/v2-invoices-get This example demonstrates how to retrieve an invoice by its ID using C#. ```APIDOC ## GET /api/v2/invoices/:invoice_id ### Description Retrieves the details of a specific invoice using its unique identifier. ### Method GET ### Endpoint https://stream-app-service.streampay.sa/api/v2/invoices/:invoice_id ### Parameters #### Path Parameters - **invoice_id** (string) - Required - The unique identifier of the invoice. #### Request Headers - **Authorization** (string) - Required - Bearer token for authentication. Example: Bearer - **Accept** (string) - Optional - Specifies the desired response format, typically application/json. ### Request Example ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://stream-app-service.streampay.sa/api/v2/invoices/:invoice_id"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` ### Response #### Success Response (200) - **invoice_id** (string) - The unique identifier of the invoice. - **amount** (number) - The total amount of the invoice. - **currency** (string) - The currency of the invoice (e.g., USD, EUR). - **status** (string) - The current status of the invoice (e.g., Paid, Unpaid, Overdue). - **created_at** (string) - The timestamp when the invoice was created. - **due_date** (string) - The timestamp when the invoice is due. ``` -------------------------------- ### Get Products List (C#) Source: https://docs.streampay.sa/api/v2-products-list Use this snippet to fetch a list of products from the API using HttpClient. Ensure you replace `` with your actual JWT bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://stream-app-service.streampay.sa/api/v2/products"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Create Coupon using C# HttpClient Source: https://docs.streampay.sa/api/v2-coupons-create This C# code snippet demonstrates how to create a coupon using HttpClient. It shows how to set up the request, add headers for authorization and content type, and send the POST request to the API. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://stream-app-service.streampay.sa/api/v2/coupons"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"name\": \"string\",\n \"discount_value\": 0,\n \"currency\": \"SAR\",\n \"is_percentage\": false,\n \"is_active\": true\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Retrieve Branch Information using HttpClient (C#) Source: https://docs.streampay.sa/api/v2-branches-get Example of how to make a GET request to retrieve branch details using HttpClient in C#. Ensure you replace '' with a valid JWT bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://stream-app-service.streampay.sa/api/v2/branch/:branch_id"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### C# HttpClient Example for /api/v2/me Source: https://docs.streampay.sa/api/v2-me-get This C# code snippet shows how to use HttpClient to make a GET request to the /api/v2/me endpoint. Ensure you replace "" with your actual JWT Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://stream-app-service.streampay.sa/api/v2/me"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### API Request Body Structure Source: https://docs.streampay.sa/api/v2-subscriptions-create This is the JSON structure for the request body when creating a subscription. It includes fields for consumer notifications, subscription description, item details, coupons, organization consumer ID, start date, cycle number, payment method overrides, installment options, and currency. ```json { "notify_consumer": true, "description": "string", "items": [ { "product_id": "string", "quantity": 0, "coupons": [ "string" ] } ], "coupons": [ "string" ], "organization_consumer_id": "string", "period_start": "2024-07-29T15:51:28.071Z", "until_cycle_number": 0, "override_payment_methods": { "visa": true, "mastercard": true, "amex": true, "bank_transfer": true, "installment": true, "qurrah": true, "subscription_auto_renewal": true }, "exclude_coupons_if_installments": false, "currency": "SAR" } ``` -------------------------------- ### Product Schema Example Source: https://docs.streampay.sa/api/v2-products-get This JSON object represents a product with all its associated fields, including pricing details for different currencies. ```json { "created_at": "2024-07-29T15:51:28.071Z", "updated_at": "2024-07-29T15:51:28.071Z", "id": "string", "name": "string", "description": "string", "type": "RECURRING", "recurring_interval": "WEEK", "recurring_interval_count": 0, "price": "string", "currency": "SAR", "is_price_exempt_from_vat": true, "is_price_inclusive_of_vat": true, "price_excluding_vat": "string", "vat_amount": "string", "prices": [ { "id": "string", "currency": "SAR", "amount": "string", "is_active": true, "is_price_inclusive_of_vat": true, "is_price_exempt_from_vat": true, "price_excluding_vat": "string", "vat_amount": "string" } ] } ``` -------------------------------- ### Create Product Source: https://docs.streampay.sa/api/v2-products-create Creates a new product with its associated pricing and description. Supports multi-currency pricing and recurring product types. ```APIDOC ## POST https://stream-app-service.streampay.sa/api/v2/products ### Description Create a new product with pricing and description. ### Method POST ### Endpoint https://stream-app-service.streampay.sa/api/v2/products ### Parameters #### Request Body - **name** (string) - Required - Name of the product. Possible values: `non-empty` and `<= 160 characters` - **description** (string) - Nullable - Description of the product. Possible values: `<= 500 characters` - **price** (object) - Deprecated - Price of the product. Use 'prices' array for multi-currency support. Can be a number, string, or null. Number must be `>= 1`. String must match regex `^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$`. - **prices** (object[]) - Nullable - Prices for the product in different currencies. At least one price is required. - **currency** (string) - Required - ISO 4217 currency codes supported by Moyasar. Possible values: [`SAR`, `USD`, `EUR`, `GBP`, `AED`, `BHD`, `KWD`, `OMR`, `QAR`] - **amount** (object) - Required - Price amount. Can be a number or string. Number must be `>= 1`. String must match regex `^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$`. - **is_price_inclusive_of_vat** (boolean) - Optional - If True, amount includes VAT. Default value: `true` - **is_price_exempt_from_vat** (boolean) - Optional - If True, no VAT applies to this price. Default value: `false` - **is_one_time** (boolean) - Optional - Will this product be used only one time in one invoice? Default value: `false` - **type** (string) - Required - The type of product: `ONE_OFF` or `RECURRING`. - **recurring_interval** (string) - Nullable - Represents the billing cycle interval if product is recurring. Required for cyclic products. For `ONE_OFF`, value is ignored. Possible values: [`WEEK`, `MONTH`, `SEMESTER`, `YEAR`] - **recurring_interval_count** (integer) - Optional - The billing cycle multiple if the product is recurring. Possible values: `>= 1`. Default value: `1` - **is_price_exempt_from_vat** (boolean) - Nullable - Deprecated. Use VAT settings in prices[] instead. - **is_price_inclusive_of_vat** (boolean) - Nullable - Deprecated. Use VAT settings in prices[] instead. ### Request Example ```json { "name": "Premium Subscription", "description": "Monthly premium access to all features.", "prices": [ { "currency": "SAR", "amount": 100, "is_price_inclusive_of_vat": true }, { "currency": "USD", "amount": "30.00" } ], "type": "RECURRING", "recurring_interval": "MONTH", "recurring_interval_count": 1 } ``` ### Response #### Success Response (200) - **id** (string) - Unique identifier for the product. - **name** (string) - Name of the product. - **description** (string) - Description of the product. - **prices** (object[]) - Prices for the product in different currencies. - **currency** (string) - ISO 4217 currency codes. - **amount** (number) - Price amount. - **is_price_inclusive_of_vat** (boolean) - If true, amount includes VAT. - **is_price_exempt_from_vat** (boolean) - If true, no VAT applies to this price. - **is_one_time** (boolean) - Indicates if the product is one-time. - **type** (string) - Type of the product (`RECURRING` or `ONE_OFF`). - **recurring_interval** (string) - Billing cycle interval if recurring. - **recurring_interval_count** (integer) - Billing cycle multiple if recurring. - **created_at** (string) - Timestamp when the product was created. - **updated_at** (string) - Timestamp when the product was last updated. #### Response Example ```json { "id": "prod_12345abcde", "name": "Premium Subscription", "description": "Monthly premium access to all features.", "prices": [ { "currency": "SAR", "amount": 100, "is_price_inclusive_of_vat": true, "is_price_exempt_from_vat": false }, { "currency": "USD", "amount": 30, "is_price_inclusive_of_vat": true, "is_price_exempt_from_vat": false } ], "is_one_time": false, "type": "RECURRING", "recurring_interval": "MONTH", "recurring_interval_count": 1, "created_at": "2023-10-27T10:00:00Z", "updated_at": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### Delete Product Request Example (C#) Source: https://docs.streampay.sa/api/v2-products-delete Demonstrates how to send a DELETE request to the products endpoint using HttpClient in C#. Ensure you replace `` with a valid JWT bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Delete, "https://stream-app-service.streampay.sa/api/v2/products/:product_id"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Create Branch using HttpClient in C# Source: https://docs.streampay.sa/api/v2-branches-create Example of how to create a branch using HttpClient in C#. Ensure you include the Authorization header with a valid Bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://stream-app-service.streampay.sa/api/v2/branch"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"name\": \"string\"\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Get Payment Link by ID Source: https://docs.streampay.sa/api/v2-payment-links-get This snippet shows how to retrieve a payment link using its ID via an HTTP GET request. ```APIDOC ## GET /api/v2/payment_links/:payment_link_id ### Description Retrieves the details of a specific payment link. ### Method GET ### Endpoint /api/v2/payment_links/:payment_link_id ### Parameters #### Path Parameters - **payment_link_id** (string) - Required - The unique identifier of the payment link. ### Request Example ``` GET /api/v2/payment_links/your_payment_link_id HTTP/1.1 Host: stream-app-service.streampay.sa Accept: application/json Authorization: Bearer ``` ### Response #### Success Response (200) - **payment_link_id** (string) - The unique identifier of the payment link. - **amount** (number) - The amount of the payment link. - **currency** (string) - The currency of the payment link. - **status** (string) - The status of the payment link (e.g., 'active', 'paid', 'expired'). - **created_at** (string) - The timestamp when the payment link was created. - **expires_at** (string) - The timestamp when the payment link expires. #### Response Example ```json { "payment_link_id": "pl_abc123xyz", "amount": 100.50, "currency": "SAR", "status": "active", "created_at": "2023-10-27T10:00:00Z", "expires_at": "2023-10-28T10:00:00Z" } ``` ``` -------------------------------- ### Get Branch By Id API Endpoint Source: https://docs.streampay.sa/api/v2-branches-get This is the GET endpoint for retrieving branch details. Replace ':branch_id' with the actual UUID of the branch. ```http GET ## https://stream-app-service.streampay.sa/api/v2/branch/:branch_id ``` -------------------------------- ### Create Subscription using HttpClient in C# Source: https://docs.streampay.sa/api/v2-subscriptions-create This snippet demonstrates how to create a subscription using HttpClient in C#. Ensure you have a valid JWT token for authorization. The request includes details about notification, description, items, coupons, consumer ID, start period, and payment method overrides. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Post, "https://stream-app-service.streampay.sa/api/v2/subscriptions"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var content = new StringContent("{\n \"notify_consumer\": true,\n \"description\": \"string\",\n \"items\": [\n {\n \"product_id\": \"string\",\n \"quantity\": 0,\n \"coupons\": [\n \"string\"\n ]\n }\n ],\n \"coupons\": [\n \"string\"\n ],\n \"organization_consumer_id\": \"string\",\n \"period_start\": \"2024-07-29T15:51:28.071Z\",\n \"until_cycle_number\": 0,\n \"override_payment_methods\": {\n \"visa\": true,\n \"mastercard\": true,\n \"amex\": true,\n \"bank_transfer\": true,\n \"installment\": true,\n \"qurrah\": true,\n \"subscription_auto_renewal\": true\n },\n \"exclude_coupons_if_installments\": false,\n \"currency\": \"SAR\"\n}", null, "application/json"); request.Content = content; var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Delete Branch Request Example (C#) Source: https://docs.streampay.sa/api/v2-branches-delete Example of how to delete a branch using HttpClient in C#. Ensure you replace '' with your valid JWT bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Delete, "https://stream-app-service.streampay.sa/api/v2/branch/:branch_id"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ```