Tigo Partner Integration API Details
Tigo Partner Integration API Details
API Details
DOCUMENT CONTROL
Document Location
TIGO Tanzania
DOCUMENT DESCRIPTION
REVISION HISTORY
Approvals
Approval refers to the approver’s acceptance of the content and overall intention of this
document, including acceptance of any commitments described in order to successfully
deliver the initiative. The approver, where relevant, also confirms that this document
complies with relevant strategies, policies and regulatory requirements.
1
Partner Integration (A2W & W2A) API Details
TIGOPESA
–
Partner
Integration
(A2W
&
W2A)
API
Details
2
Partner Integration (A2W & W2A) API Details
TYPE
NA
The
request
type
of
the
transaction.
The
value
will
be
constant
in
all
the
request.
Ex
-‐
SYNC_BILLPAY_REQUEST
TXNID
20
Alphanumeric-‐This
field
will
be
Tigo
transaction
ID.
It
will
be
unique
for
all
transactions.
Ex
-‐
BP140218.1240.B01530
MSISDN
10/12
Payer
MSISDN
should
be
without
country
code.
Ex
–
0721777777
or
255721777777
AMOUNT
NA
Numeric,
Ex
-‐
1000
COMPANYNAME
6
Numeric.
This
is
the
business
number,
or
biller
code
Ex
–
12345
CUSTOMERREFERENCEID
50
Bill
pay
reference
number,
normally
generated/shared
by
partner
application.
This
is
used
by
partner
application
to
validate
payments.
Alphanumeric
characters.
Ex
–
T1234ABC
Sample
request
message
from
the
Payment
Gateway
to
Partner
Application
‘SYNC_BILLPAY_API’
is
attached
here.
<?xml
version="1.0"?>
<COMMAND>
<TYPE>SYNC_BILLPAY_REQUEST</TYPE>
<TXNID>tigo_txnID</TXNID>
3
Partner Integration (A2W & W2A) API Details
<MSISDN>user
_msisdn</MSISDN>
<AMOUNT>amount</AMOUNT>
<COMPANYNAME>copny_ID</COMPANYNAME>
<CUSTOMERREFERENCEID>Partner_reference_number</CUSTOMERREFERENCEID>
</COMMAND>
1.1.1 Output from the Partner Application to the Payment Gateway System
– SYNC_BILLPAY_API Response
TYPE
NA
The
response
type
of
the
transaction.
The
value
will
be
constant
in
all
the
response.
Ex
–
SYNC_BILLPAY_RESPONSE
TXNID
20
Tigo
Transaction
ID
sent
in
the
request.
Ex
-‐
BP140218.1240.B01530
REFID
50
Partner
Application
generated
Transaction
ID.
It
should
be
unique
for
all
transaction.
Ex
-‐
000217605331
RESULT
2
Status
of
the
transaction.
String
value.
Ex
–
Either
TS
or
TF
ERRORCODE
20
Particular
Error
Code
returned
in
the
transaction.
Will
be
Alphanumeric.
Ex
-‐
error000
for
success
ERRORDESCRIPTION
NA
Error
Description
(String).
Ex-‐
Transaction
Successful
MSISDN
10
Numeric
-‐
Subscriber
(Payer)
phone
number
Ex
–
0656856028
FLAG
1
String
value.
Ex
–
Either
Y
or
N
CONTENT
NA
Alphanumeric
field
may
be
present
under
this
field.
Maximum
140
characters
No
special
characters
like
pipe(‘|’)
Ex
-‐
Dear
Subscriber
your
Transaction
has
been
submitted
successfully.
Sample
response
message
from
the
Partner
Application
to
the
Payment
Gateway
‘SYNC_BILLPAY_API’
is
attached
here.
4
Partner Integration (A2W & W2A) API Details
<?xml
version="1.0"?>
<COMMAND>
<TYPE>SYNC_BILLPAY_RESPONSE</TYPE>
<TXNID>BP140218.1240.B01530</TXNID>
<REFID>000217605331</REFID>
<RESULT>TS</RESULT>
<ERRORCODE>error000</ERRORCODE>
<ERRORDESC/>
<MSISDN>0714405395</MSISDN>
<FLAG>Y</FLAG>
<CONTENT>message_content.</CONTENT>
</COMMAND>
The following are the list of expected ERRORCODE and its description from Partner Application:
1.2.1 Input to the Payment Gateway System from the Partner Application –
‘MFI CashIn’ API Request
TYPE
10
The
request
type
of
the
transaction.
The
value
will
be
constant
in
all
the
request.
Ex
-‐
REQMFICI
REFERENCEID
20
A
value
consisting
of
combination
of
alphanumeric
characters
that
uniquely
identifies
each
request
made
by
the
MFI
Server.
This
value
has
to
be
provided
by
the
MFI
Server
and
a
combination
of
the
TYPE
and
REFERENCEID
field
has
to
be
unique.
Ex
-‐
CI000000000000000001
Note:
Maximum
allowed
length
for
this
element
is
restricted
to
‘20’.
MSISDN
12
Payer
MSISDN.
This
can
should
be
with
country
code.
Ex
–
255721777777
Note:
The
MSISDN
of
Partner
disbursement
account
in
TIGOPESA
has
to
be
passed
in
the
request.
PIN
4
Numeric
or
alphanumeric.
Ex
–
1456
Note:
The
PIN
of
the
Partner
disbursement
account
in
TIGOPESA
has
to
be
passed
in
the
request.
MSISDN1
10/12
Payee
MSISDN
should
be
with/without
country
code.
Ex
–
0721151515
Note:
The
MSISDN
of
the
subscriber’s
account
in
TIGOPESA
has
to
be
passed
in
the
request.
AMOUNT
10
Numeric
Only.
Should
not
accept
amount
in
decimal
points
because
there
is
no
support
for
cents.
Ex
-‐
1000
LANGUAGE1
2
Payer
Language
Ex
-‐
en
6
Partner Integration (A2W & W2A) API Details
Sample
request
message
from
the
Partner
application
to
the
Payment
Gateway
(MFI
CashIn
API)
is
attached
here.
<?xml
version="1.0"?>
<COMMAND>
<TYPE>REQMFICI</TYPE>
<REFERENCEID>REFERENCEID</REFERENCEID>
<MSISDN>MFI-‐MSISDN</MSISDN>
<PIN>MFI-‐PIN</PIN>
<MSISDN1>SUBS-‐MSISDN</MSISDN1>
<AMOUNT>AMOUNT</AMOUNT>
<LANGUAGE1>LANGUAGE-‐CODE</LANGUAGE1>
</COMMAND>
1.2.2 Output from the Payment Gateway System to the Partner Application
– ‘MFI CashIn’ API Response
TYPE
10
Response
Type.
The
value
will
be
constant
in
all
the
response.
Ex
-‐
RESMFICI
REFERENCEID
20
The
same
value
that
is
contained
in
the
REFERENCEID
tag
of
the
Request
XML.
Partner
Application
generated
Transaction
ID.
Ex
-‐
CI000000000000000001
Note:
Maximum
allowed
length
for
this
element
is
restricted
to
‘20’.
TXNID
20
Tigo
Pesa
Transaction
ID
for
the
Cash-‐In
Transaction.
Ex
-‐
42326232
TXNSTATUS
5
Various
transaction
status
Failed,
Success
etc.
Ex
–
200
or
0
for
success
MESSAGE
NA
Response
message.
Ex
-‐
Success
Sample
response
message
from
the
Payment
Gateway
System
to
Partner
Application
‘MFI
CashIn’
API
is
attached
here.
<?xml
version="1.0"?>
<COMMAND>
<TYPE>RESMFICI</TYPE>
<REFERENCEID>REFERENCEID</REFERENCEID>
<TXNID>42326232</TXNID>
<TXNSTATUS>200</TXNSTATUS>
<MESSAGE>Success</MESSAGE>
</COMMAND>
Note:
1. In
case
of
Fail
response
from
Tigo
Pesa,
TXNID
(Tigo
Transaction
ID)
element
in
the
response
will
be
empty.
The following are the list of possible TXNSTATUS codes and description:
TXNSTATUS MESSAGE
00026 PIN expired. Please change your PIN.
00031 Requested amount more then allowed in the network
00042 Requested amount not in multiple of allowed value
317 Unable to complete transaction as recipient A/c is barred. Error code 00317.
Unable to complete transaction as amount is more than the maximum limit. Error
410
code: 00410.
2117 Unable to complete transaction as sender A/c is barred. Error code 02117.
200 or 0 Success
Unable to complete transaction as maximum transaction value per day for payer
60014
reached. Error code 60014.
Unable to complete transaction as transaction amount is less than the minimum
60017
txn value for sender. Error code 60017.
Unable to complete transaction as amount is more than the maximum limit. Error
60018
code 60018.
Unable to complete transaction as account would go below minimum balance.
60019
Error code 60019.
Unable to complete transaction as maximum number of transactions per day for
60021
Payee was reached. Error code 60021.
Unable to complete transaction as maximum transaction value per day reached.
60024
Error code 60024.
Unable to complete transaction as transaction amount is more than the
60028
maximum txn value for recipient. Error code 60028.
Unable to complete transaction as the Payee account would go above maximum
60030
balance. Error code: 60030.
60074 Payee Role Type Transfer Profile not defined
This is generic error, which is returned if problem happen during transaction
processing. Partner should put transaction amount in HOLD state to avoid risk of
100
rollback while amount was disbursed. This is the same case for any kind of
timeout as well.
Other Error As may be added & agreed during integration