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.
This service call allows to delete payment method which was stored earlier
Parameter | Mandatory | Type | Description |
---|---|---|---|
pmid | No | int | ID of the payment method which has to be deleted |
Parameter | Type | Description |
---|---|---|
d (root element) | boolean | Defines whether payment method was deleted successfully |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | using System; using RestSharp; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { var client = new RestClient("https://webservices.gr8pay.com/v2/PaymentMethods.svc/DeleteStoredPaymentMethod"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{\r\n \"pmid\": int\r\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/PaymentMethods.svc/DeleteStoredPaymentMethod", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": "{\r\n \"pmid\": int\r\n}", }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/PaymentMethods.svc/DeleteStoredPaymentMethod", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{\r\n \"pmid\": int\r\n}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
This method allows to get all billing addresses for currently logged in user
Parameter | Mandatory | Type | Description |
---|---|---|---|
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. |
Parameter | Type | Description | |
---|---|---|---|
AddressLine1 | No | string | Primary address |
AddressLine2 | No | string | Secondary address |
City | No | string | City |
CountryIso | No | string | Country ISO |
PostalCode | No | string | Postal code |
StateIso | No | string | State ISO |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | using System; using RestSharp; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { var client = new RestClient("https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetBillingAddresses"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | var settings = { "url": "https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetBillingAddresses", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetBillingAddresses", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
This service is designed to provide full list of payment methods’ groups (credit card, wallet, etc.) and types (Visa, MasterCard, etc.)
Parameter | Mandatory | Type | Description |
---|---|---|---|
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. |
Parameter | Type | Description |
---|---|---|
PaymentMethodGroups | Array | Contains the list of payment methods' groups. Each object in the list has three fields (Icon, Key, Name). Check detailed fields' descriptions below |
Icon | string | Payment method group's icon |
Key | string | Payment method group's ID |
Name | string | Payment method group's name |
PaymentMethods | Array | Contains 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 |
Icon | string | Payment method type's icon |
Key | string | Payment method type's ID |
Name | string | Payment method type's name |
GroupKey | string | ID of the payment method group which this payment method type belongs to |
HasExpirationDate | boolean | Defines whether payment method type has expiration date |
Value1Caption | string | *TBD* |
Value1ValidationRegex | string | *TBD* |
Value2Caption | string | *TBD* |
Value2ValidationRegex | string | *TBD* |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | using System; using RestSharp; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { var client = new RestClient("https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetStaticData"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | var settings = { "url": "https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetStaticData", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetStaticData", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
This service call allows to get exact payment method’s data
Parameter | Mandatory | Type | Description |
---|---|---|---|
pmid | No | int | ID of the payment method which data has to be loaded |
Parameter | Mandatory | Type | Description |
---|---|---|---|
AccountValue1 | No | string | Account number of the payment method (e.g. card number) |
AccountValue2 | No | string | *TBD* |
BillingAddress | No | This block contains info about payment methods' billing address | |
AddressLine1 | No | string | Primary address |
AddressLine2 | No | string | Secondary address |
City | No | string | City |
CountryIso | No | string | Country ISO |
PostalCode | No | string | Postal code |
StateIso | No | string | State ISO |
Display | No | string | Payment method's display name |
ExpirationDate | No | dateTime | Payment method's expiration date |
ID | No | int | ID of the payment method |
Icon | No | string | Icon for the payment method |
IsDefault | No | boolean | Defines whether this payment method is marked as default |
IssuerCountryIsoCode | No | string | *TBD* |
Last4Digits | No | string | Last 4 digits of the payment methods' number |
OwnerName | No | string | Payment method's owner name |
PaymentMethodGroupKey | No | string | ID of the group which the payment method belongs to |
PaymentMethodKey | No | string | ID of the type which the payment method belongs to |
Title | No | string | Payment method's title |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | using System; using RestSharp; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { var client = new RestClient("https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetStoredPaymentMethod"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{\r\n \"pmid\": int\r\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetStoredPaymentMethod", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": "{\r\n \"pmid\": int\r\n}", }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetStoredPaymentMethod", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{\r\n \"pmid\": int\r\n}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
This method allows to get all payment methods for currently logged in user
Parameter | Mandatory | Type | Description |
---|---|---|---|
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. |
Parameter | Mandatory | Type | Description |
---|---|---|---|
AccountValue1 | No | string | Account number of the payment method (e.g. card number) |
AccountValue2 | No | string | *TBD* |
BillingAddress | No | This block contains info about payment methods' billing address | |
AddressLine1 | No | string | Primary address |
AddressLine2 | No | string | Secondary address |
City | No | string | City |
CountryIso | No | string | Country ISO |
PostalCode | No | string | Postal code |
StateIso | No | string | State ISO |
Display | No | string | Payment method's display name |
ExpirationDate | No | dateTime | Payment method's expiration date |
ID | No | int | ID of the payment method |
Icon | No | string | Icon for the payment method |
IsDefault | No | boolean | Defines whether this payment method is marked as default |
IssuerCountryIsoCode | No | string | *TBD* |
Last4Digits | No | string | Last 4 digits of the payment methods' number |
OwnerName | No | string | Payment method's owner name |
PaymentMethodGroupKey | No | string | ID of the group which the payment method belongs to |
PaymentMethodKey | No | string | ID of the type which the payment method belongs to |
Title | No | string | Payment method's title |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | using System; using RestSharp; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { var client = new RestClient("https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetStoredPaymentMethods"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | var settings = { "url": "https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetStoredPaymentMethods", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/PaymentMethods.svc/GetStoredPaymentMethods", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
.
Parameter | Mandatory | Type | Description |
---|---|---|---|
data | No | This block contains requests' data | |
AccountValue1 | No | string | Account number (e.g. card number) of the payment method which has to be linked |
DateOfBirth | No | dateTime | Date of birth of the owner of the payment method which has to be linked |
PersonalNumber | No | string | Personal number of the owner of the payment method which has to be linked (SSN/ ID etc) |
PhoneNumber | No | string | Phone of the owner of the payment method which has to be linked |
Parameter | Type | Description |
---|---|---|
Code | int | Result code |
IsSuccess | boolean | Defines whether service call was processed successfully or not |
Key | string | Result key ("Success", "Error", etc.) |
Message | string | Result message |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/international.svc/GetCurrencyRates"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | var settings = { "url": "https://webservices.gr8pay.com/v2/international.svc/GetCurrencyRates", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/international.svc/GetCurrencyRates", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
This service is used to “Top Up” a MasterCard prepaid card using one of our 3rd party providers.
Parameter | Mandatory | Type | Description |
---|---|---|---|
data | No | This block contains requests' data | |
Amount | No | decimal | Amount which has to be loaded to the payment method |
CurrencyIso | No | string | Currency ISO with which the amount has to be loaded |
PaymentMethodID | No | int | ID of the payment method to which the amount has to be loaded |
PinCode | No | string | Currently logged in user's PIN code |
ReferenceCode | No | string | The reference code for the deposit |
Parameter | Type | Description |
---|---|---|
Code | int | Result code |
IsSuccess | boolean | Defines whether service call was processed successfully or not |
Key | string | Result key ("Success", "Error", etc.) |
Message | string | Result message |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/international.svc/GetCurrencyRates"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | var settings = { "url": "https://webservices.gr8pay.com/v2/international.svc/GetCurrencyRates", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/international.svc/GetCurrencyRates", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
.
Parameters | Mandatory | Type | Description |
---|---|---|---|
data | No | This block contains requests' data | |
Address | No | This block contains info about *TBD* | |
AddressLine1 | No | string | Primary address |
AddressLine2 | No | string | Secondary address |
City | No | string | City |
CountryIso | No | string | Country ISO |
PostalCode | No | string | Postal code |
StateIso | No | string | State ISO |
ProviderID | No | string | *TBD* |
Parameter | Type | Description |
---|---|---|
Code | int | Result code |
IsSuccess | boolean | Defines whether service call was processed successfully or not |
Key | string | Result key ("Success", "Error", etc.) |
Message | string | Result message |
1 2 3 4 5 6 7 8 9 | var client = new RestClient("https://webservices.gr8pay.com/v2/international.svc/GetCurrencyRates"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | var settings = { "url": "https://webservices.gr8pay.com/v2/international.svc/GetCurrencyRates", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/international.svc/GetCurrencyRates", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
This service call allows to create new or update existing payment method for currently logged in user.
Parameter | Mandatory | Type | Description |
---|---|---|---|
methodData | No | This block contains info about the payment method which has to be saved | |
AccountValue1 | No | string | Account number of the payment method (e.g. card number) |
AccountValue2 | No | string | *TBD* |
BillingAddress | No | This block contains info about payment methods' billing address | |
AddressLine1 | No | string | Primary address |
AddressLine2 | No | string | Secondary address |
City | No | string | City |
CountryIso | No | string | Country ISO |
PostalCode | No | string | Postal code |
StateIso | No | string | State ISO |
Display | No | string | Payment method's display name |
ExpirationDate | No | dateTime | Payment method's expiration date |
ID | No | int | In 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 |
Icon | No | string | Icon for the payment method |
IsDefault | No | boolean | Define 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. |
IssuerCountryIsoCode | No | string | *TBD* |
Last4Digits | No | string | Last 4 digits of the payment methods' number |
OwnerName | No | string | Payment method's owner name |
PaymentMethodGroupKey | No | string | ID of the group which the payment method should belong to |
PaymentMethodKey | No | string | ID of the type which the payment method should belong to |
Title | No | string | Payment method's title |
Parameter | Type | Description |
---|---|---|
Code | int | Result code |
IsSuccess | boolean | Defines whether service call was processed successfully or not |
Key | string | Result key ("Success", "Error", etc.) |
Message | string | Result message |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | using System; using RestSharp; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { var client = new RestClient("https://webservices.gr8pay.com/v2/PaymentMethods.svc/StorePaymentMethod"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{\r\n \"methodData\": {\r\n \"AccountValue1\": \"string\",\r\n \"AccountValue2\": \"string\",\r\n \"BillingAddress\": {\r\n \"AddressLine1\": \"string\",\r\n \"AddressLine2\": \"string\",\r\n \"City\": \"string\",\r\n \"CountryIso\": \"string\",\r\n \"PostalCode\": \"string\",\r\n \"StateIso\": \"string\"\r\n },\r\n \"Display\": \"string\",\r\n \"ExpirationDate\": dateTime,\r\n \"ID\": int,\r\n \"Icon\": \"string\",\r\n \"IsDefault\": boolean,\r\n \"IssuerCountryIsoCode\": \"string\",\r\n \"Last4Digits\": \"string\",\r\n \"OwnerName\": \"string\",\r\n \"PaymentMethodGroupKey\": \"string\",\r\n \"PaymentMethodKey\": \"string\",\r\n \"Title\": \"string\"\r\n }\r\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/PaymentMethods.svc/StorePaymentMethod", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": "{\r\n \"methodData\": {\r\n \"AccountValue1\": \"string\",\r\n \"AccountValue2\": \"string\",\r\n \"BillingAddress\": {\r\n \"AddressLine1\": \"string\",\r\n \"AddressLine2\": \"string\",\r\n \"City\": \"string\",\r\n \"CountryIso\": \"string\",\r\n \"PostalCode\": \"string\",\r\n \"StateIso\": \"string\"\r\n },\r\n \"Display\": \"string\",\r\n \"ExpirationDate\": dateTime,\r\n \"ID\": int,\r\n \"Icon\": \"string\",\r\n \"IsDefault\": boolean,\r\n \"IssuerCountryIsoCode\": \"string\",\r\n \"Last4Digits\": \"string\",\r\n \"OwnerName\": \"string\",\r\n \"PaymentMethodGroupKey\": \"string\",\r\n \"PaymentMethodKey\": \"string\",\r\n \"Title\": \"string\"\r\n }\r\n}", }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/PaymentMethods.svc/StorePaymentMethod", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{\r\n \"methodData\": {\r\n \"AccountValue1\": \"string\",\r\n \"AccountValue2\": \"string\",\r\n \"BillingAddress\": {\r\n \"AddressLine1\": \"string\",\r\n \"AddressLine2\": \"string\",\r\n \"City\": \"string\",\r\n \"CountryIso\": \"string\",\r\n \"PostalCode\": \"string\",\r\n \"StateIso\": \"string\"\r\n },\r\n \"Display\": \"string\",\r\n \"ExpirationDate\": dateTime,\r\n \"ID\": int,\r\n \"Icon\": \"string\",\r\n \"IsDefault\": boolean,\r\n \"IssuerCountryIsoCode\": \"string\",\r\n \"Last4Digits\": \"string\",\r\n \"OwnerName\": \"string\",\r\n \"PaymentMethodGroupKey\": \"string\",\r\n \"PaymentMethodKey\": \"string\",\r\n \"Title\": \"string\"\r\n }\r\n}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |
This service call allows to create new or update existing payment methods (several at once) for currently logged in user.
Parameter | Mandatory | Type | Description |
---|---|---|---|
data | No | Array | Should contain objects with payment methods' data. Check such object's structure below. |
AccountValue1 | No | string | Account number of the payment method (e.g. card number) |
AccountValue2 | No | string | *TBD* |
BillingAddress | No | This block contains info about payment methods' billing address | |
AddressLine1 | No | string | Primary address |
AddressLine2 | No | string | Secondary address |
City | No | string | City |
CountryIso | No | string | Country ISO |
PostalCode | No | string | Postal code |
StateIso | No | string | State ISO |
Display | No | string | Payment method's display name |
ExpirationDate | No | dateTime | Payment method's expiration date |
ID | No | int | In 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 |
Icon | No | string | Icon for the payment method |
IsDefault | No | boolean | Define 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. |
IssuerCountryIsoCode | No | string | *TBD* |
Last4Digits | No | string | Last 4 digits of the payment methods' number |
OwnerName | No | string | Payment method's owner name |
PaymentMethodGroupKey | No | string | ID of the group which the payment method should belong to |
PaymentMethodKey | No | string | ID of the type which the payment method should belong to |
Title | No | string | Payment method's title |
Parameter | Type | Description |
---|---|---|
Code | int | Result code |
IsSuccess | boolean | Defines whether service call was processed successfully or not |
Key | string | Result key ("Success", "Error", etc.) |
Message | string | Result message |
RecordNumber | int | *TBD* |
RefNumbers | ArrayOfstring | *TBD* |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | using System; using RestSharp; namespace HelloWorldApplication { class HelloWorld { static void Main(string[] args) { var client = new RestClient("https://webservices.gr8pay.com/v2/PaymentMethods.svc/StorePaymentMethods"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("applicationToken", "fed45b9d-429f-449e-96a7-48ea02d8156a"); request.AddHeader("your_app_Token", "fd8e72b2-a769-4d2b-a656-f54001aaeaf5"); request.AddParameter("application/json", "{\r\n \"data\": [\r\n {\r\n \"AccountValue1\": \"string\",\r\n \"AccountValue2\": \"string\",\r\n \"BillingAddress\": {\r\n \"AddressLine1\": \"string\",\r\n \"AddressLine2\": \"string\",\r\n \"City\": \"string\",\r\n \"CountryIso\": \"string\",\r\n \"PostalCode\": \"string\",\r\n \"StateIso\": \"string\"\r\n },\r\n \"Display\": \"string\",\r\n \"ExpirationDate\": dateTime,\r\n \"ID\": int,\r\n \"Icon\": \"string\",\r\n \"IsDefault\": boolean,\r\n \"IssuerCountryIsoCode\": \"string\",\r\n \"Last4Digits\": \"string\",\r\n \"OwnerName\": \"string\",\r\n \"PaymentMethodGroupKey\": \"string\",\r\n \"PaymentMethodKey\": \"string\",\r\n \"Title\": \"string\"\r\n },\r\n ...\r\n ]\r\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | var settings = { "url": "https://webservices.gr8pay.com/v2/PaymentMethods.svc/StorePaymentMethods", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "applicationToken": "fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token": "fd8e72b2-a769-4d2b-a656-f54001aaeaf5" }, "data": "{\r\n \"data\": [\r\n {\r\n \"AccountValue1\": \"string\",\r\n \"AccountValue2\": \"string\",\r\n \"BillingAddress\": {\r\n \"AddressLine1\": \"string\",\r\n \"AddressLine2\": \"string\",\r\n \"City\": \"string\",\r\n \"CountryIso\": \"string\",\r\n \"PostalCode\": \"string\",\r\n \"StateIso\": \"string\"\r\n },\r\n \"Display\": \"string\",\r\n \"ExpirationDate\": dateTime,\r\n \"ID\": int,\r\n \"Icon\": \"string\",\r\n \"IsDefault\": boolean,\r\n \"IssuerCountryIsoCode\": \"string\",\r\n \"Last4Digits\": \"string\",\r\n \"OwnerName\": \"string\",\r\n \"PaymentMethodGroupKey\": \"string\",\r\n \"PaymentMethodKey\": \"string\",\r\n \"Title\": \"string\"\r\n },\r\n ...\r\n ]\r\n}", }; $.ajax(settings).done(function (response) { console.log(response); }); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | <!--?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL =--> "https://webservices.gr8pay.com/v2/PaymentMethods.svc/StorePaymentMethods", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS =>"{\r\n \"data\": [\r\n {\r\n \"AccountValue1\": \"string\",\r\n \"AccountValue2\": \"string\",\r\n \"BillingAddress\": {\r\n \"AddressLine1\": \"string\",\r\n \"AddressLine2\": \"string\",\r\n \"City\": \"string\",\r\n \"CountryIso\": \"string\",\r\n \"PostalCode\": \"string\",\r\n \"StateIso\": \"string\"\r\n },\r\n \"Display\": \"string\",\r\n \"ExpirationDate\": dateTime,\r\n \"ID\": int,\r\n \"Icon\": \"string\",\r\n \"IsDefault\": boolean,\r\n \"IssuerCountryIsoCode\": \"string\",\r\n \"Last4Digits\": \"string\",\r\n \"OwnerName\": \"string\",\r\n \"PaymentMethodGroupKey\": \"string\",\r\n \"PaymentMethodKey\": \"string\",\r\n \"Title\": \"string\"\r\n },\r\n ...\r\n ]\r\n}", CURLOPT_HTTPHEADER => array( "Content-Type: application/json", "applicationToken: fed45b9d-429f-449e-96a7-48ea02d8156a", "your_app_Token: fd8e72b2-a769-4d2b-a656-f54001aaeaf5" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; |