Direct Operator Billing Finland

From txtNation Wiki
Jump to: navigation, search

Direct Operator Billing through Mobiilimaksu in Finland enables you to charge for your products and services directly to the mobile bill of your Finnish end users.


Contents

Elisa

Elisa is the biggest mobile operator in Finland with approximately 34% market share. The following instructions will enable you to make a direct operator billing attempt to a member of this network.

Transaction Flow

Elisa Finland DOB Flow

Making a billing attempt

You should send your HTTP GET requests to the following URL:

  http://client.txtnation.com/finland/elisa_charge.php

The API expects the following parameters to be sent:

Variable Name Example Description Restrictions
cc joebloggs Your company name in our platform This must be between 2 and 30 alphanumeric characters
ekey 88C3CF364123A25BBAB687D4FE8EC628 Your ekey in our platform This will be provided on set up and is available in My.txtnation.com
class sg01 The barring class of the product or service (see below)
ip 169.254.62.72 The IP address of the end user being charged Must be a valid IP address
transaction_id 154289130250073169514852 The transaction ID
price 5.00 The price of the product or service that will be charged to the end user Must be the price in Euros to charge, including the decimal places
description My cool Finland product A short description of the product or service that is being purchased Must be between 5 and 255 characters
url http://www.txtnation.com/shop/elisa-dob-api The URL of the product or service Must be the URL from which the user browsing when the "Pay" button (or similar) was clicked
product My first product The name of the product or service that will appear on the bill of the end user This should enable the end user to quickly identify the service that was purchased (max 35 characters)

Available Classes

Telephone services have been divided into groups on the basis of their content.

  • Non-profit services
  • Online services
  • Entertainment services
  • Adult entertainment services


You should decide which class best represents your product or service and use one of the following values:

Class name Description
sg1 Non-profit services
sg2 Online services
sg3 Entertainment services
sg4 Adult services

Interpreting the result

A successful call to this API will generate output similar to the following:

 {
     status: "ok",
     status_message: "ok",
     ref_id: "154289130250073169514852",
     msisdn: "353123456789"
 }

The ref_id parameter can be used to refund the end user using a separate API call.

If the check is not successful you may receive an error similar to the following:

 {
     status: "error",
     error_code: 5000,
     error_message: "Missing parameter: cc"
 }

A full list of error codes is provided below for your reference.

Error code HTTP code Error description
5000 400 Your request was missing a required parameter. Details of the missing parameter will be returned in the error_message.
5001 400 One (or more) of the parameters you supplied were not formatted correctly. Details of the bad parameter will be returned in the error_message.
5002 403 The credentials you supplied could not be authorised. Please check the cc and ekey parameters.
5003 500 There was an error when we passed the billing request to Sonera.
5004 503 There was an internal error with the request. Please try again later.
5005 400 The price point you requested was not available. Please contact txtNation support if you wish to use this price point.
5006 503 There was an internal error with the request. Please try again later.
5007 400 The reference ID you provided could not be matched to an original transaction.
1022 400 IP address is invalid
1023 400 IP address doesn't match temporary ticket
1070 400 Service Url field is missing or empty
1072 400 Service URL is invalid
1080 400 Description field is missing or empty
1082 400 Description is invalid
1090 400 Class field is missing or empty
1092 400 Class is invalid
1120 400 Price field is missing or empty
1122 400 Price is invalid (negative amount)
1123 400 Committed price is lower than initial one
1124 400 Committed price is higher than initial one
1130 400 Service class field is missing or empty
1132 400 Service class is invalid
1140 400 Transaction ID field is missing or empty
1142 400 Transaction ID is invalid
1143 400 Transaction is not found
1150 400 MSISDN field is missing or empty
1152 400 MSISDN is invalid
1153 400 MSISDN does not match temporary ticket
1154 400 MSISDN is restricted
1155 400 Operator code is blocked
1156 400 IMSI is restricted
2000 400 Transaction rejected due to digital profile (EstoPM)
2001 400 Transaction rejected due to sg1 barring class (EstoP1)
2002 400 Transaction rejected due to sg2 barring class (EstoP2)
2003 400 Transaction rejected due to sg3 barring class (EstoP3)
2004 400 Transaction rejected due to sg4 barring class (EstoP4)
2005 400 Max price exceeded
3000 400 Transaction rejected due to Account Information and Refill (AIR) server error
4101 400 Transaction rejected due to Varma prepaid check HTTP request error
4102 400 Transaction rejected due to Varma prepaid check I/O error
4103 400 Transaction rejected due to Varma prepaid check HTTP request status not OK
4104 400 Transaction rejected due to Varma prepaid check did not find MSISDN

Sonera

Sonera is the second biggest mobile operator in Finland with approximately 31% market share. The following instructions will enable you to make a direct operator billing attempt to a member of this network.

Transaction Flow

Sonera Finland DOB Flow

Start your billing attempt

To create a billing attempt there are two steps you need to perform: check and charge. By checking the billing attempt first, it allows us to generate a transaction ID which can be used during charge.

You should send your HTTP GET requests to:

   http://client.txtnation.com/finland/sonera_charge.php

The API expects the following parameters to be sent:

Variable Name Example Description Restrictions
cc joebloggs Your company name in our platform This must be between 2 and 30 alphanumeric characters
ekey 88C3CF364123A25BBAB687D4FE8EC628 Your ekey in our platform This will be provided on set up and is available in My.txtnation.com.
msisdn 358400000000 The MSISDN of the end user to charge.
service_id 2134 The ID of your service. This will be provided to you by the txtNation Support team.
action check, charge, cancel The action to perform (see Transaction Flow, above).
charge 1.99 The value, in Euros, to charge the end user. This should be a value that has been previously assigned to your service_id
ref_id * ef9ab47c8d99ff32ef9ab47c8d99ff32 The reference id for the transaction (this is returned by the call to action=check) This is required for charge and cancel operations

