Developers - Easy API's for all your Business needs

PayServices Connect/eID API
Please note:

All PayServices APIs require a Merchant Account.
To create a merchant account, go to the Structure tab of your Personal Account, at the top right of the window there is a tab called "Merchant Account".
Click on this tab and you will be able to create a new merchant account.
Once the merchant account is created, reload the page and at the top right of your screen under the menu button "Structure" you will find a drop down menu that allows you to switch from your Personal to your newly created Merchant account.

Where to find the Gateway Username & Password?
It can be found on the Account Structure page of your Merchant account.

In order to be able to use the APIs, you need to add the IP address of your server on the "IP White List" from the structure tab of your Merchant Account.
The PayServices electronic identification system allows three things:
1. It allows new users/clients of your site to register on your site and at the same time register on PayServices.
2. It allows users coming to your site to login once to have both access to their account on your site and to automatically open their electronic wallet while they are redirected on the payment page.
3. It allows existing users of PayServices to login quickly on your site without the need to register again. This can significantly increase your traffic as users can quickly get a new account on your site and already have their payment system setup on your site with PayServices.
•  Understand the two possible use cases
1. The user is not yet registered on PayServices, thus does not have a PayServices Account yet -> Register
2. The user is already registered on PayServices, thus already has a PayServices Account -> Connect
•  Understand what information am I getting from a user while using the PayServices eID
•  Use case #1:

In this case, the user does not have a PayServices Account yet. Therefore the user will perform a new registration on PayServices directly from your site using the PayServices "Register" module. By performing a full registration on PayServices via your website, PayServices will return to you the complete information details that were inserted in the Registration form on PayServices except to one parameter which is the account password that will never be shared with any third-party.

•  Use case #2:

In this case, the user already has a PayServices Account, thus the user will most likely use the PayServices "Connect" module. By using this module, you will receive only limited information details about the user which are: the @Zubybox.com email address, the first name, the last name, the backup email address.
•  How to start using the PayServices eID?
Everything starts with the opening of a Merchant Account on PayServices, if not already done.
To do so, you need to go to your Account Structure, then click on "Merchant Account", then open a new one.
Once the new Merchant Account is opened, you need to go back to your Account Structure (a page reload might be needed), then switch from your Personal to your Professional account.
The details of your newly created Professional Account should appear. Along with the various information, you should find your "PayServices eID identifier". This parameter will be used to identify your merchant account when opening the PayServices Connect iFrame.

A new tab called "IP White List" should appear now.
Use this tab to manage your IP addresses that are allowed to call the PayServices APIs.
•  Learn how to call the PayServices eID
You need to use something like fancybox, lightbox, or the bootstrap iframe modal to open the PayServices eID on your site the same way shown with the above green sample buttons.

Three different parameters need to be passed to the PayServices eID.

1. PSCU => This parameter contains your PayServices eID identifier.
2. PSCDOMAIN => This parameter contains the address of the exact location on your site where to send the notification that the user registered/connected.
3. PSCVAR => This is some open variable where you provide some internal session token to be returned to you.
Open the "Connect" module:

•  Method 1 (Basic using page redirect):
https://www.payservices.com/connect.php?PSCU=A8S603OHL6&PSCDOMAIN=https%3A%2F%2Fwww.payservices.com%2F&PSCVAR=&PSC_CANCEL_URL=url&PSC_SUCCESS_URL=url

•  Method 2 (Advanced without page redirect):
https://www.payservices.com/connect.php?PSCU=A8S603OHL6&PSCDOMAIN=https%3A%2F%2Fwww.payservices.com%2F&PSCVAR=

Open the "Register" module:

•  Method 1 (Basic using page redirect):
https://www.payservices.com/register.php?PSCU=A8S603OHL6&PSCDOMAIN=https%3A%2F%2Fwww.payservices.com%2F&PSCVAR=&PSC_CANCEL_URL=url&PSC_SUCCESS_URL=url

