One Click Web Service
This document helps merchants implement dynamic or static one-click purchasing via Segpay’s Web Service. This allows payments to be processed in the background, bypassing Segpay’s payment page so your consumer never leaves your website during the payment process.
The first step in using the One Click Web Service is to provide your Segpay tech support rep with a full list of your IP addresses so they can be white-listed, allowing payments to be processed directly from your site(s).
One-Click Dynamic Pricing
Dynamic Pricing is used to generate a final price for a transaction within a pre-determined range. That final amount is then dynamically sent to Segpay via a transaction request string.
Important:
-
Use of dynamic pricing requires approval by Segpay’s Compliance team.
-
Dynamic pricing can be used with credit card payments only (no online checks or Direct Debit) and does not support stand-in processing.
-
Only one Dynamic price point is allowed per package.
-
All currencies are supported.
Dynamic Price Points
Once approved by Segpay’s Compliance team, a Dynamic Pricing price point will be created, with One-Click enabled. Since card details cannot be sent via Web Services, the consumer must have completed an initial transaction. With One-Click enabled, subsequent transactions are processed using the card details on file.
You will be asked to provide a price range for these transactions, with a minimum and maximum amount allowed. This information is used to create the price point, which you can view in the Segpay Merchant Portal (see image below).
Packages
Each package can support one Dynamic Price point only. Select the Pricing tab when viewing a package in our Merchant Portal (see image below).
Creating the Web Service Request
The base URL needed to send your dynamic pricing information is:
https://service.segpay.com/OneClickSales.asmx/SalesServiceDynamic?
Include the following additional parameters in your request:
Parameter |
Definition |
eticketid |
Combines your package and price point IDs (format XXXXXX:YYYYY; XXXXXX=package ID, YYYYY=price point ID). Get your eticketid from your Segpay rep, or in the Segpay Merchant Portal under My Websites, Manage Packages (Package ID) and My Websites, Price Points (Price Point ID). |
amount |
The amount to be charged to the consumer |
dynamicdesc |
A description of the transaction to be displayed on the payment page, as well as the email receipt and in Segpay's Customer service portal. |
dynamictrans |
Encrypted value of the transaction amount. See Segpay's Dynamic Pricing documentation for details on obtaining this value: https://www.sphelpdesk.com/kb/article/34-dynamic-pricing. NOTE: This is not required for the One Click service on dynamic pricing transactions. However, we recommend including it for an additional level of security. |
OCToken |
The purchase ID of the original sale. Allows the Segpay system to know which card details to use for billing. |
Tip: You can send additional system and user-defined variables as outlined in Segpay's Processing API for Merchants. Refer to the section, Pre-Populate Fields or Request Data.
Example of Dynamic Web Service Request
This is the base URL with example parameters appended:
https://service.segpay.com/OneClickSales.asmx/SalesServiceDynamic?eticketid=122903:9689&amount=25.95&dynamicdesc=50+Tokens+Plus+1+Month+Service&dynamictrans=dsvEzGU8vjsph0kbhZblRC%2f1wjQ%3d&OCToken=26346680
Error Codes
The following error codes are generated when a Dynamic Pricing request is sent incorrectly:
-
Dynamic Pricing No amount passed.
-
Transaction Amount does not match what was passed
-
<string>Dynamic pricing variables not included in URL</string>
One-Click Static Pricing
You can use Segpay’s Web Service to process static price points as well, including One-time or Digital purchases.
Static Price Points
You can set up your non-dynamic price points in the Segpay Merchant portal under My Websites, Price Points. Make sure you select One-Click Enabled when setting up the price point (see dynamic price point example above – static price points will look the same, minus the minimum/maximum fields). Again, since card details cannot be sent via Web Services, the consumer must have completed an initial transaction. With One-Click enabled, subsequent transactions are processed using the card details on file.
Packages
Packages can support multiple static price points (see image below).
The Web Service Request
The base URL for static requests is:
https://service.segpay.com/OneClickSales.asmx/SalesServiceDynamic?eticketid=122903:9689&amount=25.95&dynamicdesc=50+Tokens+Plus+1+Month+Service&dynamictrans=dsvEzGU8vjsph0kbhZblRC%2f1wjQ%3d&OCToken=26346680
Example of Static Web Service
The base URL, with (example) parameters appended:
https://service.segpay.com/OneClickSales.asmx/SalesService?eticketid=122905:9699&OCToken=26346680
As in the example above, non-dynamic requests do not require the dynamictrans or dynamicdesc parameters.
Error Codes
The following error codes are generated when a Static Pricing request is sent incorrectly:
Error | Description |
---|---|
Invalid One Click Token (ERR301) | An invalid OCToken value was passed in. |
Invalid PackageID/Price Option | An invalid eticketID value was passed in. |
Invalid PackageID | The eticketID value passed belongs to a package whose status is not Approved. |