Phone Billing Integration Example

From TMM Wiki
Jump to navigationJump to search

This article is meant as a basic guide. Please reference your Biller Query Letter for full details

To start let's assume a surfer is on a website and is ready to purchase. They then hit the Nats "prejoin" page where they select "Pay by SMS"

Example from my Dev installation

http://nats4.rob.vodka.toomuchmedia.com/signup/signup.php?nats=MC4wLjEuMS4wLjAuMC4wLjA&step=2

Nats gathers the required information (to send to your system) and passes this to you (either via a redirect or a backend post) Example of a redirect:

http://www.gxplugin.com/loader2/loader.php?id=120-92&site=ims&c_code=us&type=1&lang=en&ctype=high&cascade=&x_session=a004e6a089e91524fff2ded3c06b6745&x_id=92&products=-phone

This often identifies the client account collecting the purchase, the purchasing type, currency, etc. Nats will also need the ability to set a "passthrough" which needs to be returned on all subsequent communication. This passthrough should be allowed 255 characters (or more) in length
From here, your system is responsible for communication with Nats

  • Addition/removal of surfer access
  • Transaction/subscription details
    Example of surfer access posts (the domain on this post is going to be client specific):
    http://nats4.rob.vodka.toomuchmedia.com/signup/process_voxtel.php?accountid=<account identifier>&type=ADD&nats_passthrough=<passthrough sent on the initial request>&username=<surfer username>&password=<password>&site=<site being joined> 
    
    http://nats4.rob.vodka.toomuchmedia.com/signup/process_voxtel.php?accountid=<account identifier>&type=REMOVE&nats_passthrough=<passthrough sent on the initial request>&username=<surfer username>&password=<password>&site=<site being joined>
    

    Transaction/subscription details (can be done via post or polling, polling is preferred) Nats (on a server cronjob) sends a request to your system for all transaction details for a given account/time range

    http://voxtel.com/nats_poll.php?account=<account being polled for>&start=<start>&end=<end>
    

    In this polling report Nats will need to know the following (full details are available in the query letter):

  • Type of transaction (initial, rebill, refund, chargeback etc)
  • A unique identifier for this transaction
  • A unique identifier for the transaction's member (subscription id)
  • Nats passthrough sent on the original request
  • Amount and currency of transaction
  • Payment type of transaction (phone, sms, credit card etc)
  • Reference transaction (this applies to refunds/chargebacks and should be the transaction id of the transaction being acted against) Example polling line received by Nats (with header to identify field order):
    Transaction type,Transaction id, Subscription id, Passthrough, Amount, Currency, Payment Type,Reference Transaction, Username, Password, Country, Address, City, State, Zip
    initial,12345,12345,123*dsfjkh487fvsdj4,14.99,USD,SMS,,Rob,Tester,USA,393 test rd, hazlet, nj, 07723
    rebill,12346,12345,123*dsfjkh487fvsdj4,14.99,USD,SMS,,Rob,Tester,USA,393 test rd, hazlet, nj, 07723
    refund,12347,12345,123*dsfjkh487fvsdj4,14.99,USD,SMS,123456,Rob,Tester,USA,393 test rd, hazlet, nj, 07723
    


    Nats will then update the member records created from the prejoin page with the transaction details/amounts received.