Skip to main content
POST
CableTv subscription via sub account
Always requery the transaction using Fetch a single transaction on a sub account to confirm its final status before issuing a refund. Only refund if data.status is REFUND.
Send the plan’s productId from Fetch cable TV plans (v2) to choose the plan. When productId is sent, that plan is bought at its price and amount is ignored. Without productId the plan is chosen by amount; if more than one plan costs that amount the request is rejected and nothing is charged. A productId is unique only within its cableTvType, so send it with the same cableTvType the plans were fetched for.
For a complete guide on response codes and transaction statuses, see Response Codes.

Authorizations

Authorization
string
header
required

Nomba authenticates API calls with OAuth2 HTTP bearer tokens. There are two methods of authentication; Client-Credentials method and PKCE (Proof Key for Code Exchange) method. Both methods return an access token. Send it in the Authorization header: Authorization: Bearer <access_token>.

Headers

accountId
string<uuid>
required

The parent accountId of the business.

Example:

"890022ce-bae0-45c1-9b9d-ee7872e6ca27"

Path Parameters

subAccountId
string
required

The identifier for the account through which this transaction is to be carried out.

Body

application/json

The request payload required for a cable tv subscription

cableTvType
string
Example:

"dstv"

merchantTxRef
string

This is an idempotency key and must be unique per transaction.

Example:

"12345"

payerName
string
Example:

"John Doe"

amount
integer

The price of the plan. Used to select the plan only when productId is not sent. If more than one plan costs this amount the request is rejected and you must send productId.

Example:

1000

productId
string

The productId of the plan to buy, as returned by Fetch cable TV plans (v2). When sent, it selects the plan and the plan's price is charged; amount is ignored. Send it whenever the plan's price is shared by another plan. A productId is unique only within its cableTvType, so send it with the same cableTvType the plans were fetched for.

Example:

"1"

customerId
string
Example:

"customer123"

Response

OK - your request was successful.

code
enum<string>
required

Response code. This reflects the HTTP status code of the response, e.g. 200 when the request completed successfully and 201 when it was accepted and is still being processed.

Available options:
200,
201,
400,
401,
403,
429,
500
Example:

"200"

description
string
required

Response description

Example:

"SUCCESS"

data
object
required
message
string

Response message

Example:

"Transaction completed Successfully"

status
boolean

Whether the request was successful

Example:

true