Payment Methods


http://webservices.gr8pay.com/v2/paymentmethods.svc

As a PCI level 1 platform we put our focus on the security of all of users and our clients users – that is why we separated all payment related services to a stand alone service to give you easy access to the secured information you need to present.

DeleteStoredPaymentMethod

This service call allows to delete payment method which was stored earlier

Request – Filters

ParameterMandatoryTypeDescription
pmidNointID of the payment method which has to be deleted

Response Parameters

ParameterTypeDescription
d (root element)booleanDefines whether payment method was deleted successfully



C#JavaScriptPHP


GetBillingAddresses

This method allows to get all billing addresses for currently logged in user

Request – Filters

ParameterMandatoryTypeDescription
This method has an empty body as it doesn't require any input parameters. It takes user's credentials token from the request's header automatically and this way detects billing addresses for which user have to be returned. Check Headers topic to get more info on how to add credentials token to request's headers.

Response Parameters

ParameterTypeDescription 
AddressLine1NostringPrimary address
AddressLine2NostringSecondary address
CityNostringCity
CountryIsoNostringCountry ISO
PostalCodeNostringPostal code
StateIsoNostringState ISO



C#JavaScriptPHP


GetStaticData

This service is designed to provide full list of payment methods’ groups (credit card, wallet, etc.) and types (Visa, MasterCard, etc.)

Request – Filters

ParameterMandatoryTypeDescription
This method has an empty body as it doesn't require any input parameters. It takes user's credentials token from the request's header automatically and this way detects payment methods' static data for which user has to be returned. Check Headers topic to get more info on how to add credentials token to request's headers.

Response Parameters

ParameterTypeDescription
PaymentMethodGroupsArrayContains the list of payment methods' groups. Each object in the list has three fields (Icon, Key, Name). Check detailed fields' descriptions below
IconstringPayment method group's icon
KeystringPayment method group's ID
NamestringPayment method group's name
PaymentMethodsArrayContains the list of payment methods' types. Each object in the list has nine fields (Icon, Key, Name, GroupKey, HasExpirationDate, Value1Caption, Value1ValidationRegex, Value2Caption, Value2ValidationRegex). Check detailed fields' descriptions below
IconstringPayment method type's icon
KeystringPayment method type's ID
NamestringPayment method type's name
GroupKeystringID of the payment method group which this payment method type belongs to
HasExpirationDatebooleanDefines whether payment method type has expiration date
Value1Captionstring*TBD*
Value1ValidationRegexstring*TBD*
Value2Captionstring*TBD*
Value2ValidationRegexstring*TBD*



C#JavaScriptPHP


GetStoredPaymentMethod

This service call allows to get exact payment method’s data

Request – Filters

ParameterMandatoryTypeDescription
pmidNointID of the payment method which data has to be loaded

Response Parameters

ParameterMandatoryTypeDescription
AccountValue1NostringAccount number of the payment method (e.g. card number)
AccountValue2Nostring*TBD*
BillingAddressNoThis block contains info about payment methods' billing address
AddressLine1NostringPrimary address
AddressLine2NostringSecondary address
CityNostringCity
CountryIsoNostringCountry ISO
PostalCodeNostringPostal code
StateIsoNostringState ISO
DisplayNostringPayment method's display name
ExpirationDateNodateTimePayment method's expiration date
IDNointID of the payment method
IconNostringIcon for the payment method
IsDefaultNobooleanDefines whether this payment method is marked as default
IssuerCountryIsoCodeNostring*TBD*
Last4DigitsNostringLast 4 digits of the payment methods' number
OwnerNameNostringPayment method's owner name
PaymentMethodGroupKeyNostringID of the group which the payment method belongs to
PaymentMethodKeyNostringID of the type which the payment method belongs to
TitleNostringPayment method's title



C#JavaScriptPHP


This method allows to get all payment methods for currently logged in user

Request – Filters

ParameterMandatoryTypeDescription
This method has an empty body as it doesn't require any input parameters. It takes user's credentials token from the request's header automatically and this way detects payment methods for which user have to be returned. Check Headers topic to get more info on how to add credentials token to request's headers.

Response Parameters

ParameterMandatoryTypeDescription
AccountValue1NostringAccount number of the payment method (e.g. card number)
AccountValue2Nostring*TBD*
BillingAddressNoThis block contains info about payment methods' billing address
AddressLine1NostringPrimary address
AddressLine2NostringSecondary address
CityNostringCity
CountryIsoNostringCountry ISO
PostalCodeNostringPostal code
StateIsoNostringState ISO
DisplayNostringPayment method's display name
ExpirationDateNodateTimePayment method's expiration date
IDNointID of the payment method
IconNostringIcon for the payment method
IsDefaultNobooleanDefines whether this payment method is marked as default
IssuerCountryIsoCodeNostring*TBD*
Last4DigitsNostringLast 4 digits of the payment methods' number
OwnerNameNostringPayment method's owner name
PaymentMethodGroupKeyNostringID of the group which the payment method belongs to
PaymentMethodKeyNostringID of the type which the payment method belongs to
TitleNostringPayment method's title



C#JavaScriptPHP


.

Request – Filters