•  Method 2 (Advanced without page redirect):
https://www.payservices.com/register.php?PSCU=A8S603OHL6&PSCDOMAIN=https%3A%2F%2Fwww.payservices.com%2F&PSCVAR=

Quick tip: Use "urlencode" on the url that you pass in the parameter "PSCDOMAIN".
•  Have a look at the XML response
- <email></email> contains the @Zubybox.com email address of the user.
- <backup_email></backup_email> is the external email address that we have on file.
- <verified_by_payservices></verified_by_payservices> tells you if the account is verified yet or not; possible values are "no" or "yes".
- <phone></phone> is the phone number that we have on file in the form of e.g. +19492662111 => The plus (+) sign + the country dial code + the extension number.
- <country_code></country_code> is the country code in the two letters format of e.g. "US",2),2),2),2),2) for United States or "BE" for Belgium.
- <country_name></country_name> is the actual name of the country in the language of the account holder.
•  Understand the flow
Two methods are available:
•  The first method is if you use a redirect page to specify a "PSC_CANCEL_URL" and a "PSC_SUCCESS_URL".
   When doing so, after a successful login/registration, the user will be redirected to the URL that you have specified. While using this method a button to "Return to the merchant website" will also be displayed in the frame.

•  The second method is more beautiful but more complex to implement. The advantage of this method is that the user never actually leaves your website. This method requires to open the frame inside the modal and to implement some mechanism to close the modal and eventually redirect the user once the login/registration is successful. The second method is explained here below in more details.
The PayServices eID is the most convenient system for the customers on your site, however it is maybe the most tricky one within the PayServices toolset of APIs because it requires both some server & client side programming skills and some ingenuity.

Down the road the concept is quite simple: You open the PayServices eID iFrame on your site. While the user is making a successful login/registration, PayServices will send a POST query to the url that you have chosen. Once this call is made, you need to capture the "PSCToken", "PSCVAR", and the "PSCRegister". Those are the three parameters that are sent to you.

The "PSCToken" contains the token for the session that was created and opened.
The "PSCToken" expires after 15 minutes if no call to the server was triggered within this timeframe.
The parameter "PSCVAR" will contain your internal token that you have passed in the URL of the PayServices eID to be returned to you.
The "PSCRegister" contains the value of "1" (new registration) or "0" (existing user).
This parameter is used to define if it is a new registration or simply a connection from an existing PayServices user.

PSCVAR basically contains your internal SESSION ID that you will need to re-conciliate the POST from PayServices with the actual iFrame that is opened on the client's browser. When you call the PayServices Connect/Register Module, you need to pass in PSCVAR some token or internal SESSION ID of yours that you create. This SESSION ID that you create needs to be stored in your local database on your server. When PayServices will send you back the response via POST, it will send you back as well the PSCVAR. According to the content of PSCVAR (your SESSION ID token), you will be able to identify what session you get notified for. That's the first part. The second is happening mostly on the client's side. In the file that opens the PayServices iFrame, you need to create a small javascript/jQuery loop that will call your local database server every 1.5-2 seconds. Every time it will call it, it will basically make an Ajax request to a local script on your server. The only parameter that you really need to pass to that local script is the SESSION ID that you have provided in PSCVAR. The local script will only check for the status of the provided session in the database. If the returned status is 0, you know that PayServices did not send a POST. However, if PayServices sends the POST for that specific session, your script that listens for the POST will update the status of the session in the database to 1. On the client's side, where the user is currently looking at the iFrame, the PayServices iFrame will output some successful message, within the next 1-2 seconds, the local code running in the client's browser will receive a response with a status = 1 from the local script and will then know that it can close the PayServices iFrame and redirect the user to the restricted area. The reason this mechanism was put in place is because it is not possible to send a request from within the iFrame to the parent page while using a cross domain script.

If it is a new registration, the "PSCToken" will only allow you to make one single call to the PayServices server to retrieve the details of the newly registered user. It is important to understand that once the registration is completed, the user is required to manually login to the account he has just opened. When the user will connect to the account, a new PSCToken will be created, but this time, the token will have a life of 15 minutes.

