Directtopups
Direct topups ¶
Direct topups ¶
POST /directtopups
Requests
Headers
Content-Type: application/json
Authorization: Bearer 6518bce32048dfd1b9c205b9bb635b14
X-Nomanini-Organisation: nomaniniBody
{
"msisdn": "+254123456789",
"amount": 100,
"product_id": "ke-airtel",
"source_reference": "e476f20b30a138925582060fd3be4bb6"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"msisdn": {
"type": "string",
"pattern": "^\\+[1-9]{1}[0-9]{3,14}$"
},
"amount": {
"type": "number",
"multipleOf": 0.01
},
"provider": {
"type": "string",
"maxLength": 50
},
"product_id": {
"type": "string",
"maxLength": 50
},
"source_reference": {
"type": "string"
}
},
"additionalProperties": false,
"oneOf": [
{
"required": [
"msisdn",
"amount",
"provider",
"source_reference"
]
},
{
"required": [
"msisdn",
"amount",
"product_id",
"source_reference"
]
}
]
}Responses
Headers
Content-Type: application/jsonBody
{
"amount": 100,
"account_id": "a03875b4c098ad7c6758401682d57480",
"provider": "za-mtn",
"product_id": "za-mtn",
"sale_id": "ccb24451645fe9f04c031429e4c205c5",
"target_msisdn": "+254123456789",
"money_transaction_id": "1b6a19b183a3f80ea1e135ddf499698d",
"external_transaction_id": "R170112.1419.220002",
"source_reference": "3651484219946199468",
"transaction_time": "2017-01-01T12:00:00+00:00",
"status": "busy"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"multipleOf": 0.01
},
"account_id": {
"type": "string"
},
"provider": {
"type": "string"
},
"product_id": {
"type": "string"
},
"sale_id": {
"type": "string"
},
"money_transaction_id": {
"type": [
"string",
"null"
]
},
"target_msisdn": {
"type": "string",
"pattern": "^\\+[1-9]{1}[0-9]{3,14}$"
},
"external_transaction_id": {
"type": [
"string",
"null"
]
},
"source_reference": {
"type": "string"
},
"transaction_time": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"status": {
"type": "string",
"enum": [
"busy",
"done",
"error"
]
}
},
"additionalProperties": false,
"required": [
"account_id",
"amount",
"provider",
"product_id",
"money_transaction_id",
"sale_id",
"target_msisdn",
"external_transaction_id",
"source_reference",
"transaction_time",
"status"
]
}Perform a topupPOST/directtopups
Top up a target msisdn with an amount.
Permissions: sales:direct_topups:topup
Direct topups ¶
GET /directtopups?target_msisdn=+254123456789&external_transaction_id=R170112.1419.220002&source_reference=3651484219946199468&transaction_time_start=2017-01-01T12:00:00+00:00&transaction_time_end=2017-01-02T12:00:00+00:00&account_id=d7805530e9f62c3081de230515e972b6&provider=za-mtn&product_id=za-mtn&money_transaction_id=fdbea966c4d24e7f24d932f6d4ceafa8&limit=10&order=asc&status=done
Requests
Headers
Authorization: Bearer 6518bce32048dfd1b9c205b9bb635b14
X-Nomanini-Organisation: nomaniniResponses
Headers
Content-Type: application/jsonBody
{
"direct_topups": [
{
"amount": 100,
"account_id": "a03875b4c098ad7c6758401682d57480",
"provider": "za-mtn",
"product_id": "za-mtn",
"sale_id": "ccb24451645fe9f04c031429e4c205c5",
"target_msisdn": "+254123456789",
"money_transaction_id": "1b6a19b183a3f80ea1e135ddf499698d",
"external_transaction_id": "R170112.1419.220002",
"source_reference": "3651484219946199468",
"transaction_time": "2017-01-01T12:00:00+00:00",
"status": "busy"
}
]
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"direct_topups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"multipleOf": 0.01
},
"account_id": {
"type": "string"
},
"provider": {
"type": "string",
"description": "This is the same as the product_id in the products service"
},
"product_id": {
"type": "string"
},
"sale_id": {
"type": "string"
},
"money_transaction_id": {
"type": [
"string",
"null"
]
},
"target_msisdn": {
"type": "string",
"pattern": "^\\+[1-9]{1}[0-9]{3,14}$"
},
"external_transaction_id": {
"type": [
"string",
"null"
]
},
"source_reference": {
"type": "string"
},
"transaction_time": {
"type": "string",
"format": "date-time"
},
"status": {
"type": "string",
"enum": [
"busy",
"done",
"error"
]
}
},
"additionalProperties": false,
"required": [
"account_id",
"amount",
"product_id",
"provider",
"money_transaction_id",
"sale_id",
"target_msisdn",
"external_transaction_id",
"source_reference",
"transaction_time",
"status"
]
}
}
},
"additionalProperties": false,
"required": [
"direct_topups"
]
}Query topupsGET/directtopups{?target_msisdn,external_transaction_id,source_reference,transaction_time_start,transaction_time_end,account_id,provider,product_id,money_transaction_id,limit,order,status}
View information about previous topups.
Permissions: self, sales:view
URI Parameters
- target_msisdn
string(optional) Example: +254123456789- external_transaction_id
string(optional) Example: R170112.1419.220002- source_reference
string(optional) Example: 3651484219946199468- transaction_time_start
date-time(optional) Example: 2017-01-01T12:00:00+00:00- transaction_time_end
date-time(optional) Example: 2017-01-02T12:00:00+00:00- account_id
string(optional) Example: d7805530e9f62c3081de230515e972b6- provider
string(optional) Example: za-mtn- product_id
string(optional) Example: za-mtn- money_transaction_id
string(optional) Example: fdbea966c4d24e7f24d932f6d4ceafa8- limit
integer(optional) Example: 10- order
string(optional) Example: asc- status
string(optional) Example: done
Direct topup ¶
GET /directtopups/a9f2d5023f43e32f0022cb99c9348566
Requests
Headers
Authorization: Bearer 6518bce32048dfd1b9c205b9bb635b14
X-Nomanini-Organisation: nomaniniResponses
Headers
Content-Type: application/jsonBody
{
"amount": 100,
"account_id": "a03875b4c098ad7c6758401682d57480",
"provider": "za-mtn",
"product_id": "za-mtn",
"sale_id": "ccb24451645fe9f04c031429e4c205c5",
"target_msisdn": "+254123456789",
"money_transaction_id": "1b6a19b183a3f80ea1e135ddf499698d",
"external_transaction_id": "R170112.1419.220002",
"source_reference": "3651484219946199468",
"transaction_time": "2017-01-01T12:00:00+00:00",
"status": "busy"
}Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"amount": {
"type": "number",
"multipleOf": 0.01
},
"account_id": {
"type": "string"
},
"provider": {
"type": "string"
},
"product_id": {
"type": "string"
},
"sale_id": {
"type": "string"
},
"money_transaction_id": {
"type": [
"string",
"null"
]
},
"target_msisdn": {
"type": "string",
"pattern": "^\\+[1-9]{1}[0-9]{3,14}$"
},
"external_transaction_id": {
"type": [
"string",
"null"
]
},
"source_reference": {
"type": "string"
},
"transaction_time": {
"type": [
"string",
"null"
],
"format": "date-time"
},
"status": {
"type": "string",
"enum": [
"busy",
"done",
"error"
]
}
},
"additionalProperties": false,
"required": [
"account_id",
"amount",
"provider",
"product_id",
"money_transaction_id",
"sale_id",
"target_msisdn",
"external_transaction_id",
"source_reference",
"transaction_time",
"status"
]
}Get a single topupGET/directtopups/{sale_id}
Fetch a specific topup based on the sale_id.
Permissions: self, sales:view
URI Parameters
- sale_id
string(required) Example: a9f2d5023f43e32f0022cb99c9348566
Generated by aglio on 20 Oct 2017