Mass Payment Tool

Recurring Payment Tool

 

Preparation

In order to start working with the API, please follow these steps:

You need to create an API attached to your account. To accomplish this, you need to login to your EuroGoldCash account and visit “Merchant Tools” section. Click on “Add New”, which lets you create an API for your account. The API will not work properly without this procedure.

You need to set the following parameters in your API in order for it to function properly:
API NAME. It will be used in every request as a part of authentication process.
SECURITY WORD. This code word will be used in every request as a part of authentication process.

The number of APIs attached to your same account is not limited - you are free to create as many as you wish.
This should help you separate certain functions based on website or interface.

How It Works

In order to commit any API operation you need to create XML document with necessary information. XML formatted data must always be transferred to payment page using POST or GET method. After the server proceeds request it will return XML answer document.

Transfer

Allows you to transfer funds from one account to another. With this command you may transfer any of the available currencies.
To make automated transfer you need to compose request formatted as described below. If transaction with entered parameters will be successful, you will receive appropriated response of described below format. Otherwise you will receive empty response. To authenticate your request you need to create authentication token. Request should be sent to https://api.eurogoldcash.com/transfer.aspx.

Requesting URL

https://api.eurogoldcash.com/transfer.aspx

Request Format:

<TransferRequest ID="id"> <Auth> <ApiName>API name</ApiName> <Token>authentication token</Token> </Auth> <Transfer> <Sender>payer account number</Sender> <Receiver>payee account number</Receiver> <CurrencyId>currency</CurrencyId> <Amount>amount</Amount> <Memo>memo</Memo> <!-- not required --> </Transfer> </TransferRequest>

Example:

<?xml version="1.0" encoding="utf-8"?> <TransferResponse ID="23"> <Auth> <ApiName> ApiName </ApiName> <Token> B92A500EEB73C01DB02FD78944FE623FEFEFF50E4B97827550C8FE5015F111EE </Token> </Auth> <Transfer> <Sender> E1234567 </Sender> <Receiver> E7654321 </Receiver> <CurrencyId> 1 </CurrencyId> <Amount> 1 </Amount> <Memo> Some Memo </Memo> </Transfer> </TransferResponse>

XML-document must always contain information that lets XML API server authenticate requesting user. This document will contain the account number and other information that will help server to accurately identify the user submitting request. Each server request to XML API must contain the following authentication information:

  • EuroGoldCash account number. Account number may be specified in various parts of XML document.
  • API Name.
  • Authentication token, This parameter consists of line of hashed text, formed by the concatenation of API’s secret word and UTC date.

Response format:

<TransferResponse ID="id" date="response date"> <Receipt> <Date>transaction date</Date> <SenderName>payer account name</SenderName> <ReceiverName>payee account name</ReceiverName> <Amount>amount</Amount> <Fee>fee</Fee> <ClosingBalance>payer account balance after executing transfer</ClosingBalance> <Transfer> <TransferId>merchant reference</TransferId> <TransferType>transfer type</TransferType> <Sender>payer account number</Sender> <Recipient>payee account number</Recipient> <CurrencyId>currency</CurrencyId> <Amount>amount</Amount> <Memo>memo</Memo> </Transfer> </Receipt> </TransferResponse>

Example:

<?xml version="1.0" encoding="utf-8"?> <TransferResponse ID="23" date="02.10.2009 13:02"> <Receipt> <Date> 02.10.2009 13:02 </Date> <SenderName> SenderAccountName </SenderName> <ReceiverName> ReceiverAccountName </ReceiverName> <Amount> 1 </Amount> <Fee> 0.01 </Fee> <ClosingBalance> 303.13 </ClosingBalance> <Transfer> <TransferId> 105431362 </TransferId> <TransferType> API </TransferType> <Sender> E1234567 </Sender> <Recipient> E7654321 </Recipient> <CurrencyId> 1 </CurrencyId> <Amount> 1 </Amount> <Memo> Some Memo </Memo> </Transfer> </Receipt> </TransferResponse>

Request Account Name

This API is created to help merchants to determinate the name of provided account.

Requesting URL:

https://api.eurogoldcash.com/transfer.aspx

Request Format:

<AccountNameRequest ID="id"> <Auth> <ApiName>API name</ApiName> <Token>authentication token</Token> </Auth> <AccountName> <AccountId>account number</AccountId> <AccountToRetrieve>number of account for name retrieval</AccountToRetrieve> </AccountName> </AccountNameRequest>

Example:

