---
title: Extend the end time of the prepaid card
slug: amberflo-api/extend-the-end-time-of-the-prepaid-card
docTags: 
createdAt: 2024-11-07T15:10:16.976Z
---

{
  "id": "WWT_Mljze4n0vmpA5Hiwi",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/extend",
    "servers": [
      {
        "url": "https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/extend"
      }
    ],
    "name": "Extend the end time of the prepaid card",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "payment.pricing.prepaid.PrepaidModificationEndTimeExtensionInput.in",
          "schema": [
            {
              "name": "customerId",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "prepaidUri",
              "kind": "optional",
              "type": "string",
              "example": ""
            },
            {
              "name": "extendedEndTimeInSeconds",
              "kind": "optional",
              "type": "integer<int64>",
              "example": 0
            }
          ],
          "modelRef": "#/components/schemas/payment.pricing.prepaid.PrepaidModificationEndTimeExtensionInput.in",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiKey",
          "name": "X-API-KEY",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Successful request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "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",
                    "example": ""
                  },
                  {
                    "name": "paymentStatus",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.payment.PaymentStatus.out",
                    "customType": "payment.payment.PaymentStatus.out",
                    "schema": []
                  },
                  {
                    "name": "price",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "worth",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "sourceUri",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "paymentSystemName",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "paymentId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "startTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "expirationTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "productInvoices",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.billing.detailed.EntityProductInvoice.out",
                    "customType": "payment.billing.detailed.EntityProductInvoice.out[]",
                    "schema": [
                      {
                        "name": "invoiceUri",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "invoiceAmount",
                        "kind": "optional",
                        "type": "number",
                        "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",
                        "example": ""
                      },
                      {
                        "name": "destinationPrepaidUri",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "usedAmount",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "amountLeft",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "cardType",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "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": "",
                    "modelRef": "#/components/schemas/payment.billing.PaymentCurrencyInfo.out",
                    "customType": "payment.billing.PaymentCurrencyInfo.out",
                    "schema": [
                      {
                        "name": "basePlanCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Currency code in ISO 4217 format.",
                        "example": "USD"
                      },
                      {
                        "name": "paymentCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Currency code in ISO 4217 format.",
                        "example": "USD"
                      },
                      {
                        "name": "exchangeRate",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "prepaidConditions",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "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": "",
                        "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.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": "",
                                "default": "DimensionValueMapPrepaidCondition"
                              },
                              {
                                "name": "dimensionMapValue",
                                "kind": "optional",
                                "type": "map",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": "",
                                "default": "ProductItemDimensionPrepaidCondition"
                              },
                              {
                                "name": "productItemId",
                                "kind": "optional",
                                "type": "string",
                                "description": "The product item associated with the prepaid.",
                                "example": ""
                              },
                              {
                                "name": "dimensions",
                                "kind": "optional",
                                "type": "map",
                                "description": "The dimensions associated with the prepaid.",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemPrepaidCondition.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemPrepaidCondition.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": "",
                                "default": "ProductItemPrepaidCondition"
                              },
                              {
                                "name": "productItemId",
                                "kind": "optional",
                                "type": "string",
                                "example": ""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "prepaidConditionsHistory",
                        "kind": "optional",
                        "type": "map",
                        "example": "",
                        "customType": "map<string, payment.billing.prepaid_to_product.PrepaidCondition.out[]>",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "label",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "commitmentId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "customPriority",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "startAtMidCycle",
                    "kind": "optional",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "name": "orderId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "orderItemId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "realTimePricing",
                    "kind": "optional",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "example": "",
                    "default": "prepaid_card_by_price"
                  },
                  {
                    "name": "purchaseType",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidPurchaseType.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidPurchaseType.out",
                    "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",
                    "example": ""
                  },
                  {
                    "name": "paymentStatus",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.payment.PaymentStatus.out",
                    "customType": "payment.payment.PaymentStatus.out",
                    "schema": []
                  },
                  {
                    "name": "price",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "worth",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "sourceUri",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "paymentSystemName",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "paymentId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "startTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "expirationTimeInSeconds",
                    "kind": "optional",
                    "type": "integer<int64>",
                    "example": 0
                  },
                  {
                    "name": "productInvoices",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.billing.detailed.EntityProductInvoice.out",
                    "customType": "payment.billing.detailed.EntityProductInvoice.out[]",
                    "schema": [
                      {
                        "name": "invoiceUri",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      },
                      {
                        "name": "invoiceAmount",
                        "kind": "optional",
                        "type": "number",
                        "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",
                        "example": ""
                      },
                      {
                        "name": "destinationPrepaidUri",
                        "kind": "optional",
                        "type": "string",
                        "example": ""
                      },
                      {
                        "name": "createdTimeInSeconds",
                        "kind": "optional",
                        "type": "integer<int64>",
                        "example": 0
                      },
                      {
                        "name": "amount",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "usedAmount",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "amountLeft",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "cardType",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "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": "",
                    "modelRef": "#/components/schemas/payment.billing.PaymentCurrencyInfo.out",
                    "customType": "payment.billing.PaymentCurrencyInfo.out",
                    "schema": [
                      {
                        "name": "basePlanCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Currency code in ISO 4217 format.",
                        "example": "USD"
                      },
                      {
                        "name": "paymentCurrency",
                        "kind": "optional",
                        "type": "string",
                        "description": "Currency code in ISO 4217 format.",
                        "example": "USD"
                      },
                      {
                        "name": "exchangeRate",
                        "kind": "optional",
                        "type": "number",
                        "example": ""
                      }
                    ]
                  },
                  {
                    "name": "prepaidConditions",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "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": "",
                        "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.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.DimensionValueMapPrepaidCondition.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": "",
                                "default": "DimensionValueMapPrepaidCondition"
                              },
                              {
                                "name": "dimensionMapValue",
                                "kind": "optional",
                                "type": "map",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemDimensionPrepaidCondition.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": "",
                                "default": "ProductItemDimensionPrepaidCondition"
                              },
                              {
                                "name": "productItemId",
                                "kind": "optional",
                                "type": "string",
                                "description": "The product item associated with the prepaid.",
                                "example": ""
                              },
                              {
                                "name": "dimensions",
                                "kind": "optional",
                                "type": "map",
                                "description": "The dimensions associated with the prepaid.",
                                "example": "",
                                "customType": "map<string, string>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "payment.billing.prepaid_to_product.ProductItemPrepaidCondition.out",
                            "description": "",
                            "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.ProductItemPrepaidCondition.out",
                            "schema": [
                              {
                                "name": "type",
                                "kind": "optional",
                                "type": "string",
                                "example": "",
                                "default": "ProductItemPrepaidCondition"
                              },
                              {
                                "name": "productItemId",
                                "kind": "optional",
                                "type": "string",
                                "example": ""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "prepaidConditionsHistory",
                        "kind": "optional",
                        "type": "map",
                        "example": "",
                        "customType": "map<string, payment.billing.prepaid_to_product.PrepaidCondition.out[]>",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "label",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "commitmentId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "customPriority",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "startAtMidCycle",
                    "kind": "optional",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "name": "orderId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "orderItemId",
                    "kind": "optional",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "realTimePricing",
                    "kind": "optional",
                    "type": "boolean",
                    "example": ""
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "example": "",
                    "default": "prepaid_card_by_usage"
                  },
                  {
                    "name": "prepaidUsage",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "prepaidFullPrice",
                    "kind": "optional",
                    "type": "number",
                    "example": ""
                  },
                  {
                    "name": "purchaseType",
                    "kind": "optional",
                    "type": "string",
                    "description": "",
                    "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidPurchaseType.out",
                    "customType": "payment.billing.prepaid_to_product.PrepaidPurchaseType.out",
                    "schema": []
                  }
                ],
                "modelRef": "#/components/schemas/payment.billing.prepaid_to_product.PrepaidCardByUsage.out",
                "customType": "payment.billing.prepaid_to_product.PrepaidCardByUsage.out"
              }
            ],
            "complexType": "oneOf",
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "7o9TDyHKralkysizb2E8b",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/extend \\\n     --header 'accept: application/json'"
        },
        {
          "id": "x96JmbmtPiS4YR_yS_UnK",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/extend\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "oPqQkEe_rMpJgBnfz5qSn",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/extend\")\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\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "qfV0NtKf_vNYHObBBcASJ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://app.amberflo.io/payments/pricing/amberflo/customer-prepaid/extend\"\n\npayload = {}\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": "7o9TDyHKralkysizb2E8b"
    },
    "results": {
      "languages": [
        {
          "id": "hi01boifD7V321q8ZYsdt",
          "language": "200",
          "code": "// Successful request\n{}"
        }
      ],
      "selectedLanguageId": "hi01boifD7V321q8ZYsdt"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}