* Denotes an optional parameter

Please provide txtNation with a description of your service when requesting a service_id. This is required by TeliaSonera during the initial set up process.

You will also need to inform txtNation when you have completed and tested your integration so that we can switch your account to Production mode.

Interpreting the result

A successful call to this API will generate output similar to the following:

 {
     status: "ok",
     ref_id: "ef9ab47c8d99ff32ef9ab47c8d99ff32"
 }

If the check is not successful you may receive an error similar to the following:

 {
     status: "error",
     error_code: 94,
     error_message: "MSISDN not found on Sonera/Saunalahti"
 }

A full list of error codes is presented below with the HTTP code that will be returned:

Error code HTTP code Error description
1 400 Your request was missing a required parameter. Details of the missing parameter will be returned in the error_message.
2 400 One (or more) of the parameters you supplied were not formatted correctly. Details of the bad parameter will be returned in the error_message.
3 403 The credentials you supplied could not be authorised. Please check the cc and ekey parameters.
4 503 There was an internal error with the request. Please try again later.
5 400 There was an error when we passed the billing request to Sonera.
91 503 System error or Mobile Charger service temporarily out of service
92 400 One or more URL parameters missing from the HTTP request
93 503 One or more URL parameter values out of range
94 400 MSISDN not found on Sonera/Saunalahti
95 400 MSISDN is temporarily blacklisted or does not have permission to use the service specified by the service_id
96 400 Parameter service_id not found
97 400 Service specified by the service_id is disabled
98 503 Service type specified by the service_id is not a Charging Service
99 400 Transaction specified by the transaction_id is not found
911 400 Mobile Charger service is not enabled on this CGW licence

DNA

DNA commands a 24% market share of mobile communication in Finland. The following instructions will enable you to make a direct operator billing attempt to a customer of this network.

Transaction Flow

DNA Finland DOB Flow

Start your billing attempt

To create a billing attempt you should send your HTTP GET requests to:

   http://client.txtnation.com/finland/dna_charge.php

The API expects the following parameters to be sent:

Variable Name Example Description Restrictions
cc joebloggs Your company name in our platform This must be between 2 and 30 alphanumeric characters
ekey 88C3CF364123A25BBAB687D4FE8EC628 Your ekey in our platform This will be provided on set up and is available in My.txtnation.com.
msisdn 358400000000 The MSISDN of the end user to charge.
category 3 The type of content that is being bought by the end user (must match your original request to dna_session.php) 1 = General services, 2 = Consulting and ordering services, 3 = Entertainment services, 4 = Adult services
transaction_id I123456789 The transaction_id returned during the API call to dna_get_msisdn.php
price 1.00 The total value, in Euros, to charge the end user. This should be a value that has been previously arranged with txtNation
ref_id ef9ab47c8daa The ref_id that was provided to you during the inital API call to dna_session.php.

Interpreting the result

A successful call to this API will generate output similar to the following:

 {
   status: "ok",
   status_message: "ok",
   ref_id: "I1234567890"
 }

If the check is not successful you may receive an error similar to the following:

 {
     status: "error",
     error_code: 2000,
     error_message: "Error during direct charge billing attempt!"
 }

A full list of error codes is provided below for your reference.

Error code HTTP code Error description
5000 400 There was at least one parameter missing in the request. More details will be provided by the error message.
5001 400 At least one of the parameters would in the wrong format.
5002 403 We could not authenticate your cc/ekey credentials.
5003 500 When contacting DNA with your request it could not be completed successfully.
5004 503 There was an error when saving your request. If this problem persists please contact txtNation Support.
5005 400 The price point you chose was not available. Price points need to be configured by txtNation before they are available to you.
5006 503 There was an error when saving your response. If this problem persists please contact txtNation Support.
5007 500 Could not find the ref_id from the initial call to dna_session.php.
1000 400 Authentication failed to username/password check
1001 400 Authentication failed to IP check
1002 400 Internal error
1003 400 Subscriber barred
1100 400 Missing parameter ‘username’
1101 400 Missing parameter ‘password’
1102 400 Missing parameter ‘action’
1103 400 Missing parameter ‘transactionid’
1105 400 Missing parameter ‘price’ or ‘vatclass’
1106 400 Missing parameter ‘serviceid’
1500 400 Invalid parameter ‘username’
1501 400 Invalid parameter ‘password’
1502 400 Invalid parameter ‘action’
1503 400 Invalid parameter ‘transactionid’
1506 400 Invalid parameter ‘serviceid’
1508 400 Invalid parameter ‘servicegroupid’
1509 400 Invalid parameter ‘servicedescid’
1510 400 Invalid parameter ‘price’
1512 400 Invalid parameter ‘vatclass’
1600 400 Invalid Content-Type
1601 400 Invalid message
2000 400 Unknown transaction ID
2001 400 Expired transaction ID
3000 400 Subscriber check failed to connection error
3001 400 Subscriber check failed to unknown MSISDN
3002 400 Subscriber check failed to response timeout
3003 400 Subscriber check failed to barred MSISDN
4000 400 Prepaid charging failed to connection error
4001 400 Prepaid charging failed to insufficient balance
4002 400 Prepaid charging failed to response timeout
4003 400 Prepaid charging failed to Prepaid system error
Personal tools