---
agentTools:
  projectIndex: https://safehavenmfb.readme.io/llms.txt
---

# Purchase a Cable TV Subscription

Call this endpoint to purchase a cable tv subscription..

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Safe Haven IBS API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.sandbox.safehavenmfb.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://example.com/oauth2/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/vas/pay/cable-tv": {
      "post": {
        "summary": "Purchase a Cable TV Subscription",
        "description": "Call this endpoint to purchase a cable tv subscription..",
        "operationId": "purchase-a-cable-tv-subscription",
        "parameters": [
          {
            "name": "ClientID",
            "in": "header",
            "description": "This is your 'ibs_client_id' returned in the response when you generate an api token",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "serviceCategoryId",
                  "bundleCode",
                  "amount",
                  "channel",
                  "debitAccountNumber",
                  "cardNumber"
                ],
                "properties": {
                  "serviceCategoryId": {
                    "type": "string",
                    "description": "The `_id` of the service category."
                  },
                  "bundleCode": {
                    "type": "string",
                    "description": "The bundleCode of the data bundle."
                  },
                  "amount": {
                    "type": "number",
                    "description": "The cost of the data.",
                    "default": 0,
                    "format": "float"
                  },
                  "channel": {
                    "type": "string",
                    "description": "The channel the purchase is made on",
                    "default": "WEB",
                    "enum": [
                      "WEB",
                      "POS",
                      "ATM"
                    ]
                  },
                  "debitAccountNumber": {
                    "type": "string",
                    "description": "The account number for the account to be debited."
                  },
                  "cardNumber": {
                    "type": "string",
                    "description": "The card number of the cable tv account."
                  },
                  "externalReference": {
                    "type": "string",
                    "description": "This is an external reference to be attached to the transaction object."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"statusCode\": 200,\n    \"message\": \"Cable TV purchased successfully.\",\n    \"data\": {\n        \"clientId\": \"6874eb47aaad890024be3930\",\n        \"serviceCategoryId\": \"61e98b3562d9b6a917f9302a\",\n        \"reference\": \"c9e316d947914d3db1265dcc8af238fb\",\n        \"status\": \"successful\",\n        \"amount\": 3600,\n        \"id\": \"6925253dc26e15ce5635f618\",\n        \"receiver\": {\n            \"number\": \"8093245829\",\n            \"name\": null,\n            \"customerNumber\": null,\n            \"distribution\": \"DSTV\",\n            \"vendType\": \"\"\n        }\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "statusCode": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "message": {
                      "type": "string",
                      "example": "Cable TV purchased successfully."
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "clientId": {
                          "type": "string",
                          "example": "6874eb47aaad890024be3930"
                        },
                        "serviceCategoryId": {
                          "type": "string",
                          "example": "61e98b3562d9b6a917f9302a"
                        },
                        "reference": {
                          "type": "string",
                          "example": "c9e316d947914d3db1265dcc8af238fb"
                        },
                        "status": {
                          "type": "string",
                          "example": "successful"
                        },
                        "amount": {
                          "type": "integer",
                          "example": 3600,
                          "default": 0
                        },
                        "id": {
                          "type": "string",
                          "example": "6925253dc26e15ce5635f618"
                        },
                        "receiver": {
                          "type": "object",
                          "properties": {
                            "number": {
                              "type": "string",
                              "example": "8093245829"
                            },
                            "name": {},
                            "customerNumber": {},
                            "distribution": {
                              "type": "string",
                              "example": "DSTV"
                            },
                            "vendType": {
                              "type": "string",
                              "example": ""
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "61e69ed05b7bd4006a962eed:61f294514c646d006a45c8cd"
}
```