---
title: Modify prepaid card usage conditions
slug: reference/modify-prepaid-card-usage-conditions
docTags: 
createdAt: 2025-03-18T18:28:02.918Z
---

{
  "id": "su4vJ58O8KgFUf8DMfApb",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/prepaid-condition",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/prepaid-condition"
      }
    ],
    "name": "Modify prepaid card usage conditions",
    "description": "<p>Updates the usage conditions and restrictions for an existing prepaid card.\nThis allows modification of how and when prepaid credits can be consumed.</p>\n<p>Use this endpoint to:</p>\n<ul>\n<li>Update prepaid credit usage restrictions and rules</li>\n<li>Modify consumption policies for prepaid balances</li>\n<li>Change prepaid card spending limits or rate limits</li>\n<li>Update eligibility criteria for prepaid credit usage</li>\n</ul>\n<p><strong>Condition Types</strong>:</p>\n<ul>\n<li><strong>Usage Restrictions</strong>: Limit which services can consume the credits</li>\n<li><strong>Rate Limits</strong>: Control how quickly credits can be consumed</li>\n<li><strong>Time Restrictions</strong>: Define when credits can be used</li>\n<li><strong>Spending Limits</strong>: Set maximum consumption rates per period</li>\n</ul>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Prepaid condition modification including card identification and new usage restriction settings",
          "customType": "payment.pricing.prepaid.PrepaidModificationPrepaidConditionInput.in",
          "schema": [
            {
              "name": "customerId",
              "kind": "required",
              "type": "string",
              "description": "Unique identifier for the customer who owns the prepaid card.",
              "example": ""
            },
            {
              "name": "prepaidUri",
              "kind": "required",
              "type": "string",
              "description": "URI reference to the specific prepaid card requiring condition modification.",
              "example": ""
            },
            {
              "name": "prepaidCondition",
              "kind": "required",
              "type": "object",
              "description": "New usage restrictions and consumption rules for the prepaid card.",
              "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCondition.in",
              "customType": "payment.billing.prepaid_to_product.PrepaidCondition.in",
              "schema": [],
              "complexType": "oneOf",
              "complexItems": [
                {
                  "name": "payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Type identifier for dimension-based prepaid condition, automatically set to class name.",
                      "example": "",
                      "default": "DimensionValueMapPrepaidCondition"
                    },
                    {
                      "name": "dimensionMapValue",
                      "kind": "optional",
                      "type": "map",
                      "description": "Single dimension key-value pair specifying usage dimension criteria for prepaid credit application.",
                      "example": "",
                      "customType": "map<string, string>",
                      "schema": []
                    }
                  ]
                },
                {
                  "name": "payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Fixed type identifier for product item dimension prepaid condition implementation",
                      "example": "",
                      "default": "ProductItemDimensionPrepaidCondition"
                    },
                    {
                      "name": "productItemId",
                      "kind": "optional",
                      "type": "string",
                      "description": "Unique identifier of product item where prepaid credits should be applied",
                      "example": ""
                    },
                    {
                      "name": "dimensions",
                      "kind": "optional",
                      "type": "map",
                      "description": "Optional dimension key-value pairs for targeted credit application within product item",
                      "example": "",
                      "customType": "map<string, string>",
                      "schema": []
                    }
                  ]
                },
                {
                  "name": "payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                  "description": "",
                  "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                  "schema": [
                    {
                      "name": "type",
                      "kind": "optional",
                      "type": "string",
                      "description": "Fixed type identifier for product item prepaid condition implementation",
                      "example": "",
                      "default": "ProductItemPrepaidCondition"
                    },
                    {
                      "name": "productItemId",
                      "kind": "optional",
                      "type": "string",
                      "description": "Unique identifier of product item where all prepaid credits should be applied",
                      "example": ""
                    }
                  ]
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/payment.pricing.prepaid.PrepaidModificationPrepaidConditionInput.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successfully updated prepaid card conditions and returns updated card details with new usage restrictions",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Prepaid credit card that provides either price-based or usage-based billing credits for customer accounts.",
            "customType": "payment.billing.prepaid_to_product.PrepaidCard.out",
            "schema": [],
            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCard.out",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "prepaidUri",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique identifier for the prepaid card within billing system.",
                    "example": ""
                  },
                  {
                    "name": "paymentStatus",
                    "kind": "optional",
                    "type": "string",
                    "description": "Payment processing status indicating current stage from pre-payment through settlement or failure",
                    "modelRef": "#/components/schemas/payment.payment.PaymentStatus.in",
                    "customType": "payment.payment.PaymentStatus.in",
                    "schema": []
                  },
                  {
                    "name": "price",
                    "kind": "optional",
                    "type": "number",
                    "description": "Purchase price paid for the prepaid card in base currency.",
                    "example": ""
                  },
                  {
                    "name": "worth",
                    "kind": "optional",
                    "type": "number",
                    "description": "Credit value provided by the prepaid card for billing application.",
                    "example": ""
                  },
                  {
                    "name": "sourceUri",
                    "kind": "optional",
                    "type": "string",
                    "description": "URI of entity that ordered the prepaid card payment.",
                    "example": ""
                  },
                  {
                    "name": "paymentSystemName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of external payment system processing the prepaid transaction.",
                    "example": ""
                  },
                  {
                    "name": "paymentId",
                    "kind": "optional",
                    "type": "string",
                    "description": "External payment system identifier for the prepaid transaction.",
                    "example": ""
                  },
                  {
                    "name": "startTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp when prepaid card becomes active for billing application.",
                    "example": 0
                  },
                  {
                    "name": "expirationTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp when prepaid card expires and credits become unavailable.",
                    "example": 0
                  },
                  {
                    "name": "productInvoices",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.billing.detailed.EntityProductInvoice.in",
                    "customType": "payment.billing.detailed.EntityProductInvoice.in[]",
                    "schema": [
                      {
                        "name": "invoiceUri",
                        "kind": "optional",
                        "type": "string",
                        "description": "URI string identifier referencing the specific product invoice associated with this entity payment.",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "Unix timestamp indicating when this entity payment record was created in the system.",
                        "example": 0
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Monetary amount used to pay for the product invoice by this entity type.",
                        "example": ""
                      },
                      {
                        "name": "invoiceAmount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Total invoice amount value for reference tracking in entity payment processing systems.",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "transferInvoices",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.billing.detailed.PrepaidTransferInvoice.out",
                    "customType": "payment.billing.detailed.PrepaidTransferInvoice.out[]",
                    "schema": [
                      {
                        "name": "requestId",
                        "kind": "optional",
                        "type": "string",
                        "description": "Unique identifier for the prepaid balance transfer request between customer accounts.",
                        "example": ""
                      },
                      {
                        "name": "destinationPrepaidUri",
                        "kind": "optional",
                        "type": "string",
                        "description": "URI reference to the destination customer prepaid account receiving the transferred amount.",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "Unix timestamp indicating when this prepaid transfer transaction was created in system.",
                        "example": 0
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Monetary amount transferred from source prepaid account to destination prepaid account.",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "usedAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "Amount of prepaid credit already consumed for billing charges.",
                    "example": ""
                  },
                  {
                    "name": "amountLeft",
                    "kind": "optional",
                    "type": "number",
                    "description": "Remaining prepaid credit available for future billing application.",
                    "example": ""
                  },
                  {
                    "name": "cardType",
                    "kind": "optional",
                    "type": "string",
                    "description": "Type of prepaid card indicating payment source, recurrence pattern, and invoicing requirements for billing system.",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCardType.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidCardType.out",
                    "schema": []
                  },
                  {
                    "name": "paymentCurrencyInfo",
                    "kind": "optional",
                    "type": "object",
                    "description": "Payment currency information for invoice billing including base account currency, payment currency, and exchange rate details",
                    "modelRef": "#/components/schemas/payment.billing.PaymentCurrencyInfo.out",
                    "customType": "payment.billing.PaymentCurrencyInfo.out",
                    "schema": [
                      {
                        "name": "basePlanCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Base account currency code in ISO 4217 format used for pricing calculations and billing operations",
                        "example": "USD"
                      },
                      {
                        "name": "paymentCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Customer payment currency code in ISO 4217 format used for actual billing and payment processing",
                        "example": "USD"
                      },
                      {
                        "name": "exchangeRate",
                        "kind": "optional",
                        "type": "number",
                        "description": "Exchange rate from base plan currency to payment currency used for currency conversion calculations",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "prepaidConditions",
                    "kind": "optional",
                    "type": "object",
                    "description": "Collection manager for prepaid conditions with historical tracking for credit application rules",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidConditions.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidConditions.out",
                    "schema": [
                      {
                        "name": "prepaidConditionsList",
                        "kind": "optional",
                        "type": "object",
                        "description": "Active set of prepaid conditions determining when credits apply to customer charges",
                        "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCondition.out",
                        "customType": "payment.billing.prepaid_to_product.PrepaidCondition.out[]",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Type identifier for dimension-based prepaid condition, automatically set to class name.",
                                "example": "",
                                "default": "DimensionValueMapPrepaidCondition"
                              },
                              {
                                "name": "dimensionMapValue",
                                "kind": "optional",
                                "type": "map",
                                "description": "Single dimension key-value pair specifying usage dimension criteria for prepaid credit application.",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Fixed type identifier for product item dimension prepaid condition implementation",
                                "example": "",
                                "default": "ProductItemDimensionPrepaidCondition"
                              },
                              {
                                "name": "productItemId",
                                "kind": "optional",
                                "type": "string",
                                "description": "Unique identifier of product item where prepaid credits should be applied",
                                "example": ""
                              },
                              {
                                "name": "dimensions",
                                "kind": "optional",
                                "type": "map",
                                "description": "Optional dimension key-value pairs for targeted credit application within product item",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Fixed type identifier for product item prepaid condition implementation",
                                "example": "",
                                "default": "ProductItemPrepaidCondition"
                              },
                              {
                                "name": "productItemId",
                                "kind": "optional",
                                "type": "string",
                                "description": "Unique identifier of product item where all prepaid credits should be applied",
                                "example": ""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "prepaidConditionsHistory",
                        "kind": "optional",
                        "type": "map",
                        "description": "Historical timeline mapping timestamps to condition sets for audit and tracking purposes",
                        "example": "",
                        "customType": "map<string, payment.billing.prepaid_to_product.PrepaidCondition.out[]>",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "label",
                    "kind": "optional",
                    "type": "string",
                    "description": "Label for the Entitlement.",
                    "example": ""
                  },
                  {
                    "name": "commitmentId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Optional field, populated by internal processes.",
                    "example": ""
                  },
                  {
                    "name": "customPriority",
                    "kind": "optional",
                    "type": "number",
                    "description": "an optional field to indicate the priority of the prepaid. When using the prepaid cards, cards with higher priority will be used before cards with lower priority.",
                    "example": ""
                  },
                  {
                    "name": "startAtMidCycle",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "orderId",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "orderItemId",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "realTimePricing",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "To indicate if the pricing plan should allow real-time workflows (e.g. top-ups)",
                    "example": ""
                  },
                  {
                    "name": "installments",
                    "kind": "optional",
                    "type": "object",
                    "description": "The payment installments for the prepaid card.",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidInstallments.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidInstallments.out",
                    "schema": [
                      {
                        "name": "prepaidInstallments",
                        "kind": "required",
                        "type": "array",
                        "description": "Ordered list of payment schedules defining when installments are billed to customer",
                        "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidInstallmentSchedule.in",
                        "customType": "payment.billing.prepaid_to_product.PrepaidInstallmentSchedule.in[]",
                        "schema": [
                          {
                            "name": "amountPrice",
                            "kind": "required",
                            "type": "number",
                            "description": "Payment amount of individual installment charged to customer in account base currency",
                            "example": ""
                          },
                          {
                            "name": "scheduledPurchaseTimeInSeconds",
                            "kind": "required",
                            "type": "integer<int64>",
                            "description": "Unix timestamp when installment payment should be processed and billed to customer",
                            "example": 0
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "Type of template, automatically populated.",
                    "example": "",
                    "default": "prepaid_card_by_price"
                  },
                  {
                    "name": "purchaseType",
                    "kind": "optional",
                    "type": "string",
                    "description": "Prepaid card purchase model defining whether credits are allocated by fixed price or usage amount",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidPurchaseType.in",
                    "customType": "payment.billing.prepaid_to_product.PrepaidPurchaseType.in",
                    "schema": []
                  },
                  {
                    "name": "actualPrepaidChargePrice",
                    "kind": "optional",
                    "type": "number",
                    "description": "The actual absolute charge amount for the prepaid card, in base currency.",
                    "example": ""
                  }
                ],
                "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCardByPrice.out",
                "customType": "payment.billing.prepaid_to_product.PrepaidCardByPrice.out"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "prepaidUri",
                    "kind": "optional",
                    "type": "string",
                    "description": "Unique identifier for the usage-based prepaid card within billing system.",
                    "example": ""
                  },
                  {
                    "name": "paymentStatus",
                    "kind": "optional",
                    "type": "string",
                    "description": "Payment processing status indicating current stage from pre-payment through settlement or failure",
                    "modelRef": "#/components/schemas/payment.payment.PaymentStatus.in",
                    "customType": "payment.payment.PaymentStatus.in",
                    "schema": []
                  },
                  {
                    "name": "price",
                    "kind": "optional",
                    "type": "number",
                    "description": "Actual amount paid for the usage-based prepaid card in base currency.",
                    "example": ""
                  },
                  {
                    "name": "worth",
                    "kind": "optional",
                    "type": "number",
                    "description": "Credit value provided by the prepaid card for billing application.",
                    "example": ""
                  },
                  {
                    "name": "sourceUri",
                    "kind": "optional",
                    "type": "string",
                    "description": "URI of entity that ordered the usage-based prepaid card.",
                    "example": ""
                  },
                  {
                    "name": "paymentSystemName",
                    "kind": "optional",
                    "type": "string",
                    "description": "Name of external payment system processing the prepaid transaction.",
                    "example": ""
                  },
                  {
                    "name": "paymentId",
                    "kind": "optional",
                    "type": "string",
                    "description": "External payment system identifier for the prepaid transaction.",
                    "example": ""
                  },
                  {
                    "name": "startTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp when usage-based prepaid card becomes active for billing.",
                    "example": 0
                  },
                  {
                    "name": "expirationTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "description": "Unix timestamp when usage-based prepaid card expires and credits become unavailable.",
                    "example": 0
                  },
                  {
                    "name": "productInvoices",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.billing.detailed.EntityProductInvoice.in",
                    "customType": "payment.billing.detailed.EntityProductInvoice.in[]",
                    "schema": [
                      {
                        "name": "invoiceUri",
                        "kind": "optional",
                        "type": "string",
                        "description": "URI string identifier referencing the specific product invoice associated with this entity payment.",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "Unix timestamp indicating when this entity payment record was created in the system.",
                        "example": 0
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Monetary amount used to pay for the product invoice by this entity type.",
                        "example": ""
                      },
                      {
                        "name": "invoiceAmount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Total invoice amount value for reference tracking in entity payment processing systems.",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "transferInvoices",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.billing.detailed.PrepaidTransferInvoice.out",
                    "customType": "payment.billing.detailed.PrepaidTransferInvoice.out[]",
                    "schema": [
                      {
                        "name": "requestId",
                        "kind": "optional",
                        "type": "string",
                        "description": "Unique identifier for the prepaid balance transfer request between customer accounts.",
                        "example": ""
                      },
                      {
                        "name": "destinationPrepaidUri",
                        "kind": "optional",
                        "type": "string",
                        "description": "URI reference to the destination customer prepaid account receiving the transferred amount.",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "description": "Unix timestamp indicating when this prepaid transfer transaction was created in system.",
                        "example": 0
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "description": "Monetary amount transferred from source prepaid account to destination prepaid account.",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "usedAmount",
                    "kind": "optional",
                    "type": "number",
                    "description": "Amount of prepaid usage already consumed for billing charges.",
                    "example": ""
                  },
                  {
                    "name": "amountLeft",
                    "kind": "optional",
                    "type": "number",
                    "description": "Remaining prepaid usage available for future billing application.",
                    "example": ""
                  },
                  {
                    "name": "cardType",
                    "kind": "optional",
                    "type": "string",
                    "description": "Type of prepaid card indicating payment source, recurrence pattern, and invoicing requirements for billing system.",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCardType.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidCardType.out",
                    "schema": []
                  },
                  {
                    "name": "paymentCurrencyInfo",
                    "kind": "optional",
                    "type": "object",
                    "description": "Payment currency information for invoice billing including base account currency, payment currency, and exchange rate details",
                    "modelRef": "#/components/schemas/payment.billing.PaymentCurrencyInfo.out",
                    "customType": "payment.billing.PaymentCurrencyInfo.out",
                    "schema": [
                      {
                        "name": "basePlanCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Base account currency code in ISO 4217 format used for pricing calculations and billing operations",
                        "example": "USD"
                      },
                      {
                        "name": "paymentCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Customer payment currency code in ISO 4217 format used for actual billing and payment processing",
                        "example": "USD"
                      },
                      {
                        "name": "exchangeRate",
                        "kind": "optional",
                        "type": "number",
                        "description": "Exchange rate from base plan currency to payment currency used for currency conversion calculations",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "prepaidConditions",
                    "kind": "optional",
                    "type": "object",
                    "description": "Collection manager for prepaid conditions with historical tracking for credit application rules",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidConditions.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidConditions.out",
                    "schema": [
                      {
                        "name": "prepaidConditionsList",
                        "kind": "optional",
                        "type": "object",
                        "description": "Active set of prepaid conditions determining when credits apply to customer charges",
                        "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCondition.out",
                        "customType": "payment.billing.prepaid_to_product.PrepaidCondition.out[]",
                        "schema": [],
                        "complexType": "oneOf",
                        "complexItems": [
                          {
                            "name": "payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Type identifier for dimension-based prepaid condition, automatically set to class name.",
                                "example": "",
                                "default": "DimensionValueMapPrepaidCondition"
                              },
                              {
                                "name": "dimensionMapValue",
                                "kind": "optional",
                                "type": "map",
                                "description": "Single dimension key-value pair specifying usage dimension criteria for prepaid credit application.",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Fixed type identifier for product item dimension prepaid condition implementation",
                                "example": "",
                                "default": "ProductItemDimensionPrepaidCondition"
                              },
                              {
                                "name": "productItemId",
                                "kind": "optional",
                                "type": "string",
                                "description": "Unique identifier of product item where prepaid credits should be applied",
                                "example": ""
                              },
                              {
                                "name": "dimensions",
                                "kind": "optional",
                                "type": "map",
                                "description": "Optional dimension key-value pairs for targeted credit application within product item",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemPrepaidCondition.in",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "description": "Fixed type identifier for product item prepaid condition implementation",
                                "example": "",
                                "default": "ProductItemPrepaidCondition"
                              },
                              {
                                "name": "productItemId",
                                "kind": "optional",
                                "type": "string",
                                "description": "Unique identifier of product item where all prepaid credits should be applied",
                                "example": ""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "prepaidConditionsHistory",
                        "kind": "optional",
                        "type": "map",
                        "description": "Historical timeline mapping timestamps to condition sets for audit and tracking purposes",
                        "example": "",
                        "customType": "map<string, payment.billing.prepaid_to_product.PrepaidCondition.out[]>",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "label",
                    "kind": "optional",
                    "type": "string",
                    "description": "Human-readable label for the usage-based prepaid card.",
                    "example": ""
                  },
                  {
                    "name": "commitmentId",
                    "kind": "optional",
                    "type": "string",
                    "description": "Optional commitment contract identifier associated with prepaid card.",
                    "example": ""
                  },
                  {
                    "name": "customPriority",
                    "kind": "optional",
                    "type": "number",
                    "description": "Custom priority value determining usage order when multiple cards available.",
                    "example": ""
                  },
                  {
                    "name": "startAtMidCycle",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Whether the prepaid card activation begins mid-billing cycle.",
                    "example": ""
                  },
                  {
                    "name": "orderId",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "orderItemId",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "example": ""
                  },
                  {
                    "name": "realTimePricing",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "To indicate if the pricing plan should allow real-time workflows (e.g. top-ups)",
                    "example": ""
                  },
                  {
                    "name": "installments",
                    "kind": "optional",
                    "type": "object",
                    "description": "The payment installments for the prepaid card.",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidInstallments.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidInstallments.out",
                    "schema": [
                      {
                        "name": "prepaidInstallments",
                        "kind": "required",
                        "type": "array",
                        "description": "Ordered list of payment schedules defining when installments are billed to customer",
                        "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidInstallmentSchedule.in",
                        "customType": "payment.billing.prepaid_to_product.PrepaidInstallmentSchedule.in[]",
                        "schema": [
                          {
                            "name": "amountPrice",
                            "kind": "required",
                            "type": "number",
                            "description": "Payment amount of individual installment charged to customer in account base currency",
                            "example": ""
                          },
                          {
                            "name": "scheduledPurchaseTimeInSeconds",
                            "kind": "required",
                            "type": "integer<int64>",
                            "description": "Unix timestamp when installment payment should be processed and billed to customer",
                            "example": 0
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": "Type of template, automatically populated.",
                    "example": "",
                    "default": "prepaid_card_by_usage"
                  },
                  {
                    "name": "prepaidUsage",
                    "kind": "optional",
                    "type": "number",
                    "description": "Total usage amount that was prepaid and available for billing consumption.",
                    "example": ""
                  },
                  {
                    "name": "prepaidFullPrice",
                    "kind": "optional",
                    "type": "number",
                    "description": "Original full price of usage at creation time, used for discount calculations.",
                    "example": ""
                  },
                  {
                    "name": "purchaseType",
                    "kind": "optional",
                    "type": "string",
                    "description": "Prepaid card purchase model defining whether credits are allocated by fixed price or usage amount",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidPurchaseType.in",
                    "customType": "payment.billing.prepaid_to_product.PrepaidPurchaseType.in",
                    "schema": []
                  }
                ],
                "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCardByUsage.out",
                "customType": "payment.billing.prepaid_to_product.PrepaidCardByUsage.out"
              }
            ],
            "complexType": "oneOf",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid condition modification request, unsupported restriction type, or malformed request body",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Authentication required or invalid API key provided",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Insufficient permissions to modify prepaid card conditions",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Prepaid card not found or no longer active",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "409",
        "description": "Cannot modify conditions on expired card or conflicting usage rules",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal server error occurred while updating prepaid card conditions",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "JzxL3ivXc8Rd0VOLEH7Nq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/prepaid-condition \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"customerId\": \"\",\n     \"prepaidUri\": \"\",\n     \"prepaidCondition\": {\n     \"type\": \"DimensionValueMapPrepaidCondition\"\n     }\n     }'"
        },
        {
          "id": "VVZQiztCm5BRIjZC6dCvX",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"customerId\": \"\",\n   \"prepaidUri\": \"\",\n   \"prepaidCondition\": {\n      \"type\": \"DimensionValueMapPrepaidCondition\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/prepaid-condition\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "v4NmuaM2FQbyw6FmxLBkM",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/prepaid-condition\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"customerId\": \"\",\n   \"prepaidUri\": \"\",\n   \"prepaidCondition\": {\n      \"type\": \"DimensionValueMapPrepaidCondition\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "DzCNYO0q9xPgA5ESmLHVZ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/prepaid-condition\"\n\npayload = json.dumps({\n   \"customerId\": \"\",\n   \"prepaidUri\": \"\",\n   \"prepaidCondition\": {\n      \"type\": \"DimensionValueMapPrepaidCondition\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "JzxL3ivXc8Rd0VOLEH7Nq"
    },
    "results": {
      "languages": [
        {
          "id": "KbBaPp-ovHI6o3Xsqsgfl",
          "language": "200",
          "code": "// Successfully updated prepaid card conditions and returns updated card details with new usage restrictions\n{}"
        },
        {
          "id": "yLSJpf-2YFmFSIg1A3Kwu",
          "language": "400",
          "code": "// Invalid condition modification request, unsupported restriction type, or malformed request body\n"
        },
        {
          "id": "KgW6hjwH0O_UoBX5Rjstp",
          "language": "401",
          "code": "// Authentication required or invalid API key provided\n"
        },
        {
          "id": "xu555_20u8RO66NAllZQX",
          "language": "403",
          "code": "// Insufficient permissions to modify prepaid card conditions\n"
        },
        {
          "id": "38iNKJGueMOCaim5AkKOp",
          "language": "404",
          "code": "// Prepaid card not found or no longer active\n"
        },
        {
          "id": "-KfpslHLgKJgyCn6U11pg",
          "language": "409",
          "code": "// Cannot modify conditions on expired card or conflicting usage rules\n"
        },
        {
          "id": "6kbVchK39a3sSk-FleUZJ",
          "language": "500",
          "code": "// Internal server error occurred while updating prepaid card conditions\n"
        }
      ],
      "selectedLanguageId": "KbBaPp-ovHI6o3Xsqsgfl"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}