<?xml version="1.0" encoding="utf-8"?> <AccountNameRequest ID="23"> <Auth> <ApiName> ApiName </ApiName> <Token> 4CA16DA298DA5DCE560ED22E4C7F4E60A9F37E9AB19EADA64D560DFA1744A4F7 </Token> </Auth> <AccountName> <AccountToRetrieve> E1234567 </AccountToRetrieve> <AccountId> E7654321 </AccountId> </AccountName> </AccountNameRequest>

Response Format:

<AccountNameResponse ID="id" date="response date"> <AccountName> <AccountToRetrieve>number of account for name retrieval</AccountToRetrieve> <Date>response date</Date> <Name>account name</Name> </AccountName> </AccountNameResponse>

Example:

<?xml version="1.0" encoding="utf-8"?> <AccountNameResponse ID="23" date="01.10.2009 10:31"> <AccountName> <AccountToRetrieve> E1234567 </AccountToRetrieve> <Date> 01.10.2009 10:31 </Date> <Name> SomeAccountName </Name> </AccountName> </AccountNameResponse>

Balance

Account balance request. His function requests balances of all specified currencies.

Requesting URL:

https://api.eurogoldcash.com/balance.aspx

Request Format:

<BalanceRequest ID="id"> <Auth> <ApiName>API name</ApiName> <Token>authentication token</Token> </Auth> <Balance> <CurrencyId>currency</CurrencyId> <AccountId>account number</AccountId> </Balance> </BalanceRequest>

Example:

<?xml version="1.0" encoding="utf-8"?> <BalanceRequest ID="23"> <Auth> <ApiName> ApiName </ApiName> <Token> 531532BC8D439F1E305168C91EE94D7E0A478586B21F8C6AA9E8A660FD81F715 </Token> </Auth> <Balance> <CurrencyId> 1 </CurrencyId> <AccountId> E1234567 </AccountId> </Balance> </BalanceRequest>

Response Format:

<BalanceResponse ID="id" date="response date"> <Balance> <AccountId>account number</AccountId> <CurrencyId>currency</CurrencyId> <Date>date</Date> <Value>amount (balance value)</Value> </Balance> </BalanceResponse>

Example:

<?xml version="1.0" encoding="utf-8"?> <BalanceResponse ID="23" date="02.10.2009 10:11"> <Balance> <AccountId> E1234567 </AccountId> <CurrencyId> 1 </CurrencyId> <Date> 02.10.2009 10:11 </Date> <Value> 82.49 </Value> </Balance> </BalanceResponse>

History

Requesting URL:

https://api.eurogoldcash.com/history.aspx

Request Format:

<HistoryRequest ID="id"> <Auth> <ApiName>API name</ApiName> <Token>authentication token</Token> </Auth> <History> <CurrencyId>currency</CurrencyId> <!-- not required --> <AccountId>account number</AccountId> <From>start date</From> <!-- not required --> <Till>end date</Till> <!-- not required --> <CorrespondingAccountId>correspondent account number</CorrespondingAccountId> <!-- not required --> <Direction>transaction direction, one of incoming/outgoing/any</Direction> <!-- not required (default empty)--> <MerchantRef>merchant reference</MerchantRef> <!-- not required --> <TransactionId>transaction id</TransactionId> <!-- not required --> <TransactionType>source</TransactionType> <!-- not required; if omitted, defaults to any source --> <AmountFrom>amount, minimal absolute value</AmountFrom> <!-- not required; if omitted, defaults to any amount --> <AmountTo>amount, maximal absolute value</AmountTo> <!-- not required; if omitted, defaults to any amount --> <Pager> <!-- result paging block, not required --> <PageSize>transactions per page of result</PageSize> <PageNumber>page number</PageNumber> </Pager> </History> </HistoryRequest>

Example:

<?xml version="1.0" encoding="utf-8"?> <HistoryRequest ID="23"> <Auth> <ApiName> ApiName </ApiName> <Token> A84DF80AE0E80C2B7AC5FBC4F1744D15595E0FFD3D7E7AFC37F2F2B9496EDFBC </Token> </Auth> <Pager> <PageSize> 3 </PageSize> <PageNumber> 1 </PageNumber> </Pager> <History> <CurrencyId> </CurrencyId> <AccountId> E1234567 </AccountId> <From> 12/13/2009 </From> <Till> 12/20/2009 </Till> <CorrespondingAccountId> </CorrespondingAccountId> <MerchantRef> </MerchantRef> <Direction> incoming </Direction> <TransactionId> </TransactionId> <TransactionType> API </TransactionType> <AmountFrom> 2.4 </AmountFrom> <AmountTo> 10.7 </AmountTo> </History> </HistoryRequest>

