Acquire product with given SKU
Allows to acquire product (by SKU) for given beneficiary. Result will be delivered asynchronously by calling user callback.
Possible results:
If timeout is reached 'UNKNOWN' status with 'TIMEOUT' error is returned without waiting for acquisition result.
If status is 'SUCCESS' or 'FAILURE' it is terminal and would not change for given operation.
If status is 'UNKNOWN' user should use GET '/acquire/status' to check if it changed to terminal 'SUCCESS' or 'FAILURE'.
- application/json
Request Body required
- operationId AcquireOperationId required
Unique operation id of the acquisition
- sku ProductSku required
Product SKU
- beneficiaryId BeneficiaryId required
Product specific beneficiary ID, described in product group's beneficiaryIdLabel or product's beneficiaryIdLabel in /acquire/products, for example: acquirer msisdn, ticket number or DSTV Smart Card number
- customerMsisdn +234'10 digits' or 234'10 digits' or 0'10 digits' or +0'10 digits' or '10 digits' required
Customer msisdn
- amount double
Amount to acquire. Must be provided for products with amountSource other than 'FIXED'. If not provided for amountSource 'FIXED' amount from product will be used.
- 200
- 401
- 402
- 403
- 409
Operation finished with given status (could also be exceeding defined timeout).
- application/json
- Schema
- Example (from schema)
- Success
- FailureTimeout
- FailureUnknownSku
- FailureInvalidAmount
- FailureInvalidBeneficiaryId
Schema
- status string required
Possible values: [
SUCCESS
,FAILURE
,UNKNOWN
] - error string
Possible values: [
TIMEOUT
,INTERNAL
,INVALID_AMOUNT
,UNKNOWN_SKU
,INVALID_BENEFICIARY_ID
,UNSPECIFIED
] - transactionId string
- reference string
- rawErrorCode string
{
"status": "SUCCESS",
"error": "TIMEOUT",
"transactionId": "string",
"reference": "string",
"rawErrorCode": "string"
}
Successful acquire
{
"status": "SUCCESS",
"transactionId": "txId123",
"reference": "refId123"
}
Timeout exceeded
{
"status": "UNKNOWN",
"error": "TIMEOUT"
}
Provided SKU is invalid
{
"status": "FAILURE",
"error": "UNKNOWN_SKU"
}
Provided amount is invalid
{
"status": "FAILURE",
"error": "INVALID_AMOUNT"
}
Provided amount is invalid
{
"status": "FAILURE",
"error": "INVALID_BENEFICIARY_ID"
}
Your authentication data are invalid or not provided
Your developer balance is not enough to cover the acquire operation cost. Please, fund your wallet
You don't have proper permission to invoke this operation
An operation with given operation ID already exists. An operation ID has to be unique