ParameterMandatoryTypeDescription
dataNoThis block contains requests' data
AccountValue1NostringAccount number (e.g. card number) of the payment method which has to be linked
DateOfBirthNodateTimeDate of birth of the owner of the payment method which has to be linked
PersonalNumberNostringPersonal number of the owner of the payment method which has to be linked (SSN/ ID etc)
PhoneNumberNostringPhone of the owner of the payment method which has to be linked

Response Parameters

ParameterTypeDescription
CodeintResult code
IsSuccessbooleanDefines whether service call was processed successfully or not
KeystringResult key ("Success", "Error", etc.)
MessagestringResult message


C#JavaScriptPHP


This service is used to “Top Up” a MasterCard prepaid card using one of our 3rd party providers.

Request – Filters

ParameterMandatoryTypeDescription
dataNoThis block contains requests' data
AmountNodecimalAmount which has to be loaded to the payment method
CurrencyIsoNostringCurrency ISO with which the amount has to be loaded
PaymentMethodIDNointID of the payment method to which the amount has to be loaded
PinCodeNostringCurrently logged in user's PIN code
ReferenceCodeNostringThe reference code for the deposit

Response Parameters

ParameterTypeDescription
CodeintResult code
IsSuccessbooleanDefines whether service call was processed successfully or not
KeystringResult key ("Success", "Error", etc.)
MessagestringResult message


C#JavaScriptPHP


.

Request – Filters

ParametersMandatoryTypeDescription
dataNoThis block contains requests' data
AddressNoThis block contains info about *TBD*
AddressLine1NostringPrimary address
AddressLine2NostringSecondary address
CityNostringCity
CountryIsoNostringCountry ISO
PostalCodeNostringPostal code
StateIsoNostringState ISO
ProviderIDNostring*TBD*

Response Parameters

ParameterTypeDescription
CodeintResult code
IsSuccessbooleanDefines whether service call was processed successfully or not
KeystringResult key ("Success", "Error", etc.)
MessagestringResult message


C#JavaScriptPHP


This service call allows to create new or update existing payment method for currently logged in user.

Request – Filters

ParameterMandatoryTypeDescription
methodDataNoThis block contains info about the payment method which has to be saved
AccountValue1NostringAccount number of the payment method (e.g. card number)
AccountValue2Nostring*TBD*
BillingAddressNoThis block contains info about payment methods' billing address
AddressLine1NostringPrimary address
AddressLine2NostringSecondary address
CityNostringCity
CountryIsoNostringCountry ISO
PostalCodeNostringPostal code
StateIsoNostringState ISO
DisplayNostringPayment method's display name
ExpirationDateNodateTimePayment method's expiration date
IDNointIn case an existing payment method has to be updated, put ID of that payment method here
In case a new payment method has to be added, set value 0 for this parameter
IconNostringIcon for the payment method
IsDefaultNobooleanDefine whether this payment method is default. Only one default payment method per user's account can exist. In case the user already has a default payment method and tries to set another payment method as default, the payment method marked as default earlier will be set to non-default automatically by the system.
IssuerCountryIsoCodeNostring*TBD*
Last4DigitsNostringLast 4 digits of the payment methods' number
OwnerNameNostringPayment method's owner name
PaymentMethodGroupKeyNostringID of the group which the payment method should belong to
PaymentMethodKeyNostringID of the type which the payment method should belong to
TitleNostringPayment method's title

Response Parameters

ParameterTypeDescription
CodeintResult code
IsSuccessbooleanDefines whether service call was processed successfully or not
KeystringResult key ("Success", "Error", etc.)
MessagestringResult message



C#JavaScriptPHP


This service call allows to create new or update existing payment methods (several at once) for currently logged in user.

Request – Filters

ParameterMandatoryTypeDescription
dataNoArrayShould contain objects with payment methods' data. Check such object's structure below.
AccountValue1NostringAccount number of the payment method (e.g. card number)
AccountValue2Nostring*TBD*
BillingAddressNoThis block contains info about payment methods' billing address
AddressLine1NostringPrimary address
AddressLine2NostringSecondary address
CityNostringCity
CountryIsoNostringCountry ISO
PostalCodeNostringPostal code
StateIsoNostringState ISO
DisplayNostringPayment method's display name
ExpirationDateNodateTimePayment method's expiration date
IDNointIn case an existing payment method has to be updated, put ID of that payment method here
In case a new payment method has to be added, set value 0 for this parameter
IconNostringIcon for the payment method
IsDefaultNobooleanDefine whether this payment method is default. Only one default payment method per user's account can exist. In case the user already has a default payment method and tries to set another payment method as default, the payment method marked as default earlier will be set to non-default automatically by the system.
IssuerCountryIsoCodeNostring*TBD*
Last4DigitsNostringLast 4 digits of the payment methods' number
OwnerNameNostringPayment method's owner name
PaymentMethodGroupKeyNostringID of the group which the payment method should belong to
PaymentMethodKeyNostringID of the type which the payment method should belong to
TitleNostringPayment method's title

Response Parameters

ParameterTypeDescription
CodeintResult code
IsSuccessbooleanDefines whether service call was processed successfully or not
KeystringResult key ("Success", "Error", etc.)
MessagestringResult message
RecordNumberint*TBD*
RefNumbersArrayOfstring*TBD*



C#JavaScriptPHP