With XML API, you have an option to request up to 50 transactions per single history data request. You may use data from TotalCount tag to determine the total number of transactions that were not included in the response in case there is more of those satisfying filter conditions. To organize viewing you may use Paging option in the request.

Response Format:

<HistoryResponse ID="id" date="response date"> <Receipt> <!-- transaction #1 --> <TransactionId>transaction ID</TransactionId> <Date>transaction date</Date> <SenderName>payer account name</SenderName> <RecipientName>payee account name</RecipientName> <Amount>amount</Amount> <Fee>fee</Fee> <ClosingBalance>payer account balance after execution of transaction</ClosingBalance> <Transaction> <MerchRef>merchant reference</MerchRef> <TransactionType>transfer type</TransactionType> <Sender>payer account number</Sender> <Recipient>payee account number</Recipient> <CurrencyId>currency</CurrencyId> <Amount>amount</Amount> <Memo>memo</Memo> <Anonymous>anonymous</Anonymous> <TransactionType>source</TransactionType> </Transaction> </Receipt> <Pager> <PageSize> <!-- actual page size (transaction count) --></PageSize> <PageCount> <!-- page count --></PageCount> <PageNumber> <!-- current page number --></PageNumber> <TotalCount> <!-- total count of selected transactions --></TotalCount> </Pager> </HistoryResponse>

Example:

<?xml version="1.0" encoding="utf-8"?> <HistoryResponse ID="23" date="03.10.2009 10:33"> <Receipt> <TransactionId> 105430805 </TransactionId> <Date> 2009-23-10 14:37:38 </Date> <SenderName> SenderName </SenderName> <RecipientName> RecipientName </RecipientName> <Amount> -2.0000 </Amount> <Fee> 0.0000 </Fee> <ClosingBalance> 93.3900 </ClosingBalance> <Transaction> <MerchRef> </MerchRef> <TransactionType> 6 </TransactionType> <Sender> E1234567 </Sender> <Recipient> E7654321 </Recipient> <CurrencyId> 1 </CurrencyId> <Amount> -2.0000 </Amount> <Memo> TestApi </Memo> <TransactionType> </TransactionType> </Transaction> </Receipt> <Receipt> <TransactionId> 105430809 </TransactionId> <Date> 2009-23-10 14:37:38 </Date> <SenderName> SenderName </SenderName> <RecipientName> RecipientName </RecipientName> <Amount> -7.0000 </Amount> <Fee> 0.0000 </Fee> <ClosingBalance> 96.2900 </ClosingBalance> <Transaction> <MerchRef> </MerchRef> <TransactionType> 6 </TransactionType> <Sender> E1234567 </Sender> <Recipient> E7654321 </Recipient> <CurrencyId> 1 </CurrencyId> <Amount> -7.0000 </Amount> <Memo> TestApi </Memo> <TransactionType> </TransactionType> </Transaction> </Receipt> <Pager> <PageSize> 3 </PageSize> <PageCount> 2 </PageCount> <PageNumber> 1 </PageNumber> <TotalCount> 5 </TotalCount> </Pager> </HistoryResponse>

Creation of authentication token

In order to create authentication token you need to concatenate current UTC date and security word, use one space symbol as separator, and take the hash (SHA256) of it.
Date format is 24H. Example: "03.10.2008 09:15 MySecurityWord". Please note that security word and name of the API is case sensitive.

All Request and Response tags have an "ID" properties. These properties should be equal for one single transaction request/response pair. This "ID" shows that response matches request. We recommend to use random numbers, or merchants internal transaction ID.

Tags Description

Tag Format Description
Sender Text string in a form of xnnnnnnn up to 8 characters in length, where nnnnnnn is an account number, and x is an account type Sender's (API account holder) account number
Receiver Text string in a form of xnnnnnnn up to 8 characters in length, where nnnnnnn is an account number, and x is an account type Recipient's account number
CurrencyId Currency. number one of the following:
1 for USD
2 for EUR
3 for GG
4 for GBP
Selected currency type
Amount Fraction with up to 4 digits in denominator, comma (.) as a separator (.) Amount (in selected currency)
Memo varchar(200) User's memo
Date UTC date Transaction date and time
SenderName varchar(50) Sender's (API account holder) account name
ReceiverName varchar(50) Recipient's account name
Fee Fraction with up to 4 digits in denominator, comma (.) as a separator (.) Fee applied
ClosingBalance Fraction with up to 4 digits in denominator, comma (.) as a separator (.) Established balance upon completion of the transaction
TransferId 9 digits number Transaction batch number
TransferType varchar(10) Type of transaction (API)