Once you receive the POST call on your server, you need to make a new call to PayServices to receive the XML response that will contain the details of the user. The call is made using a POST the exact same way we do in the Shopping Cart API.
The parameters that you need to send in order to make this call and receive the XML back are:

- "username" => This is your Gateway Username
- "password" => This is your Gateway Password
- "token" => this is the PSCToken that you received earlier
- "pscu" => this is the PayServices eID identifier, the same that you use in the URL of the iFrame
- "pscregister" => this parameter can be either 0 or 1.
- type=doCheckPSCToken

Once you receive the XML, you can close the iFrame that contains the PayServices eID Connection module and redirect the user to the page that you want within your site. Please note that if it was a new registration, you need to close the Register iFrame and open the Connect iFrame for the user to connect to his account first. In order to achieve that, we suggest that you create a small Ajax/jQuery call within a javascript loop that will check every 1.5-2 seconds with your local database if the XML was received. So basically you need to maintain a table with the tokens and the flags to know when the XML was received.
Important notes:
If the PSCToken that you received was associated with a PSCRegister that had a value of 0, it cannot be changed to 1 and vis-versa.
A PSCToken created for a new registration only allows to retrieve the full account details once.
A PSCToken created for a successful connection can be used to make as many calls as you want. Every time that you make a call to the PayServices server with such token, it renews the session for another 15 minutes. If the session has expired (>15 minutes), the PayServices server will respond you with the message "TOKEN_EXPIRED".

To perform a logout, simply send the additional parameter "logout" with the value "1".

The only parameter that will never change in the XML response is the < email >email@zubybox.com< / email >.
We strongly advise to use this parameter to differentiate the users within your database.
•  I want my users to use two factor authentication
No problem, for this there are two requirements:

1. You need to purchase a merchant eID two factor subscription in your account.
2. You need to pass in the URL of the iFrame an extra parameter called "twoFactor" with the value of "1".
•  How to auto-login my customers to their wallet when I redirect them to the secure payment page?
Simple: When you redirect them to the secure payment page, simply add two extra parameters in the redirection URL:

- PSCU => Your PayServices eID identifier
- PSCU_TOKEN => The PSCToken of the session created for the customer when he connected to his account.
PayServices.com is
IPv6 Ready
PayServices Connect/eID API
Mall & Product API
Shopping Cart API
Invoice & Contact API
Authenticator
Donations API
Others
PayServices.com Website Seal
Make your website look more serious by adding PayServices' website seal to let your customers know that you use our great and secure payment platform.

While customers will be able to click on the seal, they will be redirected to your online store on PayServices.com and will be able to review your Business' details and make sure you are entirely legal, as well browse and buy your products.
Your Merchant's Reference ID ($merchant_ref) can be found in your PayServices.com Account under the Merchant's section.

Unless the specified Merchant's Reference is valid, the seal will not redirect to your Online Store but to PayServices.com main page.
Supported Languages
Language
ISO 639-2
Arabic
ara
Chinese
zho
Dutch
nld
English
eng
French
fra
German
deu
Hebrew
heb
Italian
ita
Polish
pol
Romanian
ron
Russian
rus
Spanish
spa
Whenever you need to send a language code, please use the corresponding ISO 639-2 code.
Supported Hard Currencies
Name
ISO 4217
Australian Dollar ($)
AUD
Austrian Euro Schilling (A€S)
AEUS
Canadian Dollar ($)
CAD
Czech Koruna (Kč)
CZK
Danish Krone (kr)
DKK
Euro (€)
EUR
Finnish Euro Markka (F€M)
FEUM
French Euro Franc (€FF)
EUFF
German Euro Mark (D€M)
DEUM
Hong Kong Dollar ($)
HKD
Hungarian Forint (Ft)
HUF
Icelandic Krona (kr)
ISK
Irish Euro Pound (I€P)
IEUP
Japanese Yen (¥)
JPY
Mexican Peso ($)
MXN
New Israeli Shekel (₪)
ILS
New Zealand Dollar ($)
NZD
Norwegian Krone (¤)
NOK
Polish Zloty (zł)
PLN
Pound Sterling (£)
GBP
Romanian Leu (lei)
RON
Russian Ruble (руб)
RUB
Singapore Dollar ($)
SGD
South African Rand (R)
ZAR
Swedish Krona (kr)
SEK
Swiss Franc (CHF)
CHF
Thai baht (฿)
THB
Turkish Lira (¤)
TRY
United States Dollar ($)
USD
Whenever you need to send a hard currency code, please use the corresponding ISO 4217 code.
Supported Complementary Currencies
Name
PSI 2014
4Q (¤)
QQQQ
Alabama State Dollar (AL$)
ALSD
Alaska State Dollar (AK$)
AKSD
American Samoa State Dollar (AS$)
ASSD
Arizona State Dollar (AZ$)
AZSD
Arkansas State Dollar (AR$)
ARSD
Belgian Euro Franc (B€F)
BEUF
Brazilian Jaguar (¤)
BRAJ
California State Dollar (CA$)
CASD
CarbonCredits (¤)
CO2C
Clix (¤)
CLIX
Colorado State Dollar (CO$)
COSD
Connecticut State Dollar (CT$)
CTSD
Delaware State Dollar (DE$)
DESD
District of Columbia State Dollar (DC$)
DCSD
Estonian Euro Kroon (E€K)
EEUK
Euro Drachma (€₯)
EUDR
Florida State Dollar (FL$)
FLSD
Georgia State Dollar (GA$)
GASD
Guam State Dollar (GU$)
GUSD
Hawaii State Dollar (HI$)
HISD
Idaho State Dollar (ID$)
IDSD
Illinois State Dollar (IL$)
ILSD
Indiana State Dollar (IN$)
INSD
Iowa State Dollar (IA$)
IASD
Kansas State Dollar (KS$)
KSSD
Kentucky State Dollar (KY$)
KYSD
Lion Dollar (L$)
LUSD
Lion Euro (L€)
LEUR
Lion Pound (L£)
LGBP
Lion Shekel (L₪)
LILS
LionCoin [Terra] (L©)
LION
Louisiana State Dollar (LA$)
LASD
Maine State Dollar (ME$)
MESD
Maryland State Dollar (MD$)
MDSD
Massachussets State Dollar (MA$)
MASD
Michigan State Dollar (MI$)
MISD
Minnesota State Dollar (MN$)
MNSD
Mississippi State Dollar (MS$)
MSSD
Missouri State Dollar (MO$)
MOSD
Montana State Dollar (MT$)
MTSD
Nebraska State Dollar (NE$)
NESD
Nevada State Dollar (NV$)
NVSD
New Hampshire State Dollar (NH$)
NHSD
New Jersey State Dollar (NJ$)
NJSD
New Mexico State Dollar (NM$)
NMSD
New York State Dollar (NY$)
NYSD
North Carolina State Dollar (NC$)
NCSD
North Dakota State Dollar (ND$)
NDSD
North Mariana Islands State Dollar (MP$)
MPSD
Ohio State Dollar (OH$)
OHSD
Oklahoma State Dollar (OK$)
OKSD
OrIsrael (¤)
ORIL
Oregon State Dollar (OR$)
ORSD
Pennsylvania State Dollar (PA$)
PASD
Puerto Rico State Dollar (PR$)
PRSD
Rhode Island State Dollar (RI$)
RISD
Sisé (s)
SISE
South Carolina State Dollar (SC$)
SCSD
South Dakota State Dollar (SD$)
SDSD
Tennessee State Dollar (TN$)
TNSD
Texas State Dollar (TX$)
TXSD
U.S. Virgin Islands State Dollar (VI$)
VISD
Universal Love Me Tender (¤)
ULMT
Utah State Dollar (UT$)
UTSD
Venezuelan Dollar (¤)
VEND
Vermont State Dollar (VT$)
VTSD
Virginia State Dollar (VA$)
VASD
Washington State Dollar (WA$)
WASD
West Virginia State Dollar (WV$)
WVSD
Wisconsin State Dollar (WI$)
WISD
Wyoming State Dollar (WY$)
WYSD
Whenever you need to send a complementary currency code, please use the corresponding PSI 2014 code.
Supported Crypto Currencies
Name
PSI 2014
AlienCoin (¤)
UALN
Argentum (¤)
UARG
AuroraCoin (¤)
UAUR
BaseBallCardCoin (¤)
BBCC
Bata (¤)
UBTA
BitCoin (¤)
UBTC
BitCoinFast (¤)
UBCF
BitPay (¤)
UBAY
BitRaam (¤)
UBRM
BitcoinDark (¤)
BTCD
BlackCoin (¤)
BLKC
Bottlecaps (¤)
UCAP
Butterfly Bits (¤)
UBFB
CandleCoin (¤)
UCDC
Clams (¤)
CLAM
Cryptonite (¤)
UXCN
Dash (¤)
DASH
DevCoin (¤)
UDVC
Diamond (¤)
UDMD
DigiByte (¤)
UDGB
DigitalCoin (¤)
UDGC
Dnotes (¤)
NOTE
DogeCoin (¤)
DOGE
DogeCoinDark (¤)
DOGD
Earth Dollar (¤)
UEDC
EarthCoin (¤)
UEAC
ElephantCoin (¤)
UELP
Emercoin (¤)
UEMC
Ethereum (¤)
UETH
EuropCoin (¤)
UERC
Expanse (¤)
UEXP
FeatherCoin (¤)
UFTC
FeatherCoin Classic (¤)
FTCC
FortyTwo42 (¤)
FT42
Franko (¤)
UFRK
GameCredits (¤)
UGMC
GuccioneCoin (¤)
UGCC
HTML5Coin (¤)
HTML
HazMatCoin (¤)
UHZT
HundredCoin (¤)
UHUN
ILoveYouCoin (¤)
UILY
IncaKoin (¤)
UIKA
InfiniteCoin (¤)
UIFC
Isracoin (¤)
UISR
Juwelz (¤)
JULZ
KiwiCoin (¤)
KIWI
LikeCoin (¤)
ULIK
LiteCoin (¤)
ULTC
LottoCoin (¤)
ULOT
LycanCoin (¤)
ULYC
MasterTraderCoin (¤)
UMTR
MaxCoin (¤)
UMAX
MazaCoin (¤)
MAZA
MedicCoin (¤)
UMDC
MintCoin (¤)
MINT
MonaCoin (¤)
MONA
MoonCoin (¤)
MOON
NameCoin (¤)
UNMC
NavCoin (¤)
UNAV
Netcoin (¤)
UNET
Neucoin (¤)
UNEU
NineElevenTruthCoin (¤)
UNTC
NobleCoin (¤)
NOBL
NovaCoin (¤)
UNVC
Nuevo BitCentavo Electrónico (¤)
UNBE
Paycoin (¤)
UXPY
PeerCoin (¤)
UPPC
PopularCoin (¤)
UPOP
PrimeCoin (¤)
UXPM
RateCoin (¤)
UXRA
RedCoin (¤)
URED
RippleLite (¤)
UXPL
SexCoin (¤)
USXC
ShadowCoin (¤)
USDC
Spec (¤)
SPEC
Sprouts (¤)
SPRT
StarCoin (¤)
USTR
Steps (¤)
STEP
SterlingCoin (¤)
USLG
TekCoin (¤)
UTEK
TitCoin (¤)
UTIT
TrumpCoin (¤)
TRMP
UltraCoin (¤)
UUTC
Unitary Status Dollar eCoin (¤)
USDE
UnrealCoin (¤)
UURC
Waves (¤)
WAVE
WorldCoin (¤)
UWDC
Whenever you need to send a crypto currency code, please use the corresponding PSI 2014 code.
Download Butterfly Secure Browser