Adyen Checkout API
POST
Create a payment session (POST)
{{baseUrl}}/paymentSession
BODY json
{
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"configuration": {
"avs": {
"addressEditable": false,
"enabled": ""
},
"cardHolderName": "",
"installments": {
"maxNumberOfInstallments": 0
},
"shopperInput": {
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
}
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"orderReference": "",
"origin": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"token": "",
"trustedShopper": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentSession");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/paymentSession" {:content-type :json
:form-params {:additionalAmount {:currency ""
:value 0}
:additionalData {}
:allowedPaymentMethods []
:amount {}
:applicationInfo {:adyenLibrary {:name ""
:version ""}
:adyenPaymentSource {}
:externalPlatform {:integrator ""
:name ""
:version ""}
:merchantApplication {}
:merchantDevice {:os ""
:osVersion ""
:reference ""}
:shopperInteractionDevice {:locale ""
:os ""
:osVersion ""}}
:billingAddress {:city ""
:country ""
:houseNumberOrName ""
:postalCode ""
:stateOrProvince ""
:street ""}
:blockedPaymentMethods []
:captureDelayHours 0
:channel ""
:checkoutAttemptId ""
:company {:homepage ""
:name ""
:registrationNumber ""
:registryLocation ""
:taxId ""
:type ""}
:configuration {:avs {:addressEditable false
:enabled ""}
:cardHolderName ""
:installments {:maxNumberOfInstallments 0}
:shopperInput {:billingAddress ""
:deliveryAddress ""
:personalDetails ""}}
:conversionId ""
:countryCode ""
:dateOfBirth ""
:dccQuote {:account ""
:accountType ""
:baseAmount {}
:basePoints 0
:buy {}
:interbank {}
:reference ""
:sell {}
:signature ""
:source ""
:type ""
:validTill ""}
:deliveryAddress {}
:deliveryDate ""
:enableOneClick false
:enablePayOut false
:enableRecurring false
:entityType ""
:fraudOffset 0
:installments {:plan ""
:value 0}
:lineItems [{:amountExcludingTax 0
:amountIncludingTax 0
:brand ""
:color ""
:description ""
:id ""
:imageUrl ""
:itemCategory ""
:manufacturer ""
:productUrl ""
:quantity 0
:receiverEmail ""
:size ""
:sku ""
:taxAmount 0
:taxPercentage 0
:upc ""}]
:localizedShopperStatement {}
:mandate {:amount ""
:amountRule ""
:billingAttemptsRule ""
:billingDay ""
:endsAt ""
:frequency ""
:remarks ""
:startsAt ""}
:mcc ""
:merchantAccount ""
:merchantOrderReference ""
:metadata {}
:orderReference ""
:origin ""
:platformChargebackLogic {:behavior ""
:costAllocationAccount ""
:targetAccount ""}
:recurringExpiry ""
:recurringFrequency ""
:reference ""
:returnUrl ""
:riskData {:clientData ""
:customFields {}
:fraudOffset 0
:profileReference ""}
:sdkVersion ""
:sessionValidity ""
:shopperEmail ""
:shopperIP ""
:shopperInteraction ""
:shopperLocale ""
:shopperName {:firstName ""
:lastName ""}
:shopperReference ""
:shopperStatement ""
:socialSecurityNumber ""
:splits [{:account ""
:amount {:currency ""
:value 0}
:description ""
:reference ""
:type ""}]
:store ""
:storePaymentMethod false
:telephoneNumber ""
:threeDSAuthenticationOnly false
:token ""
:trustedShopper false}})
require "http/client"
url = "{{baseUrl}}/paymentSession"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/paymentSession"),
Content = new StringContent("{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentSession");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentSession"
payload := strings.NewReader("{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/paymentSession HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 3538
{
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"configuration": {
"avs": {
"addressEditable": false,
"enabled": ""
},
"cardHolderName": "",
"installments": {
"maxNumberOfInstallments": 0
},
"shopperInput": {
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
}
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"orderReference": "",
"origin": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"token": "",
"trustedShopper": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/paymentSession")
.setHeader("content-type", "application/json")
.setBody("{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentSession"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/paymentSession")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/paymentSession")
.header("content-type", "application/json")
.body("{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}")
.asString();
const data = JSON.stringify({
additionalAmount: {
currency: '',
value: 0
},
additionalData: {},
allowedPaymentMethods: [],
amount: {},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
configuration: {
avs: {
addressEditable: false,
enabled: ''
},
cardHolderName: '',
installments: {
maxNumberOfInstallments: 0
},
shopperInput: {
billingAddress: '',
deliveryAddress: '',
personalDetails: ''
}
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
installments: {
plan: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
orderReference: '',
origin: '',
platformChargebackLogic: {
behavior: '',
costAllocationAccount: '',
targetAccount: ''
},
recurringExpiry: '',
recurringFrequency: '',
reference: '',
returnUrl: '',
riskData: {
clientData: '',
customFields: {},
fraudOffset: 0,
profileReference: ''
},
sdkVersion: '',
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDSAuthenticationOnly: false,
token: '',
trustedShopper: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/paymentSession');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentSession',
headers: {'content-type': 'application/json'},
data: {
additionalAmount: {currency: '', value: 0},
additionalData: {},
allowedPaymentMethods: [],
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
configuration: {
avs: {addressEditable: false, enabled: ''},
cardHolderName: '',
installments: {maxNumberOfInstallments: 0},
shopperInput: {billingAddress: '', deliveryAddress: '', personalDetails: ''}
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
orderReference: '',
origin: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sdkVersion: '',
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDSAuthenticationOnly: false,
token: '',
trustedShopper: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentSession';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"additionalAmount":{"currency":"","value":0},"additionalData":{},"allowedPaymentMethods":[],"amount":{},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"blockedPaymentMethods":[],"captureDelayHours":0,"channel":"","checkoutAttemptId":"","company":{"homepage":"","name":"","registrationNumber":"","registryLocation":"","taxId":"","type":""},"configuration":{"avs":{"addressEditable":false,"enabled":""},"cardHolderName":"","installments":{"maxNumberOfInstallments":0},"shopperInput":{"billingAddress":"","deliveryAddress":"","personalDetails":""}},"conversionId":"","countryCode":"","dateOfBirth":"","dccQuote":{"account":"","accountType":"","baseAmount":{},"basePoints":0,"buy":{},"interbank":{},"reference":"","sell":{},"signature":"","source":"","type":"","validTill":""},"deliveryAddress":{},"deliveryDate":"","enableOneClick":false,"enablePayOut":false,"enableRecurring":false,"entityType":"","fraudOffset":0,"installments":{"plan":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"localizedShopperStatement":{},"mandate":{"amount":"","amountRule":"","billingAttemptsRule":"","billingDay":"","endsAt":"","frequency":"","remarks":"","startsAt":""},"mcc":"","merchantAccount":"","merchantOrderReference":"","metadata":{},"orderReference":"","origin":"","platformChargebackLogic":{"behavior":"","costAllocationAccount":"","targetAccount":""},"recurringExpiry":"","recurringFrequency":"","reference":"","returnUrl":"","riskData":{"clientData":"","customFields":{},"fraudOffset":0,"profileReference":""},"sdkVersion":"","sessionValidity":"","shopperEmail":"","shopperIP":"","shopperInteraction":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","socialSecurityNumber":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","storePaymentMethod":false,"telephoneNumber":"","threeDSAuthenticationOnly":false,"token":"","trustedShopper":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/paymentSession',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "additionalAmount": {\n "currency": "",\n "value": 0\n },\n "additionalData": {},\n "allowedPaymentMethods": [],\n "amount": {},\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "blockedPaymentMethods": [],\n "captureDelayHours": 0,\n "channel": "",\n "checkoutAttemptId": "",\n "company": {\n "homepage": "",\n "name": "",\n "registrationNumber": "",\n "registryLocation": "",\n "taxId": "",\n "type": ""\n },\n "configuration": {\n "avs": {\n "addressEditable": false,\n "enabled": ""\n },\n "cardHolderName": "",\n "installments": {\n "maxNumberOfInstallments": 0\n },\n "shopperInput": {\n "billingAddress": "",\n "deliveryAddress": "",\n "personalDetails": ""\n }\n },\n "conversionId": "",\n "countryCode": "",\n "dateOfBirth": "",\n "dccQuote": {\n "account": "",\n "accountType": "",\n "baseAmount": {},\n "basePoints": 0,\n "buy": {},\n "interbank": {},\n "reference": "",\n "sell": {},\n "signature": "",\n "source": "",\n "type": "",\n "validTill": ""\n },\n "deliveryAddress": {},\n "deliveryDate": "",\n "enableOneClick": false,\n "enablePayOut": false,\n "enableRecurring": false,\n "entityType": "",\n "fraudOffset": 0,\n "installments": {\n "plan": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "localizedShopperStatement": {},\n "mandate": {\n "amount": "",\n "amountRule": "",\n "billingAttemptsRule": "",\n "billingDay": "",\n "endsAt": "",\n "frequency": "",\n "remarks": "",\n "startsAt": ""\n },\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "metadata": {},\n "orderReference": "",\n "origin": "",\n "platformChargebackLogic": {\n "behavior": "",\n "costAllocationAccount": "",\n "targetAccount": ""\n },\n "recurringExpiry": "",\n "recurringFrequency": "",\n "reference": "",\n "returnUrl": "",\n "riskData": {\n "clientData": "",\n "customFields": {},\n "fraudOffset": 0,\n "profileReference": ""\n },\n "sdkVersion": "",\n "sessionValidity": "",\n "shopperEmail": "",\n "shopperIP": "",\n "shopperInteraction": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "socialSecurityNumber": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "storePaymentMethod": false,\n "telephoneNumber": "",\n "threeDSAuthenticationOnly": false,\n "token": "",\n "trustedShopper": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/paymentSession")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentSession',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
additionalAmount: {currency: '', value: 0},
additionalData: {},
allowedPaymentMethods: [],
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
configuration: {
avs: {addressEditable: false, enabled: ''},
cardHolderName: '',
installments: {maxNumberOfInstallments: 0},
shopperInput: {billingAddress: '', deliveryAddress: '', personalDetails: ''}
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
orderReference: '',
origin: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sdkVersion: '',
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDSAuthenticationOnly: false,
token: '',
trustedShopper: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentSession',
headers: {'content-type': 'application/json'},
body: {
additionalAmount: {currency: '', value: 0},
additionalData: {},
allowedPaymentMethods: [],
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
configuration: {
avs: {addressEditable: false, enabled: ''},
cardHolderName: '',
installments: {maxNumberOfInstallments: 0},
shopperInput: {billingAddress: '', deliveryAddress: '', personalDetails: ''}
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
orderReference: '',
origin: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sdkVersion: '',
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDSAuthenticationOnly: false,
token: '',
trustedShopper: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/paymentSession');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
additionalAmount: {
currency: '',
value: 0
},
additionalData: {},
allowedPaymentMethods: [],
amount: {},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
configuration: {
avs: {
addressEditable: false,
enabled: ''
},
cardHolderName: '',
installments: {
maxNumberOfInstallments: 0
},
shopperInput: {
billingAddress: '',
deliveryAddress: '',
personalDetails: ''
}
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
installments: {
plan: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
orderReference: '',
origin: '',
platformChargebackLogic: {
behavior: '',
costAllocationAccount: '',
targetAccount: ''
},
recurringExpiry: '',
recurringFrequency: '',
reference: '',
returnUrl: '',
riskData: {
clientData: '',
customFields: {},
fraudOffset: 0,
profileReference: ''
},
sdkVersion: '',
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDSAuthenticationOnly: false,
token: '',
trustedShopper: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentSession',
headers: {'content-type': 'application/json'},
data: {
additionalAmount: {currency: '', value: 0},
additionalData: {},
allowedPaymentMethods: [],
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
configuration: {
avs: {addressEditable: false, enabled: ''},
cardHolderName: '',
installments: {maxNumberOfInstallments: 0},
shopperInput: {billingAddress: '', deliveryAddress: '', personalDetails: ''}
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
orderReference: '',
origin: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sdkVersion: '',
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDSAuthenticationOnly: false,
token: '',
trustedShopper: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentSession';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"additionalAmount":{"currency":"","value":0},"additionalData":{},"allowedPaymentMethods":[],"amount":{},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"blockedPaymentMethods":[],"captureDelayHours":0,"channel":"","checkoutAttemptId":"","company":{"homepage":"","name":"","registrationNumber":"","registryLocation":"","taxId":"","type":""},"configuration":{"avs":{"addressEditable":false,"enabled":""},"cardHolderName":"","installments":{"maxNumberOfInstallments":0},"shopperInput":{"billingAddress":"","deliveryAddress":"","personalDetails":""}},"conversionId":"","countryCode":"","dateOfBirth":"","dccQuote":{"account":"","accountType":"","baseAmount":{},"basePoints":0,"buy":{},"interbank":{},"reference":"","sell":{},"signature":"","source":"","type":"","validTill":""},"deliveryAddress":{},"deliveryDate":"","enableOneClick":false,"enablePayOut":false,"enableRecurring":false,"entityType":"","fraudOffset":0,"installments":{"plan":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"localizedShopperStatement":{},"mandate":{"amount":"","amountRule":"","billingAttemptsRule":"","billingDay":"","endsAt":"","frequency":"","remarks":"","startsAt":""},"mcc":"","merchantAccount":"","merchantOrderReference":"","metadata":{},"orderReference":"","origin":"","platformChargebackLogic":{"behavior":"","costAllocationAccount":"","targetAccount":""},"recurringExpiry":"","recurringFrequency":"","reference":"","returnUrl":"","riskData":{"clientData":"","customFields":{},"fraudOffset":0,"profileReference":""},"sdkVersion":"","sessionValidity":"","shopperEmail":"","shopperIP":"","shopperInteraction":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","socialSecurityNumber":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","storePaymentMethod":false,"telephoneNumber":"","threeDSAuthenticationOnly":false,"token":"","trustedShopper":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"additionalAmount": @{ @"currency": @"", @"value": @0 },
@"additionalData": @{ },
@"allowedPaymentMethods": @[ ],
@"amount": @{ },
@"applicationInfo": @{ @"adyenLibrary": @{ @"name": @"", @"version": @"" }, @"adyenPaymentSource": @{ }, @"externalPlatform": @{ @"integrator": @"", @"name": @"", @"version": @"" }, @"merchantApplication": @{ }, @"merchantDevice": @{ @"os": @"", @"osVersion": @"", @"reference": @"" }, @"shopperInteractionDevice": @{ @"locale": @"", @"os": @"", @"osVersion": @"" } },
@"billingAddress": @{ @"city": @"", @"country": @"", @"houseNumberOrName": @"", @"postalCode": @"", @"stateOrProvince": @"", @"street": @"" },
@"blockedPaymentMethods": @[ ],
@"captureDelayHours": @0,
@"channel": @"",
@"checkoutAttemptId": @"",
@"company": @{ @"homepage": @"", @"name": @"", @"registrationNumber": @"", @"registryLocation": @"", @"taxId": @"", @"type": @"" },
@"configuration": @{ @"avs": @{ @"addressEditable": @NO, @"enabled": @"" }, @"cardHolderName": @"", @"installments": @{ @"maxNumberOfInstallments": @0 }, @"shopperInput": @{ @"billingAddress": @"", @"deliveryAddress": @"", @"personalDetails": @"" } },
@"conversionId": @"",
@"countryCode": @"",
@"dateOfBirth": @"",
@"dccQuote": @{ @"account": @"", @"accountType": @"", @"baseAmount": @{ }, @"basePoints": @0, @"buy": @{ }, @"interbank": @{ }, @"reference": @"", @"sell": @{ }, @"signature": @"", @"source": @"", @"type": @"", @"validTill": @"" },
@"deliveryAddress": @{ },
@"deliveryDate": @"",
@"enableOneClick": @NO,
@"enablePayOut": @NO,
@"enableRecurring": @NO,
@"entityType": @"",
@"fraudOffset": @0,
@"installments": @{ @"plan": @"", @"value": @0 },
@"lineItems": @[ @{ @"amountExcludingTax": @0, @"amountIncludingTax": @0, @"brand": @"", @"color": @"", @"description": @"", @"id": @"", @"imageUrl": @"", @"itemCategory": @"", @"manufacturer": @"", @"productUrl": @"", @"quantity": @0, @"receiverEmail": @"", @"size": @"", @"sku": @"", @"taxAmount": @0, @"taxPercentage": @0, @"upc": @"" } ],
@"localizedShopperStatement": @{ },
@"mandate": @{ @"amount": @"", @"amountRule": @"", @"billingAttemptsRule": @"", @"billingDay": @"", @"endsAt": @"", @"frequency": @"", @"remarks": @"", @"startsAt": @"" },
@"mcc": @"",
@"merchantAccount": @"",
@"merchantOrderReference": @"",
@"metadata": @{ },
@"orderReference": @"",
@"origin": @"",
@"platformChargebackLogic": @{ @"behavior": @"", @"costAllocationAccount": @"", @"targetAccount": @"" },
@"recurringExpiry": @"",
@"recurringFrequency": @"",
@"reference": @"",
@"returnUrl": @"",
@"riskData": @{ @"clientData": @"", @"customFields": @{ }, @"fraudOffset": @0, @"profileReference": @"" },
@"sdkVersion": @"",
@"sessionValidity": @"",
@"shopperEmail": @"",
@"shopperIP": @"",
@"shopperInteraction": @"",
@"shopperLocale": @"",
@"shopperName": @{ @"firstName": @"", @"lastName": @"" },
@"shopperReference": @"",
@"shopperStatement": @"",
@"socialSecurityNumber": @"",
@"splits": @[ @{ @"account": @"", @"amount": @{ @"currency": @"", @"value": @0 }, @"description": @"", @"reference": @"", @"type": @"" } ],
@"store": @"",
@"storePaymentMethod": @NO,
@"telephoneNumber": @"",
@"threeDSAuthenticationOnly": @NO,
@"token": @"",
@"trustedShopper": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/paymentSession"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/paymentSession" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentSession",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'allowedPaymentMethods' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'blockedPaymentMethods' => [
],
'captureDelayHours' => 0,
'channel' => '',
'checkoutAttemptId' => '',
'company' => [
'homepage' => '',
'name' => '',
'registrationNumber' => '',
'registryLocation' => '',
'taxId' => '',
'type' => ''
],
'configuration' => [
'avs' => [
'addressEditable' => null,
'enabled' => ''
],
'cardHolderName' => '',
'installments' => [
'maxNumberOfInstallments' => 0
],
'shopperInput' => [
'billingAddress' => '',
'deliveryAddress' => '',
'personalDetails' => ''
]
],
'conversionId' => '',
'countryCode' => '',
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'enableOneClick' => null,
'enablePayOut' => null,
'enableRecurring' => null,
'entityType' => '',
'fraudOffset' => 0,
'installments' => [
'plan' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'localizedShopperStatement' => [
],
'mandate' => [
'amount' => '',
'amountRule' => '',
'billingAttemptsRule' => '',
'billingDay' => '',
'endsAt' => '',
'frequency' => '',
'remarks' => '',
'startsAt' => ''
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'metadata' => [
],
'orderReference' => '',
'origin' => '',
'platformChargebackLogic' => [
'behavior' => '',
'costAllocationAccount' => '',
'targetAccount' => ''
],
'recurringExpiry' => '',
'recurringFrequency' => '',
'reference' => '',
'returnUrl' => '',
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'sdkVersion' => '',
'sessionValidity' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethod' => null,
'telephoneNumber' => '',
'threeDSAuthenticationOnly' => null,
'token' => '',
'trustedShopper' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/paymentSession', [
'body' => '{
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"configuration": {
"avs": {
"addressEditable": false,
"enabled": ""
},
"cardHolderName": "",
"installments": {
"maxNumberOfInstallments": 0
},
"shopperInput": {
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
}
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"orderReference": "",
"origin": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"token": "",
"trustedShopper": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/paymentSession');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'allowedPaymentMethods' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'blockedPaymentMethods' => [
],
'captureDelayHours' => 0,
'channel' => '',
'checkoutAttemptId' => '',
'company' => [
'homepage' => '',
'name' => '',
'registrationNumber' => '',
'registryLocation' => '',
'taxId' => '',
'type' => ''
],
'configuration' => [
'avs' => [
'addressEditable' => null,
'enabled' => ''
],
'cardHolderName' => '',
'installments' => [
'maxNumberOfInstallments' => 0
],
'shopperInput' => [
'billingAddress' => '',
'deliveryAddress' => '',
'personalDetails' => ''
]
],
'conversionId' => '',
'countryCode' => '',
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'enableOneClick' => null,
'enablePayOut' => null,
'enableRecurring' => null,
'entityType' => '',
'fraudOffset' => 0,
'installments' => [
'plan' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'localizedShopperStatement' => [
],
'mandate' => [
'amount' => '',
'amountRule' => '',
'billingAttemptsRule' => '',
'billingDay' => '',
'endsAt' => '',
'frequency' => '',
'remarks' => '',
'startsAt' => ''
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'metadata' => [
],
'orderReference' => '',
'origin' => '',
'platformChargebackLogic' => [
'behavior' => '',
'costAllocationAccount' => '',
'targetAccount' => ''
],
'recurringExpiry' => '',
'recurringFrequency' => '',
'reference' => '',
'returnUrl' => '',
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'sdkVersion' => '',
'sessionValidity' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethod' => null,
'telephoneNumber' => '',
'threeDSAuthenticationOnly' => null,
'token' => '',
'trustedShopper' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'allowedPaymentMethods' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'blockedPaymentMethods' => [
],
'captureDelayHours' => 0,
'channel' => '',
'checkoutAttemptId' => '',
'company' => [
'homepage' => '',
'name' => '',
'registrationNumber' => '',
'registryLocation' => '',
'taxId' => '',
'type' => ''
],
'configuration' => [
'avs' => [
'addressEditable' => null,
'enabled' => ''
],
'cardHolderName' => '',
'installments' => [
'maxNumberOfInstallments' => 0
],
'shopperInput' => [
'billingAddress' => '',
'deliveryAddress' => '',
'personalDetails' => ''
]
],
'conversionId' => '',
'countryCode' => '',
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'enableOneClick' => null,
'enablePayOut' => null,
'enableRecurring' => null,
'entityType' => '',
'fraudOffset' => 0,
'installments' => [
'plan' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'localizedShopperStatement' => [
],
'mandate' => [
'amount' => '',
'amountRule' => '',
'billingAttemptsRule' => '',
'billingDay' => '',
'endsAt' => '',
'frequency' => '',
'remarks' => '',
'startsAt' => ''
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'metadata' => [
],
'orderReference' => '',
'origin' => '',
'platformChargebackLogic' => [
'behavior' => '',
'costAllocationAccount' => '',
'targetAccount' => ''
],
'recurringExpiry' => '',
'recurringFrequency' => '',
'reference' => '',
'returnUrl' => '',
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'sdkVersion' => '',
'sessionValidity' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethod' => null,
'telephoneNumber' => '',
'threeDSAuthenticationOnly' => null,
'token' => '',
'trustedShopper' => null
]));
$request->setRequestUrl('{{baseUrl}}/paymentSession');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentSession' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"configuration": {
"avs": {
"addressEditable": false,
"enabled": ""
},
"cardHolderName": "",
"installments": {
"maxNumberOfInstallments": 0
},
"shopperInput": {
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
}
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"orderReference": "",
"origin": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"token": "",
"trustedShopper": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentSession' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"configuration": {
"avs": {
"addressEditable": false,
"enabled": ""
},
"cardHolderName": "",
"installments": {
"maxNumberOfInstallments": 0
},
"shopperInput": {
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
}
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"orderReference": "",
"origin": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"token": "",
"trustedShopper": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/paymentSession", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentSession"
payload = {
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"configuration": {
"avs": {
"addressEditable": False,
"enabled": ""
},
"cardHolderName": "",
"installments": { "maxNumberOfInstallments": 0 },
"shopperInput": {
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
}
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"enableOneClick": False,
"enablePayOut": False,
"enableRecurring": False,
"entityType": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"orderReference": "",
"origin": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": False,
"telephoneNumber": "",
"threeDSAuthenticationOnly": False,
"token": "",
"trustedShopper": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentSession"
payload <- "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentSession")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/paymentSession') do |req|
req.body = "{\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"configuration\": {\n \"avs\": {\n \"addressEditable\": false,\n \"enabled\": \"\"\n },\n \"cardHolderName\": \"\",\n \"installments\": {\n \"maxNumberOfInstallments\": 0\n },\n \"shopperInput\": {\n \"billingAddress\": \"\",\n \"deliveryAddress\": \"\",\n \"personalDetails\": \"\"\n }\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sdkVersion\": \"\",\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDSAuthenticationOnly\": false,\n \"token\": \"\",\n \"trustedShopper\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentSession";
let payload = json!({
"additionalAmount": json!({
"currency": "",
"value": 0
}),
"additionalData": json!({}),
"allowedPaymentMethods": (),
"amount": json!({}),
"applicationInfo": json!({
"adyenLibrary": json!({
"name": "",
"version": ""
}),
"adyenPaymentSource": json!({}),
"externalPlatform": json!({
"integrator": "",
"name": "",
"version": ""
}),
"merchantApplication": json!({}),
"merchantDevice": json!({
"os": "",
"osVersion": "",
"reference": ""
}),
"shopperInteractionDevice": json!({
"locale": "",
"os": "",
"osVersion": ""
})
}),
"billingAddress": json!({
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
}),
"blockedPaymentMethods": (),
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": json!({
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
}),
"configuration": json!({
"avs": json!({
"addressEditable": false,
"enabled": ""
}),
"cardHolderName": "",
"installments": json!({"maxNumberOfInstallments": 0}),
"shopperInput": json!({
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
})
}),
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": json!({
"account": "",
"accountType": "",
"baseAmount": json!({}),
"basePoints": 0,
"buy": json!({}),
"interbank": json!({}),
"reference": "",
"sell": json!({}),
"signature": "",
"source": "",
"type": "",
"validTill": ""
}),
"deliveryAddress": json!({}),
"deliveryDate": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"installments": json!({
"plan": "",
"value": 0
}),
"lineItems": (
json!({
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
})
),
"localizedShopperStatement": json!({}),
"mandate": json!({
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
}),
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": json!({}),
"orderReference": "",
"origin": "",
"platformChargebackLogic": json!({
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
}),
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": json!({
"clientData": "",
"customFields": json!({}),
"fraudOffset": 0,
"profileReference": ""
}),
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": json!({
"firstName": "",
"lastName": ""
}),
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": (
json!({
"account": "",
"amount": json!({
"currency": "",
"value": 0
}),
"description": "",
"reference": "",
"type": ""
})
),
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"token": "",
"trustedShopper": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/paymentSession \
--header 'content-type: application/json' \
--data '{
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"configuration": {
"avs": {
"addressEditable": false,
"enabled": ""
},
"cardHolderName": "",
"installments": {
"maxNumberOfInstallments": 0
},
"shopperInput": {
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
}
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"orderReference": "",
"origin": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"token": "",
"trustedShopper": false
}'
echo '{
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"configuration": {
"avs": {
"addressEditable": false,
"enabled": ""
},
"cardHolderName": "",
"installments": {
"maxNumberOfInstallments": 0
},
"shopperInput": {
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
}
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"orderReference": "",
"origin": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"token": "",
"trustedShopper": false
}' | \
http POST {{baseUrl}}/paymentSession \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "additionalAmount": {\n "currency": "",\n "value": 0\n },\n "additionalData": {},\n "allowedPaymentMethods": [],\n "amount": {},\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "blockedPaymentMethods": [],\n "captureDelayHours": 0,\n "channel": "",\n "checkoutAttemptId": "",\n "company": {\n "homepage": "",\n "name": "",\n "registrationNumber": "",\n "registryLocation": "",\n "taxId": "",\n "type": ""\n },\n "configuration": {\n "avs": {\n "addressEditable": false,\n "enabled": ""\n },\n "cardHolderName": "",\n "installments": {\n "maxNumberOfInstallments": 0\n },\n "shopperInput": {\n "billingAddress": "",\n "deliveryAddress": "",\n "personalDetails": ""\n }\n },\n "conversionId": "",\n "countryCode": "",\n "dateOfBirth": "",\n "dccQuote": {\n "account": "",\n "accountType": "",\n "baseAmount": {},\n "basePoints": 0,\n "buy": {},\n "interbank": {},\n "reference": "",\n "sell": {},\n "signature": "",\n "source": "",\n "type": "",\n "validTill": ""\n },\n "deliveryAddress": {},\n "deliveryDate": "",\n "enableOneClick": false,\n "enablePayOut": false,\n "enableRecurring": false,\n "entityType": "",\n "fraudOffset": 0,\n "installments": {\n "plan": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "localizedShopperStatement": {},\n "mandate": {\n "amount": "",\n "amountRule": "",\n "billingAttemptsRule": "",\n "billingDay": "",\n "endsAt": "",\n "frequency": "",\n "remarks": "",\n "startsAt": ""\n },\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "metadata": {},\n "orderReference": "",\n "origin": "",\n "platformChargebackLogic": {\n "behavior": "",\n "costAllocationAccount": "",\n "targetAccount": ""\n },\n "recurringExpiry": "",\n "recurringFrequency": "",\n "reference": "",\n "returnUrl": "",\n "riskData": {\n "clientData": "",\n "customFields": {},\n "fraudOffset": 0,\n "profileReference": ""\n },\n "sdkVersion": "",\n "sessionValidity": "",\n "shopperEmail": "",\n "shopperIP": "",\n "shopperInteraction": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "socialSecurityNumber": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "storePaymentMethod": false,\n "telephoneNumber": "",\n "threeDSAuthenticationOnly": false,\n "token": "",\n "trustedShopper": false\n}' \
--output-document \
- {{baseUrl}}/paymentSession
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"additionalAmount": [
"currency": "",
"value": 0
],
"additionalData": [],
"allowedPaymentMethods": [],
"amount": [],
"applicationInfo": [
"adyenLibrary": [
"name": "",
"version": ""
],
"adyenPaymentSource": [],
"externalPlatform": [
"integrator": "",
"name": "",
"version": ""
],
"merchantApplication": [],
"merchantDevice": [
"os": "",
"osVersion": "",
"reference": ""
],
"shopperInteractionDevice": [
"locale": "",
"os": "",
"osVersion": ""
]
],
"billingAddress": [
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
],
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": [
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
],
"configuration": [
"avs": [
"addressEditable": false,
"enabled": ""
],
"cardHolderName": "",
"installments": ["maxNumberOfInstallments": 0],
"shopperInput": [
"billingAddress": "",
"deliveryAddress": "",
"personalDetails": ""
]
],
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": [
"account": "",
"accountType": "",
"baseAmount": [],
"basePoints": 0,
"buy": [],
"interbank": [],
"reference": "",
"sell": [],
"signature": "",
"source": "",
"type": "",
"validTill": ""
],
"deliveryAddress": [],
"deliveryDate": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"installments": [
"plan": "",
"value": 0
],
"lineItems": [
[
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
]
],
"localizedShopperStatement": [],
"mandate": [
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
],
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": [],
"orderReference": "",
"origin": "",
"platformChargebackLogic": [
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
],
"recurringExpiry": "",
"recurringFrequency": "",
"reference": "",
"returnUrl": "",
"riskData": [
"clientData": "",
"customFields": [],
"fraudOffset": 0,
"profileReference": ""
],
"sdkVersion": "",
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": [
"firstName": "",
"lastName": ""
],
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
[
"account": "",
"amount": [
"currency": "",
"value": 0
],
"description": "",
"reference": "",
"type": ""
]
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"token": "",
"trustedShopper": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentSession")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"paymentSession": "eyJjaGVja291dHNob3BwZXJCYXN..."
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"paymentSession": "eyJjaGVja291dHNob3BwZXJCYXN..."
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Verify a payment result
{{baseUrl}}/payments/result
BODY json
{
"payload": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments/result");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"payload\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payments/result" {:content-type :json
:form-params {:payload ""}})
require "http/client"
url = "{{baseUrl}}/payments/result"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"payload\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payments/result"),
Content = new StringContent("{\n \"payload\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments/result");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"payload\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments/result"
payload := strings.NewReader("{\n \"payload\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payments/result HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 19
{
"payload": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payments/result")
.setHeader("content-type", "application/json")
.setBody("{\n \"payload\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments/result"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"payload\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"payload\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payments/result")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payments/result")
.header("content-type", "application/json")
.body("{\n \"payload\": \"\"\n}")
.asString();
const data = JSON.stringify({
payload: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payments/result');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/result',
headers: {'content-type': 'application/json'},
data: {payload: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments/result';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"payload":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments/result',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "payload": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"payload\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payments/result")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments/result',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({payload: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/result',
headers: {'content-type': 'application/json'},
body: {payload: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payments/result');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
payload: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/result',
headers: {'content-type': 'application/json'},
data: {payload: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments/result';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"payload":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"payload": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments/result"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments/result" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"payload\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments/result",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'payload' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payments/result', [
'body' => '{
"payload": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payments/result');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'payload' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'payload' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payments/result');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments/result' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"payload": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments/result' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"payload": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"payload\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payments/result", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments/result"
payload = { "payload": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments/result"
payload <- "{\n \"payload\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments/result")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"payload\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payments/result') do |req|
req.body = "{\n \"payload\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments/result";
let payload = json!({"payload": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payments/result \
--header 'content-type: application/json' \
--data '{
"payload": ""
}'
echo '{
"payload": ""
}' | \
http POST {{baseUrl}}/payments/result \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "payload": ""\n}' \
--output-document \
- {{baseUrl}}/payments/result
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["payload": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments/result")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Cancel an authorised payment (POST)
{{baseUrl}}/payments/:paymentPspReference/cancels
QUERY PARAMS
paymentPspReference
BODY json
{
"merchantAccount": "",
"reference": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments/:paymentPspReference/cancels");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payments/:paymentPspReference/cancels" {:content-type :json
:form-params {:merchantAccount ""
:reference ""}})
require "http/client"
url = "{{baseUrl}}/payments/:paymentPspReference/cancels"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payments/:paymentPspReference/cancels"),
Content = new StringContent("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments/:paymentPspReference/cancels");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments/:paymentPspReference/cancels"
payload := strings.NewReader("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payments/:paymentPspReference/cancels HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"merchantAccount": "",
"reference": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payments/:paymentPspReference/cancels")
.setHeader("content-type", "application/json")
.setBody("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments/:paymentPspReference/cancels"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/cancels")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payments/:paymentPspReference/cancels")
.header("content-type", "application/json")
.body("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
.asString();
const data = JSON.stringify({
merchantAccount: '',
reference: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payments/:paymentPspReference/cancels');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/cancels',
headers: {'content-type': 'application/json'},
data: {merchantAccount: '', reference: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments/:paymentPspReference/cancels';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantAccount":"","reference":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments/:paymentPspReference/cancels',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "merchantAccount": "",\n "reference": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/cancels")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments/:paymentPspReference/cancels',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({merchantAccount: '', reference: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/cancels',
headers: {'content-type': 'application/json'},
body: {merchantAccount: '', reference: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payments/:paymentPspReference/cancels');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
merchantAccount: '',
reference: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/cancels',
headers: {'content-type': 'application/json'},
data: {merchantAccount: '', reference: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments/:paymentPspReference/cancels';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantAccount":"","reference":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"merchantAccount": @"",
@"reference": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments/:paymentPspReference/cancels"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments/:paymentPspReference/cancels" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments/:paymentPspReference/cancels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchantAccount' => '',
'reference' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payments/:paymentPspReference/cancels', [
'body' => '{
"merchantAccount": "",
"reference": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payments/:paymentPspReference/cancels');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'merchantAccount' => '',
'reference' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'merchantAccount' => '',
'reference' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payments/:paymentPspReference/cancels');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments/:paymentPspReference/cancels' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantAccount": "",
"reference": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments/:paymentPspReference/cancels' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantAccount": "",
"reference": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payments/:paymentPspReference/cancels", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments/:paymentPspReference/cancels"
payload = {
"merchantAccount": "",
"reference": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments/:paymentPspReference/cancels"
payload <- "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments/:paymentPspReference/cancels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payments/:paymentPspReference/cancels') do |req|
req.body = "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments/:paymentPspReference/cancels";
let payload = json!({
"merchantAccount": "",
"reference": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payments/:paymentPspReference/cancels \
--header 'content-type: application/json' \
--data '{
"merchantAccount": "",
"reference": ""
}'
echo '{
"merchantAccount": "",
"reference": ""
}' | \
http POST {{baseUrl}}/payments/:paymentPspReference/cancels \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "merchantAccount": "",\n "reference": ""\n}' \
--output-document \
- {{baseUrl}}/payments/:paymentPspReference/cancels
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"merchantAccount": "",
"reference": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments/:paymentPspReference/cancels")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Cancel an authorised payment
{{baseUrl}}/cancels
BODY json
{
"merchantAccount": "",
"paymentReference": "",
"reference": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/cancels");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/cancels" {:content-type :json
:form-params {:merchantAccount ""
:paymentReference ""
:reference ""}})
require "http/client"
url = "{{baseUrl}}/cancels"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/cancels"),
Content = new StringContent("{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/cancels");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/cancels"
payload := strings.NewReader("{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/cancels HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 72
{
"merchantAccount": "",
"paymentReference": "",
"reference": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/cancels")
.setHeader("content-type", "application/json")
.setBody("{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/cancels"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/cancels")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/cancels")
.header("content-type", "application/json")
.body("{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}")
.asString();
const data = JSON.stringify({
merchantAccount: '',
paymentReference: '',
reference: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/cancels');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/cancels',
headers: {'content-type': 'application/json'},
data: {merchantAccount: '', paymentReference: '', reference: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/cancels';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantAccount":"","paymentReference":"","reference":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/cancels',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "merchantAccount": "",\n "paymentReference": "",\n "reference": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/cancels")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/cancels',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({merchantAccount: '', paymentReference: '', reference: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/cancels',
headers: {'content-type': 'application/json'},
body: {merchantAccount: '', paymentReference: '', reference: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/cancels');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
merchantAccount: '',
paymentReference: '',
reference: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/cancels',
headers: {'content-type': 'application/json'},
data: {merchantAccount: '', paymentReference: '', reference: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/cancels';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantAccount":"","paymentReference":"","reference":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"merchantAccount": @"",
@"paymentReference": @"",
@"reference": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/cancels"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/cancels" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/cancels",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchantAccount' => '',
'paymentReference' => '',
'reference' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/cancels', [
'body' => '{
"merchantAccount": "",
"paymentReference": "",
"reference": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/cancels');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'merchantAccount' => '',
'paymentReference' => '',
'reference' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'merchantAccount' => '',
'paymentReference' => '',
'reference' => ''
]));
$request->setRequestUrl('{{baseUrl}}/cancels');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/cancels' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantAccount": "",
"paymentReference": "",
"reference": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/cancels' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantAccount": "",
"paymentReference": "",
"reference": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/cancels", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/cancels"
payload = {
"merchantAccount": "",
"paymentReference": "",
"reference": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/cancels"
payload <- "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/cancels")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/cancels') do |req|
req.body = "{\n \"merchantAccount\": \"\",\n \"paymentReference\": \"\",\n \"reference\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/cancels";
let payload = json!({
"merchantAccount": "",
"paymentReference": "",
"reference": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/cancels \
--header 'content-type: application/json' \
--data '{
"merchantAccount": "",
"paymentReference": "",
"reference": ""
}'
echo '{
"merchantAccount": "",
"paymentReference": "",
"reference": ""
}' | \
http POST {{baseUrl}}/cancels \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "merchantAccount": "",\n "paymentReference": "",\n "reference": ""\n}' \
--output-document \
- {{baseUrl}}/cancels
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"merchantAccount": "",
"paymentReference": "",
"reference": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/cancels")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Capture an authorised payment
{{baseUrl}}/payments/:paymentPspReference/captures
QUERY PARAMS
paymentPspReference
BODY json
{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments/:paymentPspReference/captures");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payments/:paymentPspReference/captures" {:content-type :json
:form-params {:amount {:currency ""
:value 0}
:lineItems [{:amountExcludingTax 0
:amountIncludingTax 0
:brand ""
:color ""
:description ""
:id ""
:imageUrl ""
:itemCategory ""
:manufacturer ""
:productUrl ""
:quantity 0
:receiverEmail ""
:size ""
:sku ""
:taxAmount 0
:taxPercentage 0
:upc ""}]
:merchantAccount ""
:reference ""
:splits [{:account ""
:amount {:currency ""
:value 0}
:description ""
:reference ""
:type ""}]}})
require "http/client"
url = "{{baseUrl}}/payments/:paymentPspReference/captures"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payments/:paymentPspReference/captures"),
Content = new StringContent("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments/:paymentPspReference/captures");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments/:paymentPspReference/captures"
payload := strings.NewReader("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payments/:paymentPspReference/captures HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 707
{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payments/:paymentPspReference/captures")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments/:paymentPspReference/captures"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/captures")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payments/:paymentPspReference/captures")
.header("content-type", "application/json")
.body("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
amount: {
currency: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payments/:paymentPspReference/captures');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/captures',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments/:paymentPspReference/captures';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"merchantAccount":"","reference":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments/:paymentPspReference/captures',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": {\n "currency": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "merchantAccount": "",\n "reference": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/captures")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments/:paymentPspReference/captures',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: {currency: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/captures',
headers: {'content-type': 'application/json'},
body: {
amount: {currency: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payments/:paymentPspReference/captures');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: {
currency: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/captures',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments/:paymentPspReference/captures';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"merchantAccount":"","reference":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @{ @"currency": @"", @"value": @0 },
@"lineItems": @[ @{ @"amountExcludingTax": @0, @"amountIncludingTax": @0, @"brand": @"", @"color": @"", @"description": @"", @"id": @"", @"imageUrl": @"", @"itemCategory": @"", @"manufacturer": @"", @"productUrl": @"", @"quantity": @0, @"receiverEmail": @"", @"size": @"", @"sku": @"", @"taxAmount": @0, @"taxPercentage": @0, @"upc": @"" } ],
@"merchantAccount": @"",
@"reference": @"",
@"splits": @[ @{ @"account": @"", @"amount": @{ @"currency": @"", @"value": @0 }, @"description": @"", @"reference": @"", @"type": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments/:paymentPspReference/captures"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments/:paymentPspReference/captures" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments/:paymentPspReference/captures",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'merchantAccount' => '',
'reference' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payments/:paymentPspReference/captures', [
'body' => '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payments/:paymentPspReference/captures');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'merchantAccount' => '',
'reference' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'merchantAccount' => '',
'reference' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/payments/:paymentPspReference/captures');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments/:paymentPspReference/captures' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments/:paymentPspReference/captures' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payments/:paymentPspReference/captures", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments/:paymentPspReference/captures"
payload = {
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments/:paymentPspReference/captures"
payload <- "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments/:paymentPspReference/captures")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payments/:paymentPspReference/captures') do |req|
req.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments/:paymentPspReference/captures";
let payload = json!({
"amount": json!({
"currency": "",
"value": 0
}),
"lineItems": (
json!({
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
})
),
"merchantAccount": "",
"reference": "",
"splits": (
json!({
"account": "",
"amount": json!({
"currency": "",
"value": 0
}),
"description": "",
"reference": "",
"type": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payments/:paymentPspReference/captures \
--header 'content-type: application/json' \
--data '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}'
echo '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}' | \
http POST {{baseUrl}}/payments/:paymentPspReference/captures \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": {\n "currency": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "merchantAccount": "",\n "reference": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/payments/:paymentPspReference/captures
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": [
"currency": "",
"value": 0
],
"lineItems": [
[
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
]
],
"merchantAccount": "",
"reference": "",
"splits": [
[
"account": "",
"amount": [
"currency": "",
"value": 0
],
"description": "",
"reference": "",
"type": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments/:paymentPspReference/captures")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Refund a captured payment
{{baseUrl}}/payments/:paymentPspReference/refunds
QUERY PARAMS
paymentPspReference
BODY json
{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments/:paymentPspReference/refunds");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payments/:paymentPspReference/refunds" {:content-type :json
:form-params {:amount {:currency ""
:value 0}
:lineItems [{:amountExcludingTax 0
:amountIncludingTax 0
:brand ""
:color ""
:description ""
:id ""
:imageUrl ""
:itemCategory ""
:manufacturer ""
:productUrl ""
:quantity 0
:receiverEmail ""
:size ""
:sku ""
:taxAmount 0
:taxPercentage 0
:upc ""}]
:merchantAccount ""
:merchantRefundReason ""
:reference ""
:splits [{:account ""
:amount {:currency ""
:value 0}
:description ""
:reference ""
:type ""}]}})
require "http/client"
url = "{{baseUrl}}/payments/:paymentPspReference/refunds"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payments/:paymentPspReference/refunds"),
Content = new StringContent("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments/:paymentPspReference/refunds");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments/:paymentPspReference/refunds"
payload := strings.NewReader("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payments/:paymentPspReference/refunds HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 737
{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payments/:paymentPspReference/refunds")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments/:paymentPspReference/refunds"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/refunds")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payments/:paymentPspReference/refunds")
.header("content-type", "application/json")
.body("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
amount: {
currency: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
merchantRefundReason: '',
reference: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payments/:paymentPspReference/refunds');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/refunds',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
merchantRefundReason: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments/:paymentPspReference/refunds';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"merchantAccount":"","merchantRefundReason":"","reference":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments/:paymentPspReference/refunds',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": {\n "currency": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "merchantAccount": "",\n "merchantRefundReason": "",\n "reference": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/refunds")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments/:paymentPspReference/refunds',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: {currency: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
merchantRefundReason: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/refunds',
headers: {'content-type': 'application/json'},
body: {
amount: {currency: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
merchantRefundReason: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payments/:paymentPspReference/refunds');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: {
currency: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
merchantRefundReason: '',
reference: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/refunds',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
merchantAccount: '',
merchantRefundReason: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments/:paymentPspReference/refunds';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"merchantAccount":"","merchantRefundReason":"","reference":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @{ @"currency": @"", @"value": @0 },
@"lineItems": @[ @{ @"amountExcludingTax": @0, @"amountIncludingTax": @0, @"brand": @"", @"color": @"", @"description": @"", @"id": @"", @"imageUrl": @"", @"itemCategory": @"", @"manufacturer": @"", @"productUrl": @"", @"quantity": @0, @"receiverEmail": @"", @"size": @"", @"sku": @"", @"taxAmount": @0, @"taxPercentage": @0, @"upc": @"" } ],
@"merchantAccount": @"",
@"merchantRefundReason": @"",
@"reference": @"",
@"splits": @[ @{ @"account": @"", @"amount": @{ @"currency": @"", @"value": @0 }, @"description": @"", @"reference": @"", @"type": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments/:paymentPspReference/refunds"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments/:paymentPspReference/refunds" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments/:paymentPspReference/refunds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'merchantAccount' => '',
'merchantRefundReason' => '',
'reference' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payments/:paymentPspReference/refunds', [
'body' => '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payments/:paymentPspReference/refunds');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'merchantAccount' => '',
'merchantRefundReason' => '',
'reference' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'merchantAccount' => '',
'merchantRefundReason' => '',
'reference' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/payments/:paymentPspReference/refunds');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments/:paymentPspReference/refunds' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments/:paymentPspReference/refunds' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payments/:paymentPspReference/refunds", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments/:paymentPspReference/refunds"
payload = {
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments/:paymentPspReference/refunds"
payload <- "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments/:paymentPspReference/refunds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payments/:paymentPspReference/refunds') do |req|
req.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"merchantAccount\": \"\",\n \"merchantRefundReason\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments/:paymentPspReference/refunds";
let payload = json!({
"amount": json!({
"currency": "",
"value": 0
}),
"lineItems": (
json!({
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
})
),
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": (
json!({
"account": "",
"amount": json!({
"currency": "",
"value": 0
}),
"description": "",
"reference": "",
"type": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payments/:paymentPspReference/refunds \
--header 'content-type: application/json' \
--data '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}'
echo '{
"amount": {
"currency": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}' | \
http POST {{baseUrl}}/payments/:paymentPspReference/refunds \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": {\n "currency": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "merchantAccount": "",\n "merchantRefundReason": "",\n "reference": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/payments/:paymentPspReference/refunds
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": [
"currency": "",
"value": 0
],
"lineItems": [
[
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
]
],
"merchantAccount": "",
"merchantRefundReason": "",
"reference": "",
"splits": [
[
"account": "",
"amount": [
"currency": "",
"value": 0
],
"description": "",
"reference": "",
"type": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments/:paymentPspReference/refunds")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Refund or cancel a payment
{{baseUrl}}/payments/:paymentPspReference/reversals
QUERY PARAMS
paymentPspReference
BODY json
{
"merchantAccount": "",
"reference": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments/:paymentPspReference/reversals");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payments/:paymentPspReference/reversals" {:content-type :json
:form-params {:merchantAccount ""
:reference ""}})
require "http/client"
url = "{{baseUrl}}/payments/:paymentPspReference/reversals"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payments/:paymentPspReference/reversals"),
Content = new StringContent("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments/:paymentPspReference/reversals");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments/:paymentPspReference/reversals"
payload := strings.NewReader("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payments/:paymentPspReference/reversals HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 46
{
"merchantAccount": "",
"reference": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payments/:paymentPspReference/reversals")
.setHeader("content-type", "application/json")
.setBody("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments/:paymentPspReference/reversals"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/reversals")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payments/:paymentPspReference/reversals")
.header("content-type", "application/json")
.body("{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
.asString();
const data = JSON.stringify({
merchantAccount: '',
reference: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payments/:paymentPspReference/reversals');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/reversals',
headers: {'content-type': 'application/json'},
data: {merchantAccount: '', reference: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments/:paymentPspReference/reversals';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantAccount":"","reference":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments/:paymentPspReference/reversals',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "merchantAccount": "",\n "reference": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/reversals")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments/:paymentPspReference/reversals',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({merchantAccount: '', reference: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/reversals',
headers: {'content-type': 'application/json'},
body: {merchantAccount: '', reference: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payments/:paymentPspReference/reversals');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
merchantAccount: '',
reference: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/reversals',
headers: {'content-type': 'application/json'},
data: {merchantAccount: '', reference: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments/:paymentPspReference/reversals';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantAccount":"","reference":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"merchantAccount": @"",
@"reference": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments/:paymentPspReference/reversals"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments/:paymentPspReference/reversals" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments/:paymentPspReference/reversals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchantAccount' => '',
'reference' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payments/:paymentPspReference/reversals', [
'body' => '{
"merchantAccount": "",
"reference": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payments/:paymentPspReference/reversals');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'merchantAccount' => '',
'reference' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'merchantAccount' => '',
'reference' => ''
]));
$request->setRequestUrl('{{baseUrl}}/payments/:paymentPspReference/reversals');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments/:paymentPspReference/reversals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantAccount": "",
"reference": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments/:paymentPspReference/reversals' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantAccount": "",
"reference": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payments/:paymentPspReference/reversals", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments/:paymentPspReference/reversals"
payload = {
"merchantAccount": "",
"reference": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments/:paymentPspReference/reversals"
payload <- "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments/:paymentPspReference/reversals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payments/:paymentPspReference/reversals') do |req|
req.body = "{\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments/:paymentPspReference/reversals";
let payload = json!({
"merchantAccount": "",
"reference": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payments/:paymentPspReference/reversals \
--header 'content-type: application/json' \
--data '{
"merchantAccount": "",
"reference": ""
}'
echo '{
"merchantAccount": "",
"reference": ""
}' | \
http POST {{baseUrl}}/payments/:paymentPspReference/reversals \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "merchantAccount": "",\n "reference": ""\n}' \
--output-document \
- {{baseUrl}}/payments/:paymentPspReference/reversals
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"merchantAccount": "",
"reference": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments/:paymentPspReference/reversals")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Update an authorised amount
{{baseUrl}}/payments/:paymentPspReference/amountUpdates
QUERY PARAMS
paymentPspReference
BODY json
{
"amount": {
"currency": "",
"value": 0
},
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments/:paymentPspReference/amountUpdates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payments/:paymentPspReference/amountUpdates" {:content-type :json
:form-params {:amount {:currency ""
:value 0}
:industryUsage ""
:merchantAccount ""
:reference ""
:splits [{:account ""
:amount {:currency ""
:value 0}
:description ""
:reference ""
:type ""}]}})
require "http/client"
url = "{{baseUrl}}/payments/:paymentPspReference/amountUpdates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payments/:paymentPspReference/amountUpdates"),
Content = new StringContent("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments/:paymentPspReference/amountUpdates");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments/:paymentPspReference/amountUpdates"
payload := strings.NewReader("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payments/:paymentPspReference/amountUpdates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 310
{
"amount": {
"currency": "",
"value": 0
},
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payments/:paymentPspReference/amountUpdates")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments/:paymentPspReference/amountUpdates"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/amountUpdates")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payments/:paymentPspReference/amountUpdates")
.header("content-type", "application/json")
.body("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
amount: {
currency: '',
value: 0
},
industryUsage: '',
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payments/:paymentPspReference/amountUpdates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/amountUpdates',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: 0},
industryUsage: '',
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments/:paymentPspReference/amountUpdates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":0},"industryUsage":"","merchantAccount":"","reference":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments/:paymentPspReference/amountUpdates',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": {\n "currency": "",\n "value": 0\n },\n "industryUsage": "",\n "merchantAccount": "",\n "reference": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payments/:paymentPspReference/amountUpdates")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments/:paymentPspReference/amountUpdates',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: {currency: '', value: 0},
industryUsage: '',
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/amountUpdates',
headers: {'content-type': 'application/json'},
body: {
amount: {currency: '', value: 0},
industryUsage: '',
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payments/:paymentPspReference/amountUpdates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: {
currency: '',
value: 0
},
industryUsage: '',
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/:paymentPspReference/amountUpdates',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: 0},
industryUsage: '',
merchantAccount: '',
reference: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments/:paymentPspReference/amountUpdates';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":0},"industryUsage":"","merchantAccount":"","reference":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @{ @"currency": @"", @"value": @0 },
@"industryUsage": @"",
@"merchantAccount": @"",
@"reference": @"",
@"splits": @[ @{ @"account": @"", @"amount": @{ @"currency": @"", @"value": @0 }, @"description": @"", @"reference": @"", @"type": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments/:paymentPspReference/amountUpdates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments/:paymentPspReference/amountUpdates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments/:paymentPspReference/amountUpdates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'industryUsage' => '',
'merchantAccount' => '',
'reference' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payments/:paymentPspReference/amountUpdates', [
'body' => '{
"amount": {
"currency": "",
"value": 0
},
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payments/:paymentPspReference/amountUpdates');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'industryUsage' => '',
'merchantAccount' => '',
'reference' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'industryUsage' => '',
'merchantAccount' => '',
'reference' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/payments/:paymentPspReference/amountUpdates');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments/:paymentPspReference/amountUpdates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": 0
},
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments/:paymentPspReference/amountUpdates' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": 0
},
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payments/:paymentPspReference/amountUpdates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments/:paymentPspReference/amountUpdates"
payload = {
"amount": {
"currency": "",
"value": 0
},
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments/:paymentPspReference/amountUpdates"
payload <- "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments/:paymentPspReference/amountUpdates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payments/:paymentPspReference/amountUpdates') do |req|
req.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"industryUsage\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments/:paymentPspReference/amountUpdates";
let payload = json!({
"amount": json!({
"currency": "",
"value": 0
}),
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": (
json!({
"account": "",
"amount": json!({
"currency": "",
"value": 0
}),
"description": "",
"reference": "",
"type": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payments/:paymentPspReference/amountUpdates \
--header 'content-type: application/json' \
--data '{
"amount": {
"currency": "",
"value": 0
},
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}'
echo '{
"amount": {
"currency": "",
"value": 0
},
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
]
}' | \
http POST {{baseUrl}}/payments/:paymentPspReference/amountUpdates \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": {\n "currency": "",\n "value": 0\n },\n "industryUsage": "",\n "merchantAccount": "",\n "reference": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/payments/:paymentPspReference/amountUpdates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": [
"currency": "",
"value": 0
],
"industryUsage": "",
"merchantAccount": "",
"reference": "",
"splits": [
[
"account": "",
"amount": [
"currency": "",
"value": 0
],
"description": "",
"reference": "",
"type": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments/:paymentPspReference/amountUpdates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Cancel an order
{{baseUrl}}/orders/cancel
BODY json
{
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/orders/cancel");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/orders/cancel" {:content-type :json
:form-params {:merchantAccount ""
:order {:orderData ""
:pspReference ""}}})
require "http/client"
url = "{{baseUrl}}/orders/cancel"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/orders/cancel"),
Content = new StringContent("{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/orders/cancel");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/orders/cancel"
payload := strings.NewReader("{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/orders/cancel HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 89
{
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/orders/cancel")
.setHeader("content-type", "application/json")
.setBody("{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/orders/cancel"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/orders/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/orders/cancel")
.header("content-type", "application/json")
.body("{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
merchantAccount: '',
order: {
orderData: '',
pspReference: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/orders/cancel');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/orders/cancel',
headers: {'content-type': 'application/json'},
data: {merchantAccount: '', order: {orderData: '', pspReference: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/orders/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantAccount":"","order":{"orderData":"","pspReference":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/orders/cancel',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "merchantAccount": "",\n "order": {\n "orderData": "",\n "pspReference": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/orders/cancel")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/orders/cancel',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({merchantAccount: '', order: {orderData: '', pspReference: ''}}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/orders/cancel',
headers: {'content-type': 'application/json'},
body: {merchantAccount: '', order: {orderData: '', pspReference: ''}},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/orders/cancel');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
merchantAccount: '',
order: {
orderData: '',
pspReference: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/orders/cancel',
headers: {'content-type': 'application/json'},
data: {merchantAccount: '', order: {orderData: '', pspReference: ''}}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/orders/cancel';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"merchantAccount":"","order":{"orderData":"","pspReference":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"merchantAccount": @"",
@"order": @{ @"orderData": @"", @"pspReference": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/orders/cancel"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/orders/cancel" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/orders/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchantAccount' => '',
'order' => [
'orderData' => '',
'pspReference' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/orders/cancel', [
'body' => '{
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/orders/cancel');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'merchantAccount' => '',
'order' => [
'orderData' => '',
'pspReference' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'merchantAccount' => '',
'order' => [
'orderData' => '',
'pspReference' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/orders/cancel');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/orders/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/orders/cancel' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/orders/cancel", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/orders/cancel"
payload = {
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/orders/cancel"
payload <- "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/orders/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/orders/cancel') do |req|
req.body = "{\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/orders/cancel";
let payload = json!({
"merchantAccount": "",
"order": json!({
"orderData": "",
"pspReference": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/orders/cancel \
--header 'content-type: application/json' \
--data '{
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
}
}'
echo '{
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
}
}' | \
http POST {{baseUrl}}/orders/cancel \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "merchantAccount": "",\n "order": {\n "orderData": "",\n "pspReference": ""\n }\n}' \
--output-document \
- {{baseUrl}}/orders/cancel
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"merchantAccount": "",
"order": [
"orderData": "",
"pspReference": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/orders/cancel")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"pspReference": "8816178914079738",
"resultCode": "Received"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Create an order
{{baseUrl}}/orders
BODY json
{
"amount": {
"currency": "",
"value": 0
},
"expiresAt": "",
"merchantAccount": "",
"reference": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/orders");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/orders" {:content-type :json
:form-params {:amount {:currency ""
:value 0}
:expiresAt ""
:merchantAccount ""
:reference ""}})
require "http/client"
url = "{{baseUrl}}/orders"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/orders"),
Content = new StringContent("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/orders");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/orders"
payload := strings.NewReader("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/orders HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 119
{
"amount": {
"currency": "",
"value": 0
},
"expiresAt": "",
"merchantAccount": "",
"reference": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/orders")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/orders"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/orders")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/orders")
.header("content-type", "application/json")
.body("{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
.asString();
const data = JSON.stringify({
amount: {
currency: '',
value: 0
},
expiresAt: '',
merchantAccount: '',
reference: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/orders');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/orders',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: 0},
expiresAt: '',
merchantAccount: '',
reference: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/orders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":0},"expiresAt":"","merchantAccount":"","reference":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/orders',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": {\n "currency": "",\n "value": 0\n },\n "expiresAt": "",\n "merchantAccount": "",\n "reference": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/orders")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/orders',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: {currency: '', value: 0},
expiresAt: '',
merchantAccount: '',
reference: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/orders',
headers: {'content-type': 'application/json'},
body: {
amount: {currency: '', value: 0},
expiresAt: '',
merchantAccount: '',
reference: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/orders');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: {
currency: '',
value: 0
},
expiresAt: '',
merchantAccount: '',
reference: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/orders',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: '', value: 0},
expiresAt: '',
merchantAccount: '',
reference: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/orders';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"","value":0},"expiresAt":"","merchantAccount":"","reference":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @{ @"currency": @"", @"value": @0 },
@"expiresAt": @"",
@"merchantAccount": @"",
@"reference": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/orders"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/orders" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/orders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'expiresAt' => '',
'merchantAccount' => '',
'reference' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/orders', [
'body' => '{
"amount": {
"currency": "",
"value": 0
},
"expiresAt": "",
"merchantAccount": "",
"reference": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/orders');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'expiresAt' => '',
'merchantAccount' => '',
'reference' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => [
'currency' => '',
'value' => 0
],
'expiresAt' => '',
'merchantAccount' => '',
'reference' => ''
]));
$request->setRequestUrl('{{baseUrl}}/orders');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/orders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": 0
},
"expiresAt": "",
"merchantAccount": "",
"reference": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/orders' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "",
"value": 0
},
"expiresAt": "",
"merchantAccount": "",
"reference": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/orders", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/orders"
payload = {
"amount": {
"currency": "",
"value": 0
},
"expiresAt": "",
"merchantAccount": "",
"reference": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/orders"
payload <- "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/orders') do |req|
req.body = "{\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"expiresAt\": \"\",\n \"merchantAccount\": \"\",\n \"reference\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/orders";
let payload = json!({
"amount": json!({
"currency": "",
"value": 0
}),
"expiresAt": "",
"merchantAccount": "",
"reference": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/orders \
--header 'content-type: application/json' \
--data '{
"amount": {
"currency": "",
"value": 0
},
"expiresAt": "",
"merchantAccount": "",
"reference": ""
}'
echo '{
"amount": {
"currency": "",
"value": 0
},
"expiresAt": "",
"merchantAccount": "",
"reference": ""
}' | \
http POST {{baseUrl}}/orders \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": {\n "currency": "",\n "value": 0\n },\n "expiresAt": "",\n "merchantAccount": "",\n "reference": ""\n}' \
--output-document \
- {{baseUrl}}/orders
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": [
"currency": "",
"value": 0
],
"expiresAt": "",
"merchantAccount": "",
"reference": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/orders")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"amount": {
"currency": "EUR",
"value": 300
},
"expiresAt": "2021-04-09T14:16:46Z",
"orderData": "Ab02b4c0!BQABAgCxXvknCldOcRElkxY8Za7iyym4Wv8aDzyNwmj/3nh4G6YtwnUIJHaK62NlN4oIsACdkn1FEjBwKlheG40jvXcYGBk4KFV5WvOhTVCpv/KXnkrI7xQv/u2lE7U4wA+HPB6K4Zj2L8xO/ogZi+zGZqFs5m16jmkH7ku6FzXygXLNuUCuOlmlXSZhdkHHTNVQSq1MELDK9OL74y532ETRPTCNxx8WlEiZB+LDqYrPvH9GgigtD5kw8Do45jfFfG72kWBEgfYqp4mbUmBB9ebXFYZKfF0qvW1x7A2Y9+/MFlTIdXfKW484bJeDBCTTrmKGXIj+U4r5imr5fXTyNLcrxyUqwrb9jg+5B4qg1XB6Cgj5UPlSI4O62I7v0s5TTj69dzLwUQRxSQbwLrZVGYavXzeVKI54BVLRV3d/+BbPvTqnTo34UhfZbPlOx9F2eyaS0ZXdOKnHw89uGUgxUpLsMqnbRysi/pxpZaulel+0mExb68wVxb/7Teob5eRG4gp7cfZVZs6tLXOYWL+W0TqIlsa3hWsfM0LeaovzkoDtW/pK5JABXwMtLig9tsxoEh9ONYtIzkXC21LZ8ebiuSIMaPizjF8yca+QxrCZalQsu6uKnBz/mm8nnsflaGU2QS5zcoxk1RudL1Bl36LM9UZGPpFEYWiYA4sUsnNLw7peJjWCGhDepnwMv4TlgsEtoDtz1T54AEp7ImtleSI6IkFGMEFBQTEwM0NBNTM3RUFFRDg3QzI0REQ1MzkwOUI4MEE3OEE5MjNFMzgyM0Q2OERBQ0M5NEI5RkY4MzA1REMifRslOdmfgUHTXl66WPD9xoW2whIeRx/jR++2MqNE16x6zQy+KtDN8/h60crZwmqkjVTQYqQlsYSYDHSIyb4wnnay16/5il1yS7vN3UCLaTXjYBIAyyx6Wr9j4P3CI/etB+PpviHoESC4mV6ZN4whMDQyziQ8s230GtboXbh42qND7rk9phySBogowQlXrtF+l2n2F46nyif0owEgik5fGARfvjZtY2w23s30KMLNwU4gWSvX4H6RMVS8TfZH2fKfNrwB3tZUXwYkELs5ntaHysswq5Mn5aq2BKAMHu/Rh/wureMSI73Qi0avjrzWCwzt3JH4wnzErMnOZwSdgA==",
"pspReference": "8616178914061985",
"reference": "shopper-reference-ekvL83",
"remainingAmount": {
"currency": "EUR",
"value": 2500
},
"resultCode": "Success"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Get the balance of a gift card
{{baseUrl}}/paymentMethods/balance
BODY json
{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"localizedShopperStatement": {},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"orderReference": "",
"paymentMethod": {},
"recurring": {
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
},
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"totalsGroup": "",
"trustedShopper": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentMethods/balance");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/paymentMethods/balance" {:content-type :json
:form-params {:accountInfo {:accountAgeIndicator ""
:accountChangeDate ""
:accountChangeIndicator ""
:accountCreationDate ""
:accountType ""
:addCardAttemptsDay 0
:deliveryAddressUsageDate ""
:deliveryAddressUsageIndicator ""
:homePhone ""
:mobilePhone ""
:passwordChangeDate ""
:passwordChangeIndicator ""
:pastTransactionsDay 0
:pastTransactionsYear 0
:paymentAccountAge ""
:paymentAccountIndicator ""
:purchasesLast6Months 0
:suspiciousActivity false
:workPhone ""}
:additionalAmount {:currency ""
:value 0}
:additionalData {}
:amount {}
:applicationInfo {:adyenLibrary {:name ""
:version ""}
:adyenPaymentSource {}
:externalPlatform {:integrator ""
:name ""
:version ""}
:merchantApplication {}
:merchantDevice {:os ""
:osVersion ""
:reference ""}
:shopperInteractionDevice {:locale ""
:os ""
:osVersion ""}}
:billingAddress {:city ""
:country ""
:houseNumberOrName ""
:postalCode ""
:stateOrProvince ""
:street ""}
:browserInfo {:acceptHeader ""
:colorDepth 0
:javaEnabled false
:javaScriptEnabled false
:language ""
:screenHeight 0
:screenWidth 0
:timeZoneOffset 0
:userAgent ""}
:captureDelayHours 0
:dateOfBirth ""
:dccQuote {:account ""
:accountType ""
:baseAmount {}
:basePoints 0
:buy {}
:interbank {}
:reference ""
:sell {}
:signature ""
:source ""
:type ""
:validTill ""}
:deliveryAddress {}
:deliveryDate ""
:deviceFingerprint ""
:fraudOffset 0
:installments {:plan ""
:value 0}
:localizedShopperStatement {}
:mcc ""
:merchantAccount ""
:merchantOrderReference ""
:merchantRiskIndicator {:addressMatch false
:deliveryAddressIndicator ""
:deliveryEmail ""
:deliveryEmailAddress ""
:deliveryTimeframe ""
:giftCardAmount {}
:giftCardCount 0
:giftCardCurr ""
:preOrderDate ""
:preOrderPurchase false
:preOrderPurchaseInd ""
:reorderItems false
:reorderItemsInd ""
:shipIndicator ""}
:metadata {}
:orderReference ""
:paymentMethod {}
:recurring {:contract ""
:recurringDetailName ""
:recurringExpiry ""
:recurringFrequency ""
:tokenService ""}
:recurringProcessingModel ""
:reference ""
:selectedBrand ""
:selectedRecurringDetailReference ""
:sessionId ""
:shopperEmail ""
:shopperIP ""
:shopperInteraction ""
:shopperLocale ""
:shopperName {:firstName ""
:lastName ""}
:shopperReference ""
:shopperStatement ""
:socialSecurityNumber ""
:splits [{:account ""
:amount {:currency ""
:value 0}
:description ""
:reference ""
:type ""}]
:store ""
:telephoneNumber ""
:threeDS2RequestData {:acctInfo {:chAccAgeInd ""
:chAccChange ""
:chAccChangeInd ""
:chAccPwChange ""
:chAccPwChangeInd ""
:chAccString ""
:nbPurchaseAccount ""
:paymentAccAge ""
:paymentAccInd ""
:provisionAttemptsDay ""
:shipAddressUsage ""
:shipAddressUsageInd ""
:shipNameIndicator ""
:suspiciousAccActivity ""
:txnActivityDay ""
:txnActivityYear ""}
:acctType ""
:acquirerBIN ""
:acquirerMerchantID ""
:addrMatch ""
:authenticationOnly false
:challengeIndicator ""
:deviceChannel ""
:deviceRenderOptions {:sdkInterface ""
:sdkUiType []}
:homePhone {:cc ""
:subscriber ""}
:mcc ""
:merchantName ""
:messageVersion ""
:mobilePhone {}
:notificationURL ""
:payTokenInd false
:paymentAuthenticationUseCase ""
:purchaseInstalData ""
:recurringExpiry ""
:recurringFrequency ""
:sdkAppID ""
:sdkEncData ""
:sdkEphemPubKey {:crv ""
:kty ""
:x ""
:y ""}
:sdkMaxTimeout 0
:sdkReferenceNumber ""
:sdkTransID ""
:sdkVersion ""
:threeDSCompInd ""
:threeDSRequestorAuthenticationInd ""
:threeDSRequestorAuthenticationInfo {:threeDSReqAuthData ""
:threeDSReqAuthMethod ""
:threeDSReqAuthTimestamp ""}
:threeDSRequestorChallengeInd ""
:threeDSRequestorID ""
:threeDSRequestorName ""
:threeDSRequestorPriorAuthenticationInfo {:threeDSReqPriorAuthData ""
:threeDSReqPriorAuthMethod ""
:threeDSReqPriorAuthTimestamp ""
:threeDSReqPriorRef ""}
:threeDSRequestorURL ""
:transType ""
:transactionType ""
:whiteListStatus ""
:workPhone {}}
:threeDSAuthenticationOnly false
:totalsGroup ""
:trustedShopper false}})
require "http/client"
url = "{{baseUrl}}/paymentMethods/balance"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/paymentMethods/balance"),
Content = new StringContent("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentMethods/balance");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentMethods/balance"
payload := strings.NewReader("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/paymentMethods/balance HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5431
{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"localizedShopperStatement": {},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"orderReference": "",
"paymentMethod": {},
"recurring": {
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
},
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"totalsGroup": "",
"trustedShopper": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/paymentMethods/balance")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentMethods/balance"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/paymentMethods/balance")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/paymentMethods/balance")
.header("content-type", "application/json")
.body("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}")
.asString();
const data = JSON.stringify({
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {
currency: '',
value: 0
},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
fraudOffset: 0,
installments: {
plan: '',
value: 0
},
localizedShopperStatement: {},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
orderReference: '',
paymentMethod: {},
recurring: {
contract: '',
recurringDetailName: '',
recurringExpiry: '',
recurringFrequency: '',
tokenService: ''
},
recurringProcessingModel: '',
reference: '',
selectedBrand: '',
selectedRecurringDetailReference: '',
sessionId: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {
sdkInterface: '',
sdkUiType: []
},
homePhone: {
cc: '',
subscriber: ''
},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {
crv: '',
kty: '',
x: '',
y: ''
},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {
threeDSReqAuthData: '',
threeDSReqAuthMethod: '',
threeDSReqAuthTimestamp: ''
},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
totalsGroup: '',
trustedShopper: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/paymentMethods/balance');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentMethods/balance',
headers: {'content-type': 'application/json'},
data: {
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
fraudOffset: 0,
installments: {plan: '', value: 0},
localizedShopperStatement: {},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
orderReference: '',
paymentMethod: {},
recurring: {
contract: '',
recurringDetailName: '',
recurringExpiry: '',
recurringFrequency: '',
tokenService: ''
},
recurringProcessingModel: '',
reference: '',
selectedBrand: '',
selectedRecurringDetailReference: '',
sessionId: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
totalsGroup: '',
trustedShopper: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentMethods/balance';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountInfo":{"accountAgeIndicator":"","accountChangeDate":"","accountChangeIndicator":"","accountCreationDate":"","accountType":"","addCardAttemptsDay":0,"deliveryAddressUsageDate":"","deliveryAddressUsageIndicator":"","homePhone":"","mobilePhone":"","passwordChangeDate":"","passwordChangeIndicator":"","pastTransactionsDay":0,"pastTransactionsYear":0,"paymentAccountAge":"","paymentAccountIndicator":"","purchasesLast6Months":0,"suspiciousActivity":false,"workPhone":""},"additionalAmount":{"currency":"","value":0},"additionalData":{},"amount":{},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"browserInfo":{"acceptHeader":"","colorDepth":0,"javaEnabled":false,"javaScriptEnabled":false,"language":"","screenHeight":0,"screenWidth":0,"timeZoneOffset":0,"userAgent":""},"captureDelayHours":0,"dateOfBirth":"","dccQuote":{"account":"","accountType":"","baseAmount":{},"basePoints":0,"buy":{},"interbank":{},"reference":"","sell":{},"signature":"","source":"","type":"","validTill":""},"deliveryAddress":{},"deliveryDate":"","deviceFingerprint":"","fraudOffset":0,"installments":{"plan":"","value":0},"localizedShopperStatement":{},"mcc":"","merchantAccount":"","merchantOrderReference":"","merchantRiskIndicator":{"addressMatch":false,"deliveryAddressIndicator":"","deliveryEmail":"","deliveryEmailAddress":"","deliveryTimeframe":"","giftCardAmount":{},"giftCardCount":0,"giftCardCurr":"","preOrderDate":"","preOrderPurchase":false,"preOrderPurchaseInd":"","reorderItems":false,"reorderItemsInd":"","shipIndicator":""},"metadata":{},"orderReference":"","paymentMethod":{},"recurring":{"contract":"","recurringDetailName":"","recurringExpiry":"","recurringFrequency":"","tokenService":""},"recurringProcessingModel":"","reference":"","selectedBrand":"","selectedRecurringDetailReference":"","sessionId":"","shopperEmail":"","shopperIP":"","shopperInteraction":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","socialSecurityNumber":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","telephoneNumber":"","threeDS2RequestData":{"acctInfo":{"chAccAgeInd":"","chAccChange":"","chAccChangeInd":"","chAccPwChange":"","chAccPwChangeInd":"","chAccString":"","nbPurchaseAccount":"","paymentAccAge":"","paymentAccInd":"","provisionAttemptsDay":"","shipAddressUsage":"","shipAddressUsageInd":"","shipNameIndicator":"","suspiciousAccActivity":"","txnActivityDay":"","txnActivityYear":""},"acctType":"","acquirerBIN":"","acquirerMerchantID":"","addrMatch":"","authenticationOnly":false,"challengeIndicator":"","deviceChannel":"","deviceRenderOptions":{"sdkInterface":"","sdkUiType":[]},"homePhone":{"cc":"","subscriber":""},"mcc":"","merchantName":"","messageVersion":"","mobilePhone":{},"notificationURL":"","payTokenInd":false,"paymentAuthenticationUseCase":"","purchaseInstalData":"","recurringExpiry":"","recurringFrequency":"","sdkAppID":"","sdkEncData":"","sdkEphemPubKey":{"crv":"","kty":"","x":"","y":""},"sdkMaxTimeout":0,"sdkReferenceNumber":"","sdkTransID":"","sdkVersion":"","threeDSCompInd":"","threeDSRequestorAuthenticationInd":"","threeDSRequestorAuthenticationInfo":{"threeDSReqAuthData":"","threeDSReqAuthMethod":"","threeDSReqAuthTimestamp":""},"threeDSRequestorChallengeInd":"","threeDSRequestorID":"","threeDSRequestorName":"","threeDSRequestorPriorAuthenticationInfo":{"threeDSReqPriorAuthData":"","threeDSReqPriorAuthMethod":"","threeDSReqPriorAuthTimestamp":"","threeDSReqPriorRef":""},"threeDSRequestorURL":"","transType":"","transactionType":"","whiteListStatus":"","workPhone":{}},"threeDSAuthenticationOnly":false,"totalsGroup":"","trustedShopper":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/paymentMethods/balance',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountInfo": {\n "accountAgeIndicator": "",\n "accountChangeDate": "",\n "accountChangeIndicator": "",\n "accountCreationDate": "",\n "accountType": "",\n "addCardAttemptsDay": 0,\n "deliveryAddressUsageDate": "",\n "deliveryAddressUsageIndicator": "",\n "homePhone": "",\n "mobilePhone": "",\n "passwordChangeDate": "",\n "passwordChangeIndicator": "",\n "pastTransactionsDay": 0,\n "pastTransactionsYear": 0,\n "paymentAccountAge": "",\n "paymentAccountIndicator": "",\n "purchasesLast6Months": 0,\n "suspiciousActivity": false,\n "workPhone": ""\n },\n "additionalAmount": {\n "currency": "",\n "value": 0\n },\n "additionalData": {},\n "amount": {},\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "browserInfo": {\n "acceptHeader": "",\n "colorDepth": 0,\n "javaEnabled": false,\n "javaScriptEnabled": false,\n "language": "",\n "screenHeight": 0,\n "screenWidth": 0,\n "timeZoneOffset": 0,\n "userAgent": ""\n },\n "captureDelayHours": 0,\n "dateOfBirth": "",\n "dccQuote": {\n "account": "",\n "accountType": "",\n "baseAmount": {},\n "basePoints": 0,\n "buy": {},\n "interbank": {},\n "reference": "",\n "sell": {},\n "signature": "",\n "source": "",\n "type": "",\n "validTill": ""\n },\n "deliveryAddress": {},\n "deliveryDate": "",\n "deviceFingerprint": "",\n "fraudOffset": 0,\n "installments": {\n "plan": "",\n "value": 0\n },\n "localizedShopperStatement": {},\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "merchantRiskIndicator": {\n "addressMatch": false,\n "deliveryAddressIndicator": "",\n "deliveryEmail": "",\n "deliveryEmailAddress": "",\n "deliveryTimeframe": "",\n "giftCardAmount": {},\n "giftCardCount": 0,\n "giftCardCurr": "",\n "preOrderDate": "",\n "preOrderPurchase": false,\n "preOrderPurchaseInd": "",\n "reorderItems": false,\n "reorderItemsInd": "",\n "shipIndicator": ""\n },\n "metadata": {},\n "orderReference": "",\n "paymentMethod": {},\n "recurring": {\n "contract": "",\n "recurringDetailName": "",\n "recurringExpiry": "",\n "recurringFrequency": "",\n "tokenService": ""\n },\n "recurringProcessingModel": "",\n "reference": "",\n "selectedBrand": "",\n "selectedRecurringDetailReference": "",\n "sessionId": "",\n "shopperEmail": "",\n "shopperIP": "",\n "shopperInteraction": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "socialSecurityNumber": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "telephoneNumber": "",\n "threeDS2RequestData": {\n "acctInfo": {\n "chAccAgeInd": "",\n "chAccChange": "",\n "chAccChangeInd": "",\n "chAccPwChange": "",\n "chAccPwChangeInd": "",\n "chAccString": "",\n "nbPurchaseAccount": "",\n "paymentAccAge": "",\n "paymentAccInd": "",\n "provisionAttemptsDay": "",\n "shipAddressUsage": "",\n "shipAddressUsageInd": "",\n "shipNameIndicator": "",\n "suspiciousAccActivity": "",\n "txnActivityDay": "",\n "txnActivityYear": ""\n },\n "acctType": "",\n "acquirerBIN": "",\n "acquirerMerchantID": "",\n "addrMatch": "",\n "authenticationOnly": false,\n "challengeIndicator": "",\n "deviceChannel": "",\n "deviceRenderOptions": {\n "sdkInterface": "",\n "sdkUiType": []\n },\n "homePhone": {\n "cc": "",\n "subscriber": ""\n },\n "mcc": "",\n "merchantName": "",\n "messageVersion": "",\n "mobilePhone": {},\n "notificationURL": "",\n "payTokenInd": false,\n "paymentAuthenticationUseCase": "",\n "purchaseInstalData": "",\n "recurringExpiry": "",\n "recurringFrequency": "",\n "sdkAppID": "",\n "sdkEncData": "",\n "sdkEphemPubKey": {\n "crv": "",\n "kty": "",\n "x": "",\n "y": ""\n },\n "sdkMaxTimeout": 0,\n "sdkReferenceNumber": "",\n "sdkTransID": "",\n "sdkVersion": "",\n "threeDSCompInd": "",\n "threeDSRequestorAuthenticationInd": "",\n "threeDSRequestorAuthenticationInfo": {\n "threeDSReqAuthData": "",\n "threeDSReqAuthMethod": "",\n "threeDSReqAuthTimestamp": ""\n },\n "threeDSRequestorChallengeInd": "",\n "threeDSRequestorID": "",\n "threeDSRequestorName": "",\n "threeDSRequestorPriorAuthenticationInfo": {\n "threeDSReqPriorAuthData": "",\n "threeDSReqPriorAuthMethod": "",\n "threeDSReqPriorAuthTimestamp": "",\n "threeDSReqPriorRef": ""\n },\n "threeDSRequestorURL": "",\n "transType": "",\n "transactionType": "",\n "whiteListStatus": "",\n "workPhone": {}\n },\n "threeDSAuthenticationOnly": false,\n "totalsGroup": "",\n "trustedShopper": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/paymentMethods/balance")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentMethods/balance',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
fraudOffset: 0,
installments: {plan: '', value: 0},
localizedShopperStatement: {},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
orderReference: '',
paymentMethod: {},
recurring: {
contract: '',
recurringDetailName: '',
recurringExpiry: '',
recurringFrequency: '',
tokenService: ''
},
recurringProcessingModel: '',
reference: '',
selectedBrand: '',
selectedRecurringDetailReference: '',
sessionId: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
totalsGroup: '',
trustedShopper: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentMethods/balance',
headers: {'content-type': 'application/json'},
body: {
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
fraudOffset: 0,
installments: {plan: '', value: 0},
localizedShopperStatement: {},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
orderReference: '',
paymentMethod: {},
recurring: {
contract: '',
recurringDetailName: '',
recurringExpiry: '',
recurringFrequency: '',
tokenService: ''
},
recurringProcessingModel: '',
reference: '',
selectedBrand: '',
selectedRecurringDetailReference: '',
sessionId: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
totalsGroup: '',
trustedShopper: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/paymentMethods/balance');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {
currency: '',
value: 0
},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
fraudOffset: 0,
installments: {
plan: '',
value: 0
},
localizedShopperStatement: {},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
orderReference: '',
paymentMethod: {},
recurring: {
contract: '',
recurringDetailName: '',
recurringExpiry: '',
recurringFrequency: '',
tokenService: ''
},
recurringProcessingModel: '',
reference: '',
selectedBrand: '',
selectedRecurringDetailReference: '',
sessionId: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {
sdkInterface: '',
sdkUiType: []
},
homePhone: {
cc: '',
subscriber: ''
},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {
crv: '',
kty: '',
x: '',
y: ''
},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {
threeDSReqAuthData: '',
threeDSReqAuthMethod: '',
threeDSReqAuthTimestamp: ''
},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
totalsGroup: '',
trustedShopper: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentMethods/balance',
headers: {'content-type': 'application/json'},
data: {
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
fraudOffset: 0,
installments: {plan: '', value: 0},
localizedShopperStatement: {},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
orderReference: '',
paymentMethod: {},
recurring: {
contract: '',
recurringDetailName: '',
recurringExpiry: '',
recurringFrequency: '',
tokenService: ''
},
recurringProcessingModel: '',
reference: '',
selectedBrand: '',
selectedRecurringDetailReference: '',
sessionId: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
totalsGroup: '',
trustedShopper: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentMethods/balance';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountInfo":{"accountAgeIndicator":"","accountChangeDate":"","accountChangeIndicator":"","accountCreationDate":"","accountType":"","addCardAttemptsDay":0,"deliveryAddressUsageDate":"","deliveryAddressUsageIndicator":"","homePhone":"","mobilePhone":"","passwordChangeDate":"","passwordChangeIndicator":"","pastTransactionsDay":0,"pastTransactionsYear":0,"paymentAccountAge":"","paymentAccountIndicator":"","purchasesLast6Months":0,"suspiciousActivity":false,"workPhone":""},"additionalAmount":{"currency":"","value":0},"additionalData":{},"amount":{},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"browserInfo":{"acceptHeader":"","colorDepth":0,"javaEnabled":false,"javaScriptEnabled":false,"language":"","screenHeight":0,"screenWidth":0,"timeZoneOffset":0,"userAgent":""},"captureDelayHours":0,"dateOfBirth":"","dccQuote":{"account":"","accountType":"","baseAmount":{},"basePoints":0,"buy":{},"interbank":{},"reference":"","sell":{},"signature":"","source":"","type":"","validTill":""},"deliveryAddress":{},"deliveryDate":"","deviceFingerprint":"","fraudOffset":0,"installments":{"plan":"","value":0},"localizedShopperStatement":{},"mcc":"","merchantAccount":"","merchantOrderReference":"","merchantRiskIndicator":{"addressMatch":false,"deliveryAddressIndicator":"","deliveryEmail":"","deliveryEmailAddress":"","deliveryTimeframe":"","giftCardAmount":{},"giftCardCount":0,"giftCardCurr":"","preOrderDate":"","preOrderPurchase":false,"preOrderPurchaseInd":"","reorderItems":false,"reorderItemsInd":"","shipIndicator":""},"metadata":{},"orderReference":"","paymentMethod":{},"recurring":{"contract":"","recurringDetailName":"","recurringExpiry":"","recurringFrequency":"","tokenService":""},"recurringProcessingModel":"","reference":"","selectedBrand":"","selectedRecurringDetailReference":"","sessionId":"","shopperEmail":"","shopperIP":"","shopperInteraction":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","socialSecurityNumber":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","telephoneNumber":"","threeDS2RequestData":{"acctInfo":{"chAccAgeInd":"","chAccChange":"","chAccChangeInd":"","chAccPwChange":"","chAccPwChangeInd":"","chAccString":"","nbPurchaseAccount":"","paymentAccAge":"","paymentAccInd":"","provisionAttemptsDay":"","shipAddressUsage":"","shipAddressUsageInd":"","shipNameIndicator":"","suspiciousAccActivity":"","txnActivityDay":"","txnActivityYear":""},"acctType":"","acquirerBIN":"","acquirerMerchantID":"","addrMatch":"","authenticationOnly":false,"challengeIndicator":"","deviceChannel":"","deviceRenderOptions":{"sdkInterface":"","sdkUiType":[]},"homePhone":{"cc":"","subscriber":""},"mcc":"","merchantName":"","messageVersion":"","mobilePhone":{},"notificationURL":"","payTokenInd":false,"paymentAuthenticationUseCase":"","purchaseInstalData":"","recurringExpiry":"","recurringFrequency":"","sdkAppID":"","sdkEncData":"","sdkEphemPubKey":{"crv":"","kty":"","x":"","y":""},"sdkMaxTimeout":0,"sdkReferenceNumber":"","sdkTransID":"","sdkVersion":"","threeDSCompInd":"","threeDSRequestorAuthenticationInd":"","threeDSRequestorAuthenticationInfo":{"threeDSReqAuthData":"","threeDSReqAuthMethod":"","threeDSReqAuthTimestamp":""},"threeDSRequestorChallengeInd":"","threeDSRequestorID":"","threeDSRequestorName":"","threeDSRequestorPriorAuthenticationInfo":{"threeDSReqPriorAuthData":"","threeDSReqPriorAuthMethod":"","threeDSReqPriorAuthTimestamp":"","threeDSReqPriorRef":""},"threeDSRequestorURL":"","transType":"","transactionType":"","whiteListStatus":"","workPhone":{}},"threeDSAuthenticationOnly":false,"totalsGroup":"","trustedShopper":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountInfo": @{ @"accountAgeIndicator": @"", @"accountChangeDate": @"", @"accountChangeIndicator": @"", @"accountCreationDate": @"", @"accountType": @"", @"addCardAttemptsDay": @0, @"deliveryAddressUsageDate": @"", @"deliveryAddressUsageIndicator": @"", @"homePhone": @"", @"mobilePhone": @"", @"passwordChangeDate": @"", @"passwordChangeIndicator": @"", @"pastTransactionsDay": @0, @"pastTransactionsYear": @0, @"paymentAccountAge": @"", @"paymentAccountIndicator": @"", @"purchasesLast6Months": @0, @"suspiciousActivity": @NO, @"workPhone": @"" },
@"additionalAmount": @{ @"currency": @"", @"value": @0 },
@"additionalData": @{ },
@"amount": @{ },
@"applicationInfo": @{ @"adyenLibrary": @{ @"name": @"", @"version": @"" }, @"adyenPaymentSource": @{ }, @"externalPlatform": @{ @"integrator": @"", @"name": @"", @"version": @"" }, @"merchantApplication": @{ }, @"merchantDevice": @{ @"os": @"", @"osVersion": @"", @"reference": @"" }, @"shopperInteractionDevice": @{ @"locale": @"", @"os": @"", @"osVersion": @"" } },
@"billingAddress": @{ @"city": @"", @"country": @"", @"houseNumberOrName": @"", @"postalCode": @"", @"stateOrProvince": @"", @"street": @"" },
@"browserInfo": @{ @"acceptHeader": @"", @"colorDepth": @0, @"javaEnabled": @NO, @"javaScriptEnabled": @NO, @"language": @"", @"screenHeight": @0, @"screenWidth": @0, @"timeZoneOffset": @0, @"userAgent": @"" },
@"captureDelayHours": @0,
@"dateOfBirth": @"",
@"dccQuote": @{ @"account": @"", @"accountType": @"", @"baseAmount": @{ }, @"basePoints": @0, @"buy": @{ }, @"interbank": @{ }, @"reference": @"", @"sell": @{ }, @"signature": @"", @"source": @"", @"type": @"", @"validTill": @"" },
@"deliveryAddress": @{ },
@"deliveryDate": @"",
@"deviceFingerprint": @"",
@"fraudOffset": @0,
@"installments": @{ @"plan": @"", @"value": @0 },
@"localizedShopperStatement": @{ },
@"mcc": @"",
@"merchantAccount": @"",
@"merchantOrderReference": @"",
@"merchantRiskIndicator": @{ @"addressMatch": @NO, @"deliveryAddressIndicator": @"", @"deliveryEmail": @"", @"deliveryEmailAddress": @"", @"deliveryTimeframe": @"", @"giftCardAmount": @{ }, @"giftCardCount": @0, @"giftCardCurr": @"", @"preOrderDate": @"", @"preOrderPurchase": @NO, @"preOrderPurchaseInd": @"", @"reorderItems": @NO, @"reorderItemsInd": @"", @"shipIndicator": @"" },
@"metadata": @{ },
@"orderReference": @"",
@"paymentMethod": @{ },
@"recurring": @{ @"contract": @"", @"recurringDetailName": @"", @"recurringExpiry": @"", @"recurringFrequency": @"", @"tokenService": @"" },
@"recurringProcessingModel": @"",
@"reference": @"",
@"selectedBrand": @"",
@"selectedRecurringDetailReference": @"",
@"sessionId": @"",
@"shopperEmail": @"",
@"shopperIP": @"",
@"shopperInteraction": @"",
@"shopperLocale": @"",
@"shopperName": @{ @"firstName": @"", @"lastName": @"" },
@"shopperReference": @"",
@"shopperStatement": @"",
@"socialSecurityNumber": @"",
@"splits": @[ @{ @"account": @"", @"amount": @{ @"currency": @"", @"value": @0 }, @"description": @"", @"reference": @"", @"type": @"" } ],
@"store": @"",
@"telephoneNumber": @"",
@"threeDS2RequestData": @{ @"acctInfo": @{ @"chAccAgeInd": @"", @"chAccChange": @"", @"chAccChangeInd": @"", @"chAccPwChange": @"", @"chAccPwChangeInd": @"", @"chAccString": @"", @"nbPurchaseAccount": @"", @"paymentAccAge": @"", @"paymentAccInd": @"", @"provisionAttemptsDay": @"", @"shipAddressUsage": @"", @"shipAddressUsageInd": @"", @"shipNameIndicator": @"", @"suspiciousAccActivity": @"", @"txnActivityDay": @"", @"txnActivityYear": @"" }, @"acctType": @"", @"acquirerBIN": @"", @"acquirerMerchantID": @"", @"addrMatch": @"", @"authenticationOnly": @NO, @"challengeIndicator": @"", @"deviceChannel": @"", @"deviceRenderOptions": @{ @"sdkInterface": @"", @"sdkUiType": @[ ] }, @"homePhone": @{ @"cc": @"", @"subscriber": @"" }, @"mcc": @"", @"merchantName": @"", @"messageVersion": @"", @"mobilePhone": @{ }, @"notificationURL": @"", @"payTokenInd": @NO, @"paymentAuthenticationUseCase": @"", @"purchaseInstalData": @"", @"recurringExpiry": @"", @"recurringFrequency": @"", @"sdkAppID": @"", @"sdkEncData": @"", @"sdkEphemPubKey": @{ @"crv": @"", @"kty": @"", @"x": @"", @"y": @"" }, @"sdkMaxTimeout": @0, @"sdkReferenceNumber": @"", @"sdkTransID": @"", @"sdkVersion": @"", @"threeDSCompInd": @"", @"threeDSRequestorAuthenticationInd": @"", @"threeDSRequestorAuthenticationInfo": @{ @"threeDSReqAuthData": @"", @"threeDSReqAuthMethod": @"", @"threeDSReqAuthTimestamp": @"" }, @"threeDSRequestorChallengeInd": @"", @"threeDSRequestorID": @"", @"threeDSRequestorName": @"", @"threeDSRequestorPriorAuthenticationInfo": @{ @"threeDSReqPriorAuthData": @"", @"threeDSReqPriorAuthMethod": @"", @"threeDSReqPriorAuthTimestamp": @"", @"threeDSReqPriorRef": @"" }, @"threeDSRequestorURL": @"", @"transType": @"", @"transactionType": @"", @"whiteListStatus": @"", @"workPhone": @{ } },
@"threeDSAuthenticationOnly": @NO,
@"totalsGroup": @"",
@"trustedShopper": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/paymentMethods/balance"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/paymentMethods/balance" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentMethods/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountInfo' => [
'accountAgeIndicator' => '',
'accountChangeDate' => '',
'accountChangeIndicator' => '',
'accountCreationDate' => '',
'accountType' => '',
'addCardAttemptsDay' => 0,
'deliveryAddressUsageDate' => '',
'deliveryAddressUsageIndicator' => '',
'homePhone' => '',
'mobilePhone' => '',
'passwordChangeDate' => '',
'passwordChangeIndicator' => '',
'pastTransactionsDay' => 0,
'pastTransactionsYear' => 0,
'paymentAccountAge' => '',
'paymentAccountIndicator' => '',
'purchasesLast6Months' => 0,
'suspiciousActivity' => null,
'workPhone' => ''
],
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'browserInfo' => [
'acceptHeader' => '',
'colorDepth' => 0,
'javaEnabled' => null,
'javaScriptEnabled' => null,
'language' => '',
'screenHeight' => 0,
'screenWidth' => 0,
'timeZoneOffset' => 0,
'userAgent' => ''
],
'captureDelayHours' => 0,
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'deviceFingerprint' => '',
'fraudOffset' => 0,
'installments' => [
'plan' => '',
'value' => 0
],
'localizedShopperStatement' => [
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'merchantRiskIndicator' => [
'addressMatch' => null,
'deliveryAddressIndicator' => '',
'deliveryEmail' => '',
'deliveryEmailAddress' => '',
'deliveryTimeframe' => '',
'giftCardAmount' => [
],
'giftCardCount' => 0,
'giftCardCurr' => '',
'preOrderDate' => '',
'preOrderPurchase' => null,
'preOrderPurchaseInd' => '',
'reorderItems' => null,
'reorderItemsInd' => '',
'shipIndicator' => ''
],
'metadata' => [
],
'orderReference' => '',
'paymentMethod' => [
],
'recurring' => [
'contract' => '',
'recurringDetailName' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'tokenService' => ''
],
'recurringProcessingModel' => '',
'reference' => '',
'selectedBrand' => '',
'selectedRecurringDetailReference' => '',
'sessionId' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'telephoneNumber' => '',
'threeDS2RequestData' => [
'acctInfo' => [
'chAccAgeInd' => '',
'chAccChange' => '',
'chAccChangeInd' => '',
'chAccPwChange' => '',
'chAccPwChangeInd' => '',
'chAccString' => '',
'nbPurchaseAccount' => '',
'paymentAccAge' => '',
'paymentAccInd' => '',
'provisionAttemptsDay' => '',
'shipAddressUsage' => '',
'shipAddressUsageInd' => '',
'shipNameIndicator' => '',
'suspiciousAccActivity' => '',
'txnActivityDay' => '',
'txnActivityYear' => ''
],
'acctType' => '',
'acquirerBIN' => '',
'acquirerMerchantID' => '',
'addrMatch' => '',
'authenticationOnly' => null,
'challengeIndicator' => '',
'deviceChannel' => '',
'deviceRenderOptions' => [
'sdkInterface' => '',
'sdkUiType' => [
]
],
'homePhone' => [
'cc' => '',
'subscriber' => ''
],
'mcc' => '',
'merchantName' => '',
'messageVersion' => '',
'mobilePhone' => [
],
'notificationURL' => '',
'payTokenInd' => null,
'paymentAuthenticationUseCase' => '',
'purchaseInstalData' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'sdkAppID' => '',
'sdkEncData' => '',
'sdkEphemPubKey' => [
'crv' => '',
'kty' => '',
'x' => '',
'y' => ''
],
'sdkMaxTimeout' => 0,
'sdkReferenceNumber' => '',
'sdkTransID' => '',
'sdkVersion' => '',
'threeDSCompInd' => '',
'threeDSRequestorAuthenticationInd' => '',
'threeDSRequestorAuthenticationInfo' => [
'threeDSReqAuthData' => '',
'threeDSReqAuthMethod' => '',
'threeDSReqAuthTimestamp' => ''
],
'threeDSRequestorChallengeInd' => '',
'threeDSRequestorID' => '',
'threeDSRequestorName' => '',
'threeDSRequestorPriorAuthenticationInfo' => [
'threeDSReqPriorAuthData' => '',
'threeDSReqPriorAuthMethod' => '',
'threeDSReqPriorAuthTimestamp' => '',
'threeDSReqPriorRef' => ''
],
'threeDSRequestorURL' => '',
'transType' => '',
'transactionType' => '',
'whiteListStatus' => '',
'workPhone' => [
]
],
'threeDSAuthenticationOnly' => null,
'totalsGroup' => '',
'trustedShopper' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/paymentMethods/balance', [
'body' => '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"localizedShopperStatement": {},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"orderReference": "",
"paymentMethod": {},
"recurring": {
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
},
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"totalsGroup": "",
"trustedShopper": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/paymentMethods/balance');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountInfo' => [
'accountAgeIndicator' => '',
'accountChangeDate' => '',
'accountChangeIndicator' => '',
'accountCreationDate' => '',
'accountType' => '',
'addCardAttemptsDay' => 0,
'deliveryAddressUsageDate' => '',
'deliveryAddressUsageIndicator' => '',
'homePhone' => '',
'mobilePhone' => '',
'passwordChangeDate' => '',
'passwordChangeIndicator' => '',
'pastTransactionsDay' => 0,
'pastTransactionsYear' => 0,
'paymentAccountAge' => '',
'paymentAccountIndicator' => '',
'purchasesLast6Months' => 0,
'suspiciousActivity' => null,
'workPhone' => ''
],
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'browserInfo' => [
'acceptHeader' => '',
'colorDepth' => 0,
'javaEnabled' => null,
'javaScriptEnabled' => null,
'language' => '',
'screenHeight' => 0,
'screenWidth' => 0,
'timeZoneOffset' => 0,
'userAgent' => ''
],
'captureDelayHours' => 0,
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'deviceFingerprint' => '',
'fraudOffset' => 0,
'installments' => [
'plan' => '',
'value' => 0
],
'localizedShopperStatement' => [
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'merchantRiskIndicator' => [
'addressMatch' => null,
'deliveryAddressIndicator' => '',
'deliveryEmail' => '',
'deliveryEmailAddress' => '',
'deliveryTimeframe' => '',
'giftCardAmount' => [
],
'giftCardCount' => 0,
'giftCardCurr' => '',
'preOrderDate' => '',
'preOrderPurchase' => null,
'preOrderPurchaseInd' => '',
'reorderItems' => null,
'reorderItemsInd' => '',
'shipIndicator' => ''
],
'metadata' => [
],
'orderReference' => '',
'paymentMethod' => [
],
'recurring' => [
'contract' => '',
'recurringDetailName' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'tokenService' => ''
],
'recurringProcessingModel' => '',
'reference' => '',
'selectedBrand' => '',
'selectedRecurringDetailReference' => '',
'sessionId' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'telephoneNumber' => '',
'threeDS2RequestData' => [
'acctInfo' => [
'chAccAgeInd' => '',
'chAccChange' => '',
'chAccChangeInd' => '',
'chAccPwChange' => '',
'chAccPwChangeInd' => '',
'chAccString' => '',
'nbPurchaseAccount' => '',
'paymentAccAge' => '',
'paymentAccInd' => '',
'provisionAttemptsDay' => '',
'shipAddressUsage' => '',
'shipAddressUsageInd' => '',
'shipNameIndicator' => '',
'suspiciousAccActivity' => '',
'txnActivityDay' => '',
'txnActivityYear' => ''
],
'acctType' => '',
'acquirerBIN' => '',
'acquirerMerchantID' => '',
'addrMatch' => '',
'authenticationOnly' => null,
'challengeIndicator' => '',
'deviceChannel' => '',
'deviceRenderOptions' => [
'sdkInterface' => '',
'sdkUiType' => [
]
],
'homePhone' => [
'cc' => '',
'subscriber' => ''
],
'mcc' => '',
'merchantName' => '',
'messageVersion' => '',
'mobilePhone' => [
],
'notificationURL' => '',
'payTokenInd' => null,
'paymentAuthenticationUseCase' => '',
'purchaseInstalData' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'sdkAppID' => '',
'sdkEncData' => '',
'sdkEphemPubKey' => [
'crv' => '',
'kty' => '',
'x' => '',
'y' => ''
],
'sdkMaxTimeout' => 0,
'sdkReferenceNumber' => '',
'sdkTransID' => '',
'sdkVersion' => '',
'threeDSCompInd' => '',
'threeDSRequestorAuthenticationInd' => '',
'threeDSRequestorAuthenticationInfo' => [
'threeDSReqAuthData' => '',
'threeDSReqAuthMethod' => '',
'threeDSReqAuthTimestamp' => ''
],
'threeDSRequestorChallengeInd' => '',
'threeDSRequestorID' => '',
'threeDSRequestorName' => '',
'threeDSRequestorPriorAuthenticationInfo' => [
'threeDSReqPriorAuthData' => '',
'threeDSReqPriorAuthMethod' => '',
'threeDSReqPriorAuthTimestamp' => '',
'threeDSReqPriorRef' => ''
],
'threeDSRequestorURL' => '',
'transType' => '',
'transactionType' => '',
'whiteListStatus' => '',
'workPhone' => [
]
],
'threeDSAuthenticationOnly' => null,
'totalsGroup' => '',
'trustedShopper' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountInfo' => [
'accountAgeIndicator' => '',
'accountChangeDate' => '',
'accountChangeIndicator' => '',
'accountCreationDate' => '',
'accountType' => '',
'addCardAttemptsDay' => 0,
'deliveryAddressUsageDate' => '',
'deliveryAddressUsageIndicator' => '',
'homePhone' => '',
'mobilePhone' => '',
'passwordChangeDate' => '',
'passwordChangeIndicator' => '',
'pastTransactionsDay' => 0,
'pastTransactionsYear' => 0,
'paymentAccountAge' => '',
'paymentAccountIndicator' => '',
'purchasesLast6Months' => 0,
'suspiciousActivity' => null,
'workPhone' => ''
],
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'browserInfo' => [
'acceptHeader' => '',
'colorDepth' => 0,
'javaEnabled' => null,
'javaScriptEnabled' => null,
'language' => '',
'screenHeight' => 0,
'screenWidth' => 0,
'timeZoneOffset' => 0,
'userAgent' => ''
],
'captureDelayHours' => 0,
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'deviceFingerprint' => '',
'fraudOffset' => 0,
'installments' => [
'plan' => '',
'value' => 0
],
'localizedShopperStatement' => [
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'merchantRiskIndicator' => [
'addressMatch' => null,
'deliveryAddressIndicator' => '',
'deliveryEmail' => '',
'deliveryEmailAddress' => '',
'deliveryTimeframe' => '',
'giftCardAmount' => [
],
'giftCardCount' => 0,
'giftCardCurr' => '',
'preOrderDate' => '',
'preOrderPurchase' => null,
'preOrderPurchaseInd' => '',
'reorderItems' => null,
'reorderItemsInd' => '',
'shipIndicator' => ''
],
'metadata' => [
],
'orderReference' => '',
'paymentMethod' => [
],
'recurring' => [
'contract' => '',
'recurringDetailName' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'tokenService' => ''
],
'recurringProcessingModel' => '',
'reference' => '',
'selectedBrand' => '',
'selectedRecurringDetailReference' => '',
'sessionId' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'telephoneNumber' => '',
'threeDS2RequestData' => [
'acctInfo' => [
'chAccAgeInd' => '',
'chAccChange' => '',
'chAccChangeInd' => '',
'chAccPwChange' => '',
'chAccPwChangeInd' => '',
'chAccString' => '',
'nbPurchaseAccount' => '',
'paymentAccAge' => '',
'paymentAccInd' => '',
'provisionAttemptsDay' => '',
'shipAddressUsage' => '',
'shipAddressUsageInd' => '',
'shipNameIndicator' => '',
'suspiciousAccActivity' => '',
'txnActivityDay' => '',
'txnActivityYear' => ''
],
'acctType' => '',
'acquirerBIN' => '',
'acquirerMerchantID' => '',
'addrMatch' => '',
'authenticationOnly' => null,
'challengeIndicator' => '',
'deviceChannel' => '',
'deviceRenderOptions' => [
'sdkInterface' => '',
'sdkUiType' => [
]
],
'homePhone' => [
'cc' => '',
'subscriber' => ''
],
'mcc' => '',
'merchantName' => '',
'messageVersion' => '',
'mobilePhone' => [
],
'notificationURL' => '',
'payTokenInd' => null,
'paymentAuthenticationUseCase' => '',
'purchaseInstalData' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'sdkAppID' => '',
'sdkEncData' => '',
'sdkEphemPubKey' => [
'crv' => '',
'kty' => '',
'x' => '',
'y' => ''
],
'sdkMaxTimeout' => 0,
'sdkReferenceNumber' => '',
'sdkTransID' => '',
'sdkVersion' => '',
'threeDSCompInd' => '',
'threeDSRequestorAuthenticationInd' => '',
'threeDSRequestorAuthenticationInfo' => [
'threeDSReqAuthData' => '',
'threeDSReqAuthMethod' => '',
'threeDSReqAuthTimestamp' => ''
],
'threeDSRequestorChallengeInd' => '',
'threeDSRequestorID' => '',
'threeDSRequestorName' => '',
'threeDSRequestorPriorAuthenticationInfo' => [
'threeDSReqPriorAuthData' => '',
'threeDSReqPriorAuthMethod' => '',
'threeDSReqPriorAuthTimestamp' => '',
'threeDSReqPriorRef' => ''
],
'threeDSRequestorURL' => '',
'transType' => '',
'transactionType' => '',
'whiteListStatus' => '',
'workPhone' => [
]
],
'threeDSAuthenticationOnly' => null,
'totalsGroup' => '',
'trustedShopper' => null
]));
$request->setRequestUrl('{{baseUrl}}/paymentMethods/balance');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentMethods/balance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"localizedShopperStatement": {},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"orderReference": "",
"paymentMethod": {},
"recurring": {
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
},
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"totalsGroup": "",
"trustedShopper": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentMethods/balance' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"localizedShopperStatement": {},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"orderReference": "",
"paymentMethod": {},
"recurring": {
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
},
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"totalsGroup": "",
"trustedShopper": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/paymentMethods/balance", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentMethods/balance"
payload = {
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": False,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": False,
"javaScriptEnabled": False,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"localizedShopperStatement": {},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": False,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": False,
"preOrderPurchaseInd": "",
"reorderItems": False,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"orderReference": "",
"paymentMethod": {},
"recurring": {
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
},
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": False,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": False,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": False,
"totalsGroup": "",
"trustedShopper": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentMethods/balance"
payload <- "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentMethods/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/paymentMethods/balance') do |req|
req.body = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"fraudOffset\": 0,\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"localizedShopperStatement\": {},\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"orderReference\": \"\",\n \"paymentMethod\": {},\n \"recurring\": {\n \"contract\": \"\",\n \"recurringDetailName\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"tokenService\": \"\"\n },\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"selectedBrand\": \"\",\n \"selectedRecurringDetailReference\": \"\",\n \"sessionId\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"totalsGroup\": \"\",\n \"trustedShopper\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentMethods/balance";
let payload = json!({
"accountInfo": json!({
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
}),
"additionalAmount": json!({
"currency": "",
"value": 0
}),
"additionalData": json!({}),
"amount": json!({}),
"applicationInfo": json!({
"adyenLibrary": json!({
"name": "",
"version": ""
}),
"adyenPaymentSource": json!({}),
"externalPlatform": json!({
"integrator": "",
"name": "",
"version": ""
}),
"merchantApplication": json!({}),
"merchantDevice": json!({
"os": "",
"osVersion": "",
"reference": ""
}),
"shopperInteractionDevice": json!({
"locale": "",
"os": "",
"osVersion": ""
})
}),
"billingAddress": json!({
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
}),
"browserInfo": json!({
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
}),
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": json!({
"account": "",
"accountType": "",
"baseAmount": json!({}),
"basePoints": 0,
"buy": json!({}),
"interbank": json!({}),
"reference": "",
"sell": json!({}),
"signature": "",
"source": "",
"type": "",
"validTill": ""
}),
"deliveryAddress": json!({}),
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": json!({
"plan": "",
"value": 0
}),
"localizedShopperStatement": json!({}),
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": json!({
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": json!({}),
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
}),
"metadata": json!({}),
"orderReference": "",
"paymentMethod": json!({}),
"recurring": json!({
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
}),
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": json!({
"firstName": "",
"lastName": ""
}),
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": (
json!({
"account": "",
"amount": json!({
"currency": "",
"value": 0
}),
"description": "",
"reference": "",
"type": ""
})
),
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": json!({
"acctInfo": json!({
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
}),
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": json!({
"sdkInterface": "",
"sdkUiType": ()
}),
"homePhone": json!({
"cc": "",
"subscriber": ""
}),
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": json!({}),
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": json!({
"crv": "",
"kty": "",
"x": "",
"y": ""
}),
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": json!({
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
}),
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": json!({
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
}),
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": json!({})
}),
"threeDSAuthenticationOnly": false,
"totalsGroup": "",
"trustedShopper": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/paymentMethods/balance \
--header 'content-type: application/json' \
--data '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"localizedShopperStatement": {},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"orderReference": "",
"paymentMethod": {},
"recurring": {
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
},
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"totalsGroup": "",
"trustedShopper": false
}'
echo '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": {
"plan": "",
"value": 0
},
"localizedShopperStatement": {},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"orderReference": "",
"paymentMethod": {},
"recurring": {
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
},
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"totalsGroup": "",
"trustedShopper": false
}' | \
http POST {{baseUrl}}/paymentMethods/balance \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountInfo": {\n "accountAgeIndicator": "",\n "accountChangeDate": "",\n "accountChangeIndicator": "",\n "accountCreationDate": "",\n "accountType": "",\n "addCardAttemptsDay": 0,\n "deliveryAddressUsageDate": "",\n "deliveryAddressUsageIndicator": "",\n "homePhone": "",\n "mobilePhone": "",\n "passwordChangeDate": "",\n "passwordChangeIndicator": "",\n "pastTransactionsDay": 0,\n "pastTransactionsYear": 0,\n "paymentAccountAge": "",\n "paymentAccountIndicator": "",\n "purchasesLast6Months": 0,\n "suspiciousActivity": false,\n "workPhone": ""\n },\n "additionalAmount": {\n "currency": "",\n "value": 0\n },\n "additionalData": {},\n "amount": {},\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "browserInfo": {\n "acceptHeader": "",\n "colorDepth": 0,\n "javaEnabled": false,\n "javaScriptEnabled": false,\n "language": "",\n "screenHeight": 0,\n "screenWidth": 0,\n "timeZoneOffset": 0,\n "userAgent": ""\n },\n "captureDelayHours": 0,\n "dateOfBirth": "",\n "dccQuote": {\n "account": "",\n "accountType": "",\n "baseAmount": {},\n "basePoints": 0,\n "buy": {},\n "interbank": {},\n "reference": "",\n "sell": {},\n "signature": "",\n "source": "",\n "type": "",\n "validTill": ""\n },\n "deliveryAddress": {},\n "deliveryDate": "",\n "deviceFingerprint": "",\n "fraudOffset": 0,\n "installments": {\n "plan": "",\n "value": 0\n },\n "localizedShopperStatement": {},\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "merchantRiskIndicator": {\n "addressMatch": false,\n "deliveryAddressIndicator": "",\n "deliveryEmail": "",\n "deliveryEmailAddress": "",\n "deliveryTimeframe": "",\n "giftCardAmount": {},\n "giftCardCount": 0,\n "giftCardCurr": "",\n "preOrderDate": "",\n "preOrderPurchase": false,\n "preOrderPurchaseInd": "",\n "reorderItems": false,\n "reorderItemsInd": "",\n "shipIndicator": ""\n },\n "metadata": {},\n "orderReference": "",\n "paymentMethod": {},\n "recurring": {\n "contract": "",\n "recurringDetailName": "",\n "recurringExpiry": "",\n "recurringFrequency": "",\n "tokenService": ""\n },\n "recurringProcessingModel": "",\n "reference": "",\n "selectedBrand": "",\n "selectedRecurringDetailReference": "",\n "sessionId": "",\n "shopperEmail": "",\n "shopperIP": "",\n "shopperInteraction": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "socialSecurityNumber": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "telephoneNumber": "",\n "threeDS2RequestData": {\n "acctInfo": {\n "chAccAgeInd": "",\n "chAccChange": "",\n "chAccChangeInd": "",\n "chAccPwChange": "",\n "chAccPwChangeInd": "",\n "chAccString": "",\n "nbPurchaseAccount": "",\n "paymentAccAge": "",\n "paymentAccInd": "",\n "provisionAttemptsDay": "",\n "shipAddressUsage": "",\n "shipAddressUsageInd": "",\n "shipNameIndicator": "",\n "suspiciousAccActivity": "",\n "txnActivityDay": "",\n "txnActivityYear": ""\n },\n "acctType": "",\n "acquirerBIN": "",\n "acquirerMerchantID": "",\n "addrMatch": "",\n "authenticationOnly": false,\n "challengeIndicator": "",\n "deviceChannel": "",\n "deviceRenderOptions": {\n "sdkInterface": "",\n "sdkUiType": []\n },\n "homePhone": {\n "cc": "",\n "subscriber": ""\n },\n "mcc": "",\n "merchantName": "",\n "messageVersion": "",\n "mobilePhone": {},\n "notificationURL": "",\n "payTokenInd": false,\n "paymentAuthenticationUseCase": "",\n "purchaseInstalData": "",\n "recurringExpiry": "",\n "recurringFrequency": "",\n "sdkAppID": "",\n "sdkEncData": "",\n "sdkEphemPubKey": {\n "crv": "",\n "kty": "",\n "x": "",\n "y": ""\n },\n "sdkMaxTimeout": 0,\n "sdkReferenceNumber": "",\n "sdkTransID": "",\n "sdkVersion": "",\n "threeDSCompInd": "",\n "threeDSRequestorAuthenticationInd": "",\n "threeDSRequestorAuthenticationInfo": {\n "threeDSReqAuthData": "",\n "threeDSReqAuthMethod": "",\n "threeDSReqAuthTimestamp": ""\n },\n "threeDSRequestorChallengeInd": "",\n "threeDSRequestorID": "",\n "threeDSRequestorName": "",\n "threeDSRequestorPriorAuthenticationInfo": {\n "threeDSReqPriorAuthData": "",\n "threeDSReqPriorAuthMethod": "",\n "threeDSReqPriorAuthTimestamp": "",\n "threeDSReqPriorRef": ""\n },\n "threeDSRequestorURL": "",\n "transType": "",\n "transactionType": "",\n "whiteListStatus": "",\n "workPhone": {}\n },\n "threeDSAuthenticationOnly": false,\n "totalsGroup": "",\n "trustedShopper": false\n}' \
--output-document \
- {{baseUrl}}/paymentMethods/balance
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountInfo": [
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
],
"additionalAmount": [
"currency": "",
"value": 0
],
"additionalData": [],
"amount": [],
"applicationInfo": [
"adyenLibrary": [
"name": "",
"version": ""
],
"adyenPaymentSource": [],
"externalPlatform": [
"integrator": "",
"name": "",
"version": ""
],
"merchantApplication": [],
"merchantDevice": [
"os": "",
"osVersion": "",
"reference": ""
],
"shopperInteractionDevice": [
"locale": "",
"os": "",
"osVersion": ""
]
],
"billingAddress": [
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
],
"browserInfo": [
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
],
"captureDelayHours": 0,
"dateOfBirth": "",
"dccQuote": [
"account": "",
"accountType": "",
"baseAmount": [],
"basePoints": 0,
"buy": [],
"interbank": [],
"reference": "",
"sell": [],
"signature": "",
"source": "",
"type": "",
"validTill": ""
],
"deliveryAddress": [],
"deliveryDate": "",
"deviceFingerprint": "",
"fraudOffset": 0,
"installments": [
"plan": "",
"value": 0
],
"localizedShopperStatement": [],
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": [
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": [],
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
],
"metadata": [],
"orderReference": "",
"paymentMethod": [],
"recurring": [
"contract": "",
"recurringDetailName": "",
"recurringExpiry": "",
"recurringFrequency": "",
"tokenService": ""
],
"recurringProcessingModel": "",
"reference": "",
"selectedBrand": "",
"selectedRecurringDetailReference": "",
"sessionId": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": [
"firstName": "",
"lastName": ""
],
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
[
"account": "",
"amount": [
"currency": "",
"value": 0
],
"description": "",
"reference": "",
"type": ""
]
],
"store": "",
"telephoneNumber": "",
"threeDS2RequestData": [
"acctInfo": [
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
],
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": [
"sdkInterface": "",
"sdkUiType": []
],
"homePhone": [
"cc": "",
"subscriber": ""
],
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": [],
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": [
"crv": "",
"kty": "",
"x": "",
"y": ""
],
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": [
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
],
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": [
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
],
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": []
],
"threeDSAuthenticationOnly": false,
"totalsGroup": "",
"trustedShopper": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentMethods/balance")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"additionalData": {
"nonScheme.transactionLimit": "5000",
"nonScheme.transactionLimitCcy": "EUR"
},
"balance": {
"currency": "EUR",
"value": 888
},
"pspReference": "851617891188737F",
"resultCode": "Success"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Create a payment link
{{baseUrl}}/paymentLinks
BODY json
{
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": {},
"description": "",
"expiresAt": "",
"installmentOptions": {},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"manualCapture": false,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": [],
"returnUrl": "",
"reusable": false,
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"shopperEmail": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": false,
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentLinks");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/paymentLinks" {:content-type :json
:form-params {:allowedPaymentMethods []
:amount {:currency ""
:value 0}
:applicationInfo {:adyenLibrary {:name ""
:version ""}
:adyenPaymentSource {}
:externalPlatform {:integrator ""
:name ""
:version ""}
:merchantApplication {}
:merchantDevice {:os ""
:osVersion ""
:reference ""}
:shopperInteractionDevice {:locale ""
:os ""
:osVersion ""}}
:billingAddress {:city ""
:country ""
:houseNumberOrName ""
:postalCode ""
:stateOrProvince ""
:street ""}
:blockedPaymentMethods []
:captureDelayHours 0
:countryCode ""
:dateOfBirth ""
:deliverAt ""
:deliveryAddress {}
:description ""
:expiresAt ""
:installmentOptions {}
:lineItems [{:amountExcludingTax 0
:amountIncludingTax 0
:brand ""
:color ""
:description ""
:id ""
:imageUrl ""
:itemCategory ""
:manufacturer ""
:productUrl ""
:quantity 0
:receiverEmail ""
:size ""
:sku ""
:taxAmount 0
:taxPercentage 0
:upc ""}]
:manualCapture false
:mcc ""
:merchantAccount ""
:merchantOrderReference ""
:metadata {}
:recurringProcessingModel ""
:reference ""
:requiredShopperFields []
:returnUrl ""
:reusable false
:riskData {:clientData ""
:customFields {}
:fraudOffset 0
:profileReference ""}
:shopperEmail ""
:shopperLocale ""
:shopperName {:firstName ""
:lastName ""}
:shopperReference ""
:shopperStatement ""
:showRemovePaymentMethodButton false
:socialSecurityNumber ""
:splitCardFundingSources false
:splits [{:account ""
:amount {:currency ""
:value 0}
:description ""
:reference ""
:type ""}]
:store ""
:storePaymentMethodMode ""
:telephoneNumber ""
:themeId ""}})
require "http/client"
url = "{{baseUrl}}/paymentLinks"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/paymentLinks"),
Content = new StringContent("{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentLinks");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentLinks"
payload := strings.NewReader("{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/paymentLinks HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 2215
{
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": {},
"description": "",
"expiresAt": "",
"installmentOptions": {},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"manualCapture": false,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": [],
"returnUrl": "",
"reusable": false,
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"shopperEmail": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": false,
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/paymentLinks")
.setHeader("content-type", "application/json")
.setBody("{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentLinks"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/paymentLinks")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/paymentLinks")
.header("content-type", "application/json")
.body("{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}")
.asString();
const data = JSON.stringify({
allowedPaymentMethods: [],
amount: {
currency: '',
value: 0
},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
countryCode: '',
dateOfBirth: '',
deliverAt: '',
deliveryAddress: {},
description: '',
expiresAt: '',
installmentOptions: {},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
manualCapture: false,
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
recurringProcessingModel: '',
reference: '',
requiredShopperFields: [],
returnUrl: '',
reusable: false,
riskData: {
clientData: '',
customFields: {},
fraudOffset: 0,
profileReference: ''
},
shopperEmail: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
showRemovePaymentMethodButton: false,
socialSecurityNumber: '',
splitCardFundingSources: false,
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethodMode: '',
telephoneNumber: '',
themeId: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/paymentLinks');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentLinks',
headers: {'content-type': 'application/json'},
data: {
allowedPaymentMethods: [],
amount: {currency: '', value: 0},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
countryCode: '',
dateOfBirth: '',
deliverAt: '',
deliveryAddress: {},
description: '',
expiresAt: '',
installmentOptions: {},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
manualCapture: false,
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
recurringProcessingModel: '',
reference: '',
requiredShopperFields: [],
returnUrl: '',
reusable: false,
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
shopperEmail: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
showRemovePaymentMethodButton: false,
socialSecurityNumber: '',
splitCardFundingSources: false,
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethodMode: '',
telephoneNumber: '',
themeId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowedPaymentMethods":[],"amount":{"currency":"","value":0},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"blockedPaymentMethods":[],"captureDelayHours":0,"countryCode":"","dateOfBirth":"","deliverAt":"","deliveryAddress":{},"description":"","expiresAt":"","installmentOptions":{},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"manualCapture":false,"mcc":"","merchantAccount":"","merchantOrderReference":"","metadata":{},"recurringProcessingModel":"","reference":"","requiredShopperFields":[],"returnUrl":"","reusable":false,"riskData":{"clientData":"","customFields":{},"fraudOffset":0,"profileReference":""},"shopperEmail":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","showRemovePaymentMethodButton":false,"socialSecurityNumber":"","splitCardFundingSources":false,"splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","storePaymentMethodMode":"","telephoneNumber":"","themeId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/paymentLinks',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "allowedPaymentMethods": [],\n "amount": {\n "currency": "",\n "value": 0\n },\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "blockedPaymentMethods": [],\n "captureDelayHours": 0,\n "countryCode": "",\n "dateOfBirth": "",\n "deliverAt": "",\n "deliveryAddress": {},\n "description": "",\n "expiresAt": "",\n "installmentOptions": {},\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "manualCapture": false,\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "metadata": {},\n "recurringProcessingModel": "",\n "reference": "",\n "requiredShopperFields": [],\n "returnUrl": "",\n "reusable": false,\n "riskData": {\n "clientData": "",\n "customFields": {},\n "fraudOffset": 0,\n "profileReference": ""\n },\n "shopperEmail": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "showRemovePaymentMethodButton": false,\n "socialSecurityNumber": "",\n "splitCardFundingSources": false,\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "storePaymentMethodMode": "",\n "telephoneNumber": "",\n "themeId": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/paymentLinks")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentLinks',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
allowedPaymentMethods: [],
amount: {currency: '', value: 0},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
countryCode: '',
dateOfBirth: '',
deliverAt: '',
deliveryAddress: {},
description: '',
expiresAt: '',
installmentOptions: {},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
manualCapture: false,
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
recurringProcessingModel: '',
reference: '',
requiredShopperFields: [],
returnUrl: '',
reusable: false,
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
shopperEmail: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
showRemovePaymentMethodButton: false,
socialSecurityNumber: '',
splitCardFundingSources: false,
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethodMode: '',
telephoneNumber: '',
themeId: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentLinks',
headers: {'content-type': 'application/json'},
body: {
allowedPaymentMethods: [],
amount: {currency: '', value: 0},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
countryCode: '',
dateOfBirth: '',
deliverAt: '',
deliveryAddress: {},
description: '',
expiresAt: '',
installmentOptions: {},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
manualCapture: false,
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
recurringProcessingModel: '',
reference: '',
requiredShopperFields: [],
returnUrl: '',
reusable: false,
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
shopperEmail: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
showRemovePaymentMethodButton: false,
socialSecurityNumber: '',
splitCardFundingSources: false,
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethodMode: '',
telephoneNumber: '',
themeId: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/paymentLinks');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
allowedPaymentMethods: [],
amount: {
currency: '',
value: 0
},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
countryCode: '',
dateOfBirth: '',
deliverAt: '',
deliveryAddress: {},
description: '',
expiresAt: '',
installmentOptions: {},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
manualCapture: false,
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
recurringProcessingModel: '',
reference: '',
requiredShopperFields: [],
returnUrl: '',
reusable: false,
riskData: {
clientData: '',
customFields: {},
fraudOffset: 0,
profileReference: ''
},
shopperEmail: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
showRemovePaymentMethodButton: false,
socialSecurityNumber: '',
splitCardFundingSources: false,
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethodMode: '',
telephoneNumber: '',
themeId: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentLinks',
headers: {'content-type': 'application/json'},
data: {
allowedPaymentMethods: [],
amount: {currency: '', value: 0},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
blockedPaymentMethods: [],
captureDelayHours: 0,
countryCode: '',
dateOfBirth: '',
deliverAt: '',
deliveryAddress: {},
description: '',
expiresAt: '',
installmentOptions: {},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
manualCapture: false,
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
metadata: {},
recurringProcessingModel: '',
reference: '',
requiredShopperFields: [],
returnUrl: '',
reusable: false,
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
shopperEmail: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
showRemovePaymentMethodButton: false,
socialSecurityNumber: '',
splitCardFundingSources: false,
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethodMode: '',
telephoneNumber: '',
themeId: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentLinks';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"allowedPaymentMethods":[],"amount":{"currency":"","value":0},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"blockedPaymentMethods":[],"captureDelayHours":0,"countryCode":"","dateOfBirth":"","deliverAt":"","deliveryAddress":{},"description":"","expiresAt":"","installmentOptions":{},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"manualCapture":false,"mcc":"","merchantAccount":"","merchantOrderReference":"","metadata":{},"recurringProcessingModel":"","reference":"","requiredShopperFields":[],"returnUrl":"","reusable":false,"riskData":{"clientData":"","customFields":{},"fraudOffset":0,"profileReference":""},"shopperEmail":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","showRemovePaymentMethodButton":false,"socialSecurityNumber":"","splitCardFundingSources":false,"splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","storePaymentMethodMode":"","telephoneNumber":"","themeId":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"allowedPaymentMethods": @[ ],
@"amount": @{ @"currency": @"", @"value": @0 },
@"applicationInfo": @{ @"adyenLibrary": @{ @"name": @"", @"version": @"" }, @"adyenPaymentSource": @{ }, @"externalPlatform": @{ @"integrator": @"", @"name": @"", @"version": @"" }, @"merchantApplication": @{ }, @"merchantDevice": @{ @"os": @"", @"osVersion": @"", @"reference": @"" }, @"shopperInteractionDevice": @{ @"locale": @"", @"os": @"", @"osVersion": @"" } },
@"billingAddress": @{ @"city": @"", @"country": @"", @"houseNumberOrName": @"", @"postalCode": @"", @"stateOrProvince": @"", @"street": @"" },
@"blockedPaymentMethods": @[ ],
@"captureDelayHours": @0,
@"countryCode": @"",
@"dateOfBirth": @"",
@"deliverAt": @"",
@"deliveryAddress": @{ },
@"description": @"",
@"expiresAt": @"",
@"installmentOptions": @{ },
@"lineItems": @[ @{ @"amountExcludingTax": @0, @"amountIncludingTax": @0, @"brand": @"", @"color": @"", @"description": @"", @"id": @"", @"imageUrl": @"", @"itemCategory": @"", @"manufacturer": @"", @"productUrl": @"", @"quantity": @0, @"receiverEmail": @"", @"size": @"", @"sku": @"", @"taxAmount": @0, @"taxPercentage": @0, @"upc": @"" } ],
@"manualCapture": @NO,
@"mcc": @"",
@"merchantAccount": @"",
@"merchantOrderReference": @"",
@"metadata": @{ },
@"recurringProcessingModel": @"",
@"reference": @"",
@"requiredShopperFields": @[ ],
@"returnUrl": @"",
@"reusable": @NO,
@"riskData": @{ @"clientData": @"", @"customFields": @{ }, @"fraudOffset": @0, @"profileReference": @"" },
@"shopperEmail": @"",
@"shopperLocale": @"",
@"shopperName": @{ @"firstName": @"", @"lastName": @"" },
@"shopperReference": @"",
@"shopperStatement": @"",
@"showRemovePaymentMethodButton": @NO,
@"socialSecurityNumber": @"",
@"splitCardFundingSources": @NO,
@"splits": @[ @{ @"account": @"", @"amount": @{ @"currency": @"", @"value": @0 }, @"description": @"", @"reference": @"", @"type": @"" } ],
@"store": @"",
@"storePaymentMethodMode": @"",
@"telephoneNumber": @"",
@"themeId": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/paymentLinks"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/paymentLinks" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentLinks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'allowedPaymentMethods' => [
],
'amount' => [
'currency' => '',
'value' => 0
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'blockedPaymentMethods' => [
],
'captureDelayHours' => 0,
'countryCode' => '',
'dateOfBirth' => '',
'deliverAt' => '',
'deliveryAddress' => [
],
'description' => '',
'expiresAt' => '',
'installmentOptions' => [
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'manualCapture' => null,
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'metadata' => [
],
'recurringProcessingModel' => '',
'reference' => '',
'requiredShopperFields' => [
],
'returnUrl' => '',
'reusable' => null,
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'shopperEmail' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'showRemovePaymentMethodButton' => null,
'socialSecurityNumber' => '',
'splitCardFundingSources' => null,
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethodMode' => '',
'telephoneNumber' => '',
'themeId' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/paymentLinks', [
'body' => '{
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": {},
"description": "",
"expiresAt": "",
"installmentOptions": {},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"manualCapture": false,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": [],
"returnUrl": "",
"reusable": false,
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"shopperEmail": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": false,
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/paymentLinks');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'allowedPaymentMethods' => [
],
'amount' => [
'currency' => '',
'value' => 0
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'blockedPaymentMethods' => [
],
'captureDelayHours' => 0,
'countryCode' => '',
'dateOfBirth' => '',
'deliverAt' => '',
'deliveryAddress' => [
],
'description' => '',
'expiresAt' => '',
'installmentOptions' => [
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'manualCapture' => null,
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'metadata' => [
],
'recurringProcessingModel' => '',
'reference' => '',
'requiredShopperFields' => [
],
'returnUrl' => '',
'reusable' => null,
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'shopperEmail' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'showRemovePaymentMethodButton' => null,
'socialSecurityNumber' => '',
'splitCardFundingSources' => null,
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethodMode' => '',
'telephoneNumber' => '',
'themeId' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'allowedPaymentMethods' => [
],
'amount' => [
'currency' => '',
'value' => 0
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'blockedPaymentMethods' => [
],
'captureDelayHours' => 0,
'countryCode' => '',
'dateOfBirth' => '',
'deliverAt' => '',
'deliveryAddress' => [
],
'description' => '',
'expiresAt' => '',
'installmentOptions' => [
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'manualCapture' => null,
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'metadata' => [
],
'recurringProcessingModel' => '',
'reference' => '',
'requiredShopperFields' => [
],
'returnUrl' => '',
'reusable' => null,
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'shopperEmail' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'showRemovePaymentMethodButton' => null,
'socialSecurityNumber' => '',
'splitCardFundingSources' => null,
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethodMode' => '',
'telephoneNumber' => '',
'themeId' => ''
]));
$request->setRequestUrl('{{baseUrl}}/paymentLinks');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": {},
"description": "",
"expiresAt": "",
"installmentOptions": {},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"manualCapture": false,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": [],
"returnUrl": "",
"reusable": false,
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"shopperEmail": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": false,
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentLinks' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": {},
"description": "",
"expiresAt": "",
"installmentOptions": {},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"manualCapture": false,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": [],
"returnUrl": "",
"reusable": false,
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"shopperEmail": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": false,
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/paymentLinks", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentLinks"
payload = {
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": {},
"description": "",
"expiresAt": "",
"installmentOptions": {},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"manualCapture": False,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": [],
"returnUrl": "",
"reusable": False,
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"shopperEmail": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": False,
"socialSecurityNumber": "",
"splitCardFundingSources": False,
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentLinks"
payload <- "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentLinks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/paymentLinks') do |req|
req.body = "{\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"blockedPaymentMethods\": [],\n \"captureDelayHours\": 0,\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"deliverAt\": \"\",\n \"deliveryAddress\": {},\n \"description\": \"\",\n \"expiresAt\": \"\",\n \"installmentOptions\": {},\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"manualCapture\": false,\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"metadata\": {},\n \"recurringProcessingModel\": \"\",\n \"reference\": \"\",\n \"requiredShopperFields\": [],\n \"returnUrl\": \"\",\n \"reusable\": false,\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"shopperEmail\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"showRemovePaymentMethodButton\": false,\n \"socialSecurityNumber\": \"\",\n \"splitCardFundingSources\": false,\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethodMode\": \"\",\n \"telephoneNumber\": \"\",\n \"themeId\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentLinks";
let payload = json!({
"allowedPaymentMethods": (),
"amount": json!({
"currency": "",
"value": 0
}),
"applicationInfo": json!({
"adyenLibrary": json!({
"name": "",
"version": ""
}),
"adyenPaymentSource": json!({}),
"externalPlatform": json!({
"integrator": "",
"name": "",
"version": ""
}),
"merchantApplication": json!({}),
"merchantDevice": json!({
"os": "",
"osVersion": "",
"reference": ""
}),
"shopperInteractionDevice": json!({
"locale": "",
"os": "",
"osVersion": ""
})
}),
"billingAddress": json!({
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
}),
"blockedPaymentMethods": (),
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": json!({}),
"description": "",
"expiresAt": "",
"installmentOptions": json!({}),
"lineItems": (
json!({
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
})
),
"manualCapture": false,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": json!({}),
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": (),
"returnUrl": "",
"reusable": false,
"riskData": json!({
"clientData": "",
"customFields": json!({}),
"fraudOffset": 0,
"profileReference": ""
}),
"shopperEmail": "",
"shopperLocale": "",
"shopperName": json!({
"firstName": "",
"lastName": ""
}),
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": false,
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": (
json!({
"account": "",
"amount": json!({
"currency": "",
"value": 0
}),
"description": "",
"reference": "",
"type": ""
})
),
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/paymentLinks \
--header 'content-type: application/json' \
--data '{
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": {},
"description": "",
"expiresAt": "",
"installmentOptions": {},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"manualCapture": false,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": [],
"returnUrl": "",
"reusable": false,
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"shopperEmail": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": false,
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
}'
echo '{
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": {},
"description": "",
"expiresAt": "",
"installmentOptions": {},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"manualCapture": false,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": [],
"returnUrl": "",
"reusable": false,
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"shopperEmail": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": false,
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
}' | \
http POST {{baseUrl}}/paymentLinks \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "allowedPaymentMethods": [],\n "amount": {\n "currency": "",\n "value": 0\n },\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "blockedPaymentMethods": [],\n "captureDelayHours": 0,\n "countryCode": "",\n "dateOfBirth": "",\n "deliverAt": "",\n "deliveryAddress": {},\n "description": "",\n "expiresAt": "",\n "installmentOptions": {},\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "manualCapture": false,\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "metadata": {},\n "recurringProcessingModel": "",\n "reference": "",\n "requiredShopperFields": [],\n "returnUrl": "",\n "reusable": false,\n "riskData": {\n "clientData": "",\n "customFields": {},\n "fraudOffset": 0,\n "profileReference": ""\n },\n "shopperEmail": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "showRemovePaymentMethodButton": false,\n "socialSecurityNumber": "",\n "splitCardFundingSources": false,\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "storePaymentMethodMode": "",\n "telephoneNumber": "",\n "themeId": ""\n}' \
--output-document \
- {{baseUrl}}/paymentLinks
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"allowedPaymentMethods": [],
"amount": [
"currency": "",
"value": 0
],
"applicationInfo": [
"adyenLibrary": [
"name": "",
"version": ""
],
"adyenPaymentSource": [],
"externalPlatform": [
"integrator": "",
"name": "",
"version": ""
],
"merchantApplication": [],
"merchantDevice": [
"os": "",
"osVersion": "",
"reference": ""
],
"shopperInteractionDevice": [
"locale": "",
"os": "",
"osVersion": ""
]
],
"billingAddress": [
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
],
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": [],
"description": "",
"expiresAt": "",
"installmentOptions": [],
"lineItems": [
[
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
]
],
"manualCapture": false,
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": [],
"recurringProcessingModel": "",
"reference": "",
"requiredShopperFields": [],
"returnUrl": "",
"reusable": false,
"riskData": [
"clientData": "",
"customFields": [],
"fraudOffset": 0,
"profileReference": ""
],
"shopperEmail": "",
"shopperLocale": "",
"shopperName": [
"firstName": "",
"lastName": ""
],
"shopperReference": "",
"shopperStatement": "",
"showRemovePaymentMethodButton": false,
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": [
[
"account": "",
"amount": [
"currency": "",
"value": 0
],
"description": "",
"reference": "",
"type": ""
]
],
"store": "",
"storePaymentMethodMode": "",
"telephoneNumber": "",
"themeId": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentLinks")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"amount": {
"currency": "BRL",
"value": 1250
},
"billingAddress": {
"city": "São Paulo",
"country": "BR",
"houseNumberOrName": "999",
"postalCode": "59000060",
"stateOrProvince": "SP",
"street": "Roque Petroni Jr"
},
"countryCode": "BR",
"deliveryAddress": {
"city": "São Paulo",
"country": "BR",
"houseNumberOrName": "999",
"postalCode": "59000060",
"stateOrProvince": "SP",
"street": "Roque Petroni Jr"
},
"expiresAt": "2022-10-28T09:16:22Z",
"id": "PLE83C39B0A0DE0C1E",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_ORDER_NUMBER",
"reusable": false,
"shopperEmail": "test@email.com",
"shopperLocale": "pt-BR",
"shopperReference": "YOUR_UNIQUE_SHOPPER_ID",
"status": "active",
"url": "https://test.adyen.link/PLE83C39B0A0DE0C1E"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
GET
Get a payment link
{{baseUrl}}/paymentLinks/:linkId
QUERY PARAMS
linkId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentLinks/:linkId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/paymentLinks/:linkId")
require "http/client"
url = "{{baseUrl}}/paymentLinks/:linkId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/paymentLinks/:linkId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentLinks/:linkId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentLinks/:linkId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/paymentLinks/:linkId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/paymentLinks/:linkId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentLinks/:linkId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/paymentLinks/:linkId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/paymentLinks/:linkId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/paymentLinks/:linkId');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/paymentLinks/:linkId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentLinks/:linkId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/paymentLinks/:linkId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/paymentLinks/:linkId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentLinks/:linkId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/paymentLinks/:linkId'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/paymentLinks/:linkId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/paymentLinks/:linkId'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentLinks/:linkId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/paymentLinks/:linkId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/paymentLinks/:linkId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentLinks/:linkId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/paymentLinks/:linkId');
echo $response->getBody();
setUrl('{{baseUrl}}/paymentLinks/:linkId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/paymentLinks/:linkId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentLinks/:linkId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentLinks/:linkId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/paymentLinks/:linkId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentLinks/:linkId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentLinks/:linkId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentLinks/:linkId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/paymentLinks/:linkId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentLinks/:linkId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/paymentLinks/:linkId
http GET {{baseUrl}}/paymentLinks/:linkId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/paymentLinks/:linkId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentLinks/:linkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"amount": {
"currency": "EUR",
"value": 8700
},
"countryCode": "NL",
"expiresAt": "2021-04-08T14:06:39Z",
"id": "PL61C53A8B97E6915A",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "shopper-reference-ekvL83",
"shopperLocale": "hu-HU",
"shopperReference": "shopper-reference-LZfdWZ",
"status": "active",
"url": "https://test.adyen.link/PL61C53A8B97E6915A"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
PATCH
Update the status of a payment link
{{baseUrl}}/paymentLinks/:linkId
QUERY PARAMS
linkId
BODY json
{
"status": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentLinks/:linkId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"status\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/paymentLinks/:linkId" {:content-type :json
:form-params {:status ""}})
require "http/client"
url = "{{baseUrl}}/paymentLinks/:linkId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"status\": \"\"\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/paymentLinks/:linkId"),
Content = new StringContent("{\n \"status\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentLinks/:linkId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"status\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentLinks/:linkId"
payload := strings.NewReader("{\n \"status\": \"\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/paymentLinks/:linkId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 18
{
"status": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/paymentLinks/:linkId")
.setHeader("content-type", "application/json")
.setBody("{\n \"status\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentLinks/:linkId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"status\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"status\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/paymentLinks/:linkId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/paymentLinks/:linkId")
.header("content-type", "application/json")
.body("{\n \"status\": \"\"\n}")
.asString();
const data = JSON.stringify({
status: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/paymentLinks/:linkId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/paymentLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {status: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentLinks/:linkId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/paymentLinks/:linkId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "status": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"status\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/paymentLinks/:linkId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentLinks/:linkId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({status: ''}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/paymentLinks/:linkId',
headers: {'content-type': 'application/json'},
body: {status: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/paymentLinks/:linkId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
status: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/paymentLinks/:linkId',
headers: {'content-type': 'application/json'},
data: {status: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentLinks/:linkId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"status":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"status": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/paymentLinks/:linkId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/paymentLinks/:linkId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"status\": \"\"\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentLinks/:linkId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/paymentLinks/:linkId', [
'body' => '{
"status": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/paymentLinks/:linkId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'status' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'status' => ''
]));
$request->setRequestUrl('{{baseUrl}}/paymentLinks/:linkId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentLinks/:linkId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"status": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentLinks/:linkId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"status": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"status\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/paymentLinks/:linkId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentLinks/:linkId"
payload = { "status": "" }
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentLinks/:linkId"
payload <- "{\n \"status\": \"\"\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentLinks/:linkId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"status\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/paymentLinks/:linkId') do |req|
req.body = "{\n \"status\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentLinks/:linkId";
let payload = json!({"status": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/paymentLinks/:linkId \
--header 'content-type: application/json' \
--data '{
"status": ""
}'
echo '{
"status": ""
}' | \
http PATCH {{baseUrl}}/paymentLinks/:linkId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "status": ""\n}' \
--output-document \
- {{baseUrl}}/paymentLinks/:linkId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["status": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentLinks/:linkId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"amount": {
"currency": "EUR",
"value": 8700
},
"countryCode": "NL",
"expiresAt": "2021-04-08T14:06:39Z",
"id": "PL61C53A8B97E6915A",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "shopper-reference-ekvL83",
"shopperLocale": "hu-HU",
"shopperReference": "shopper-reference-LZfdWZ",
"status": "expired",
"url": "https://test.adyen.link/PL61C53A8B97E6915A"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Create a payment session
{{baseUrl}}/sessions
BODY json
{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"blockedPaymentMethods": [],
"captureDelayHours": 0,
"channel": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"countryCode": "",
"dateOfBirth": "",
"deliverAt": "",
"deliveryAddress": {},
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"expiresAt": "",
"fundOrigin": {
"billingAddress": {},
"shopperName": {
"firstName": "",
"lastName": ""
}
},
"fundRecipient": {
"billingAddress": {},
"paymentMethod": {
"brand": "",
"checkoutAttemptId": "",
"cupsecureplus.smscode": "",
"cvc": "",
"encryptedCardNumber": "",
"encryptedExpiryMonth": "",
"encryptedExpiryYear": "",
"encryptedSecurityCode": "",
"expiryMonth": "",
"expiryYear": "",
"fundingSource": "",
"holderName": "",
"networkPaymentReference": "",
"number": "",
"recurringDetailReference": "",
"shopperNotificationReference": "",
"storedPaymentMethodId": "",
"threeDS2SdkVersion": "",
"type": ""
},
"shopperEmail": "",
"shopperName": {},
"shopperReference": "",
"storedPaymentMethodId": "",
"subMerchant": {
"city": "",
"country": "",
"mcc": "",
"name": "",
"taxId": ""
},
"telephoneNumber": "",
"walletIdentifier": "",
"walletOwnerTaxId": ""
},
"installmentOptions": {},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splitCardFundingSources": false,
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"storePaymentMethodMode": "",
"telephoneNumber": "",
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/sessions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/sessions" {:content-type :json
:form-params {:amount {:currency "EUR"
:value 100}
:countryCode "NL"
:merchantAccount "YOUR_MERCHANT_ACCOUNT"
:reference "YOUR_PAYMENT_REFERENCE"
:returnUrl "https://your-company.com/checkout?shopperOrder=12xy.."}})
require "http/client"
url = "{{baseUrl}}/sessions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/sessions"),
Content = new StringContent("{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/sessions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/sessions"
payload := strings.NewReader("{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/sessions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 243
{
"amount": {
"currency": "EUR",
"value": 100
},
"countryCode": "NL",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_PAYMENT_REFERENCE",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/sessions")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/sessions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/sessions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/sessions")
.header("content-type", "application/json")
.body("{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}")
.asString();
const data = JSON.stringify({
amount: {
currency: 'EUR',
value: 100
},
countryCode: 'NL',
merchantAccount: 'YOUR_MERCHANT_ACCOUNT',
reference: 'YOUR_PAYMENT_REFERENCE',
returnUrl: 'https://your-company.com/checkout?shopperOrder=12xy..'
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/sessions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/sessions',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: 'EUR', value: 100},
countryCode: 'NL',
merchantAccount: 'YOUR_MERCHANT_ACCOUNT',
reference: 'YOUR_PAYMENT_REFERENCE',
returnUrl: 'https://your-company.com/checkout?shopperOrder=12xy..'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/sessions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"EUR","value":100},"countryCode":"NL","merchantAccount":"YOUR_MERCHANT_ACCOUNT","reference":"YOUR_PAYMENT_REFERENCE","returnUrl":"https://your-company.com/checkout?shopperOrder=12xy.."}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/sessions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": {\n "currency": "EUR",\n "value": 100\n },\n "countryCode": "NL",\n "merchantAccount": "YOUR_MERCHANT_ACCOUNT",\n "reference": "YOUR_PAYMENT_REFERENCE",\n "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/sessions")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/sessions',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: {currency: 'EUR', value: 100},
countryCode: 'NL',
merchantAccount: 'YOUR_MERCHANT_ACCOUNT',
reference: 'YOUR_PAYMENT_REFERENCE',
returnUrl: 'https://your-company.com/checkout?shopperOrder=12xy..'
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/sessions',
headers: {'content-type': 'application/json'},
body: {
amount: {currency: 'EUR', value: 100},
countryCode: 'NL',
merchantAccount: 'YOUR_MERCHANT_ACCOUNT',
reference: 'YOUR_PAYMENT_REFERENCE',
returnUrl: 'https://your-company.com/checkout?shopperOrder=12xy..'
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/sessions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: {
currency: 'EUR',
value: 100
},
countryCode: 'NL',
merchantAccount: 'YOUR_MERCHANT_ACCOUNT',
reference: 'YOUR_PAYMENT_REFERENCE',
returnUrl: 'https://your-company.com/checkout?shopperOrder=12xy..'
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/sessions',
headers: {'content-type': 'application/json'},
data: {
amount: {currency: 'EUR', value: 100},
countryCode: 'NL',
merchantAccount: 'YOUR_MERCHANT_ACCOUNT',
reference: 'YOUR_PAYMENT_REFERENCE',
returnUrl: 'https://your-company.com/checkout?shopperOrder=12xy..'
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/sessions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"amount":{"currency":"EUR","value":100},"countryCode":"NL","merchantAccount":"YOUR_MERCHANT_ACCOUNT","reference":"YOUR_PAYMENT_REFERENCE","returnUrl":"https://your-company.com/checkout?shopperOrder=12xy.."}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @{ @"currency": @"EUR", @"value": @100 },
@"countryCode": @"NL",
@"merchantAccount": @"YOUR_MERCHANT_ACCOUNT",
@"reference": @"YOUR_PAYMENT_REFERENCE",
@"returnUrl": @"https://your-company.com/checkout?shopperOrder=12xy.." };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/sessions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/sessions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => [
'currency' => 'EUR',
'value' => 100
],
'countryCode' => 'NL',
'merchantAccount' => 'YOUR_MERCHANT_ACCOUNT',
'reference' => 'YOUR_PAYMENT_REFERENCE',
'returnUrl' => 'https://your-company.com/checkout?shopperOrder=12xy..'
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/sessions', [
'body' => '{
"amount": {
"currency": "EUR",
"value": 100
},
"countryCode": "NL",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_PAYMENT_REFERENCE",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/sessions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => [
'currency' => 'EUR',
'value' => 100
],
'countryCode' => 'NL',
'merchantAccount' => 'YOUR_MERCHANT_ACCOUNT',
'reference' => 'YOUR_PAYMENT_REFERENCE',
'returnUrl' => 'https://your-company.com/checkout?shopperOrder=12xy..'
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => [
'currency' => 'EUR',
'value' => 100
],
'countryCode' => 'NL',
'merchantAccount' => 'YOUR_MERCHANT_ACCOUNT',
'reference' => 'YOUR_PAYMENT_REFERENCE',
'returnUrl' => 'https://your-company.com/checkout?shopperOrder=12xy..'
]));
$request->setRequestUrl('{{baseUrl}}/sessions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "EUR",
"value": 100
},
"countryCode": "NL",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_PAYMENT_REFERENCE",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"amount": {
"currency": "EUR",
"value": 100
},
"countryCode": "NL",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_PAYMENT_REFERENCE",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/sessions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/sessions"
payload = {
"amount": {
"currency": "EUR",
"value": 100
},
"countryCode": "NL",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_PAYMENT_REFERENCE",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/sessions"
payload <- "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/sessions') do |req|
req.body = "{\n \"amount\": {\n \"currency\": \"EUR\",\n \"value\": 100\n },\n \"countryCode\": \"NL\",\n \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\",\n \"reference\": \"YOUR_PAYMENT_REFERENCE\",\n \"returnUrl\": \"https://your-company.com/checkout?shopperOrder=12xy..\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/sessions";
let payload = json!({
"amount": json!({
"currency": "EUR",
"value": 100
}),
"countryCode": "NL",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_PAYMENT_REFERENCE",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/sessions \
--header 'content-type: application/json' \
--data '{
"amount": {
"currency": "EUR",
"value": 100
},
"countryCode": "NL",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_PAYMENT_REFERENCE",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
}'
echo '{
"amount": {
"currency": "EUR",
"value": 100
},
"countryCode": "NL",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_PAYMENT_REFERENCE",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
}' | \
http POST {{baseUrl}}/sessions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "amount": {\n "currency": "EUR",\n "value": 100\n },\n "countryCode": "NL",\n "merchantAccount": "YOUR_MERCHANT_ACCOUNT",\n "reference": "YOUR_PAYMENT_REFERENCE",\n "returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."\n}' \
--output-document \
- {{baseUrl}}/sessions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": [
"currency": "EUR",
"value": 100
],
"countryCode": "NL",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"reference": "YOUR_PAYMENT_REFERENCE",
"returnUrl": "https://your-company.com/checkout?shopperOrder=12xy.."
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/sessions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Get a list of available payment methods
{{baseUrl}}/paymentMethods
BODY json
{
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"blockedPaymentMethods": [],
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
},
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": false,
"store": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/paymentMethods");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/paymentMethods" {:content-type :json
:form-params {:additionalData {}
:allowedPaymentMethods []
:amount {:currency ""
:value 0}
:blockedPaymentMethods []
:channel ""
:countryCode ""
:merchantAccount ""
:order {:orderData ""
:pspReference ""}
:shopperLocale ""
:shopperReference ""
:splitCardFundingSources false
:store ""}})
require "http/client"
url = "{{baseUrl}}/paymentMethods"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/paymentMethods"),
Content = new StringContent("{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/paymentMethods");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/paymentMethods"
payload := strings.NewReader("{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/paymentMethods HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 367
{
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"blockedPaymentMethods": [],
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
},
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": false,
"store": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/paymentMethods")
.setHeader("content-type", "application/json")
.setBody("{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/paymentMethods"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/paymentMethods")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/paymentMethods")
.header("content-type", "application/json")
.body("{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}")
.asString();
const data = JSON.stringify({
additionalData: {},
allowedPaymentMethods: [],
amount: {
currency: '',
value: 0
},
blockedPaymentMethods: [],
channel: '',
countryCode: '',
merchantAccount: '',
order: {
orderData: '',
pspReference: ''
},
shopperLocale: '',
shopperReference: '',
splitCardFundingSources: false,
store: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/paymentMethods');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentMethods',
headers: {'content-type': 'application/json'},
data: {
additionalData: {},
allowedPaymentMethods: [],
amount: {currency: '', value: 0},
blockedPaymentMethods: [],
channel: '',
countryCode: '',
merchantAccount: '',
order: {orderData: '', pspReference: ''},
shopperLocale: '',
shopperReference: '',
splitCardFundingSources: false,
store: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/paymentMethods';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"additionalData":{},"allowedPaymentMethods":[],"amount":{"currency":"","value":0},"blockedPaymentMethods":[],"channel":"","countryCode":"","merchantAccount":"","order":{"orderData":"","pspReference":""},"shopperLocale":"","shopperReference":"","splitCardFundingSources":false,"store":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/paymentMethods',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "additionalData": {},\n "allowedPaymentMethods": [],\n "amount": {\n "currency": "",\n "value": 0\n },\n "blockedPaymentMethods": [],\n "channel": "",\n "countryCode": "",\n "merchantAccount": "",\n "order": {\n "orderData": "",\n "pspReference": ""\n },\n "shopperLocale": "",\n "shopperReference": "",\n "splitCardFundingSources": false,\n "store": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/paymentMethods")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/paymentMethods',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
additionalData: {},
allowedPaymentMethods: [],
amount: {currency: '', value: 0},
blockedPaymentMethods: [],
channel: '',
countryCode: '',
merchantAccount: '',
order: {orderData: '', pspReference: ''},
shopperLocale: '',
shopperReference: '',
splitCardFundingSources: false,
store: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentMethods',
headers: {'content-type': 'application/json'},
body: {
additionalData: {},
allowedPaymentMethods: [],
amount: {currency: '', value: 0},
blockedPaymentMethods: [],
channel: '',
countryCode: '',
merchantAccount: '',
order: {orderData: '', pspReference: ''},
shopperLocale: '',
shopperReference: '',
splitCardFundingSources: false,
store: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/paymentMethods');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
additionalData: {},
allowedPaymentMethods: [],
amount: {
currency: '',
value: 0
},
blockedPaymentMethods: [],
channel: '',
countryCode: '',
merchantAccount: '',
order: {
orderData: '',
pspReference: ''
},
shopperLocale: '',
shopperReference: '',
splitCardFundingSources: false,
store: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/paymentMethods',
headers: {'content-type': 'application/json'},
data: {
additionalData: {},
allowedPaymentMethods: [],
amount: {currency: '', value: 0},
blockedPaymentMethods: [],
channel: '',
countryCode: '',
merchantAccount: '',
order: {orderData: '', pspReference: ''},
shopperLocale: '',
shopperReference: '',
splitCardFundingSources: false,
store: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/paymentMethods';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"additionalData":{},"allowedPaymentMethods":[],"amount":{"currency":"","value":0},"blockedPaymentMethods":[],"channel":"","countryCode":"","merchantAccount":"","order":{"orderData":"","pspReference":""},"shopperLocale":"","shopperReference":"","splitCardFundingSources":false,"store":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"additionalData": @{ },
@"allowedPaymentMethods": @[ ],
@"amount": @{ @"currency": @"", @"value": @0 },
@"blockedPaymentMethods": @[ ],
@"channel": @"",
@"countryCode": @"",
@"merchantAccount": @"",
@"order": @{ @"orderData": @"", @"pspReference": @"" },
@"shopperLocale": @"",
@"shopperReference": @"",
@"splitCardFundingSources": @NO,
@"store": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/paymentMethods"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/paymentMethods" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/paymentMethods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'additionalData' => [
],
'allowedPaymentMethods' => [
],
'amount' => [
'currency' => '',
'value' => 0
],
'blockedPaymentMethods' => [
],
'channel' => '',
'countryCode' => '',
'merchantAccount' => '',
'order' => [
'orderData' => '',
'pspReference' => ''
],
'shopperLocale' => '',
'shopperReference' => '',
'splitCardFundingSources' => null,
'store' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/paymentMethods', [
'body' => '{
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"blockedPaymentMethods": [],
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
},
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": false,
"store": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/paymentMethods');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'additionalData' => [
],
'allowedPaymentMethods' => [
],
'amount' => [
'currency' => '',
'value' => 0
],
'blockedPaymentMethods' => [
],
'channel' => '',
'countryCode' => '',
'merchantAccount' => '',
'order' => [
'orderData' => '',
'pspReference' => ''
],
'shopperLocale' => '',
'shopperReference' => '',
'splitCardFundingSources' => null,
'store' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'additionalData' => [
],
'allowedPaymentMethods' => [
],
'amount' => [
'currency' => '',
'value' => 0
],
'blockedPaymentMethods' => [
],
'channel' => '',
'countryCode' => '',
'merchantAccount' => '',
'order' => [
'orderData' => '',
'pspReference' => ''
],
'shopperLocale' => '',
'shopperReference' => '',
'splitCardFundingSources' => null,
'store' => ''
]));
$request->setRequestUrl('{{baseUrl}}/paymentMethods');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/paymentMethods' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"blockedPaymentMethods": [],
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
},
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": false,
"store": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/paymentMethods' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"blockedPaymentMethods": [],
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
},
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": false,
"store": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/paymentMethods", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/paymentMethods"
payload = {
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"blockedPaymentMethods": [],
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
},
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": False,
"store": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/paymentMethods"
payload <- "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/paymentMethods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/paymentMethods') do |req|
req.body = "{\n \"additionalData\": {},\n \"allowedPaymentMethods\": [],\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"blockedPaymentMethods\": [],\n \"channel\": \"\",\n \"countryCode\": \"\",\n \"merchantAccount\": \"\",\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"shopperLocale\": \"\",\n \"shopperReference\": \"\",\n \"splitCardFundingSources\": false,\n \"store\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/paymentMethods";
let payload = json!({
"additionalData": json!({}),
"allowedPaymentMethods": (),
"amount": json!({
"currency": "",
"value": 0
}),
"blockedPaymentMethods": (),
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": json!({
"orderData": "",
"pspReference": ""
}),
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": false,
"store": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/paymentMethods \
--header 'content-type: application/json' \
--data '{
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"blockedPaymentMethods": [],
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
},
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": false,
"store": ""
}'
echo '{
"additionalData": {},
"allowedPaymentMethods": [],
"amount": {
"currency": "",
"value": 0
},
"blockedPaymentMethods": [],
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": {
"orderData": "",
"pspReference": ""
},
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": false,
"store": ""
}' | \
http POST {{baseUrl}}/paymentMethods \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "additionalData": {},\n "allowedPaymentMethods": [],\n "amount": {\n "currency": "",\n "value": 0\n },\n "blockedPaymentMethods": [],\n "channel": "",\n "countryCode": "",\n "merchantAccount": "",\n "order": {\n "orderData": "",\n "pspReference": ""\n },\n "shopperLocale": "",\n "shopperReference": "",\n "splitCardFundingSources": false,\n "store": ""\n}' \
--output-document \
- {{baseUrl}}/paymentMethods
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"additionalData": [],
"allowedPaymentMethods": [],
"amount": [
"currency": "",
"value": 0
],
"blockedPaymentMethods": [],
"channel": "",
"countryCode": "",
"merchantAccount": "",
"order": [
"orderData": "",
"pspReference": ""
],
"shopperLocale": "",
"shopperReference": "",
"splitCardFundingSources": false,
"store": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/paymentMethods")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"paymentMethods": [
{
"details": [
{
"details": [
{
"key": "ownerName",
"type": "text"
},
{
"key": "bankLocationId",
"type": "text"
},
{
"key": "bankAccountNumber",
"type": "text"
}
],
"key": "bankAccount",
"type": "bankAccount"
}
],
"name": "ACH Direct Debit",
"type": "ach"
},
{
"name": "Adyen Voucher",
"type": "adyen_test_voucher"
},
{
"details": [
{
"details": [
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"items": [
{
"id": "M",
"name": "male"
},
{
"id": "F",
"name": "female"
}
],
"key": "gender",
"type": "radio"
},
{
"key": "dateOfBirth",
"type": "date"
},
{
"key": "telephoneNumber",
"type": "tel"
},
{
"key": "shopperEmail",
"type": "emailAddress"
}
],
"key": "personalDetails",
"type": "fieldSet"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "NL",
"name": "Netherlands"
},
{
"id": "BE",
"name": "Belgium"
}
],
"key": "country",
"type": "select"
}
],
"key": "billingAddress",
"type": "address"
},
{
"key": "separateDeliveryAddress",
"optional": true,
"type": "boolean",
"value": "false"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "NL",
"name": "Netherlands"
},
{
"id": "BE",
"name": "Belgium"
}
],
"key": "country",
"type": "select"
}
],
"key": "deliveryAddress",
"optional": true,
"type": "address"
}
],
"name": "AfterPay Invoice",
"type": "afterpay_default"
},
{
"name": "AfterPay DirectDebit",
"type": "afterpay_directdebit"
},
{
"name": "Afterpay",
"type": "afterpaytouch"
},
{
"details": [
{
"key": "encryptedCardNumber",
"type": "cardToken"
},
{
"key": "encryptedSecurityCode",
"type": "cardToken"
},
{
"key": "encryptedExpiryMonth",
"type": "cardToken"
},
{
"key": "encryptedExpiryYear",
"type": "cardToken"
},
{
"key": "holderName",
"optional": true,
"type": "text"
}
],
"name": "Credit Card",
"type": "scheme"
},
{
"name": "AliPay",
"type": "alipay"
},
{
"name": "AliPay HK",
"type": "alipay_hk"
},
{
"name": "AliPay",
"type": "alipay_wap"
},
{
"details": [
{
"key": "additionalData.androidpay.token",
"type": "androidPayToken"
}
],
"name": "Android Pay",
"type": "androidpay"
},
{
"details": [
{
"key": "additionalData.applepay.token",
"type": "applePayToken"
}
],
"name": "Apple Pay",
"type": "applepay"
},
{
"name": "Credit Card via AsiaPay",
"type": "asiapay"
},
{
"name": "China UnionPay",
"type": "asiapay_unionpay"
},
{
"name": "Baby Gift Card",
"type": "babygiftcard"
},
{
"name": "Baloto",
"type": "baloto"
},
{
"name": "BancNet",
"type": "bancnet"
},
{
"name": "Bank Transfer (BG)",
"type": "bankTransfer_BG"
},
{
"name": "Bank Transfer (CH)",
"type": "bankTransfer_CH"
},
{
"name": "Bank Transfer (DE)",
"type": "bankTransfer_DE"
},
{
"name": "Bank Transfer (FI)",
"type": "bankTransfer_FI"
},
{
"name": "Bank Transfer (GB)",
"type": "bankTransfer_GB"
},
{
"name": "Bank Transfer (HU)",
"type": "bankTransfer_HU"
},
{
"name": "SEPA Bank Transfer",
"type": "bankTransfer_IBAN"
},
{
"name": "Bank Transfer (IE)",
"type": "bankTransfer_IE"
},
{
"name": "Electronic Bank Transfer (MX)",
"type": "bankTransfer_MX_linked"
},
{
"name": "Bank Transfer (MX)",
"type": "bankTransfer_MX_offline"
},
{
"name": "Bank Transfer (NL)",
"type": "bankTransfer_NL"
},
{
"name": "Bank Transfer (PL)",
"type": "bankTransfer_PL"
},
{
"name": "Bank Transfer (SE)",
"type": "bankTransfer_SE"
},
{
"name": "Bank Transfer (US)",
"type": "bankTransfer_US"
},
{
"name": "Payconiq by Bancontact",
"type": "bcmc_mobile"
},
{
"name": "Bijenkorf Cadeaucard",
"type": "bijcadeaucard"
},
{
"name": "99Bill",
"type": "bill99"
},
{
"details": [
{
"items": [
{
"id": "AUB_DIRECT",
"name": "AU Small Finance Bank"
},
{
"id": "ALB_DIRECT",
"name": "Allahabad Bank "
},
{
"id": "APG_DIRECT",
"name": "Andhra Pragathi Grameena Bank"
},
{
"id": "BDN_DIRECT",
"name": "Bandhan bank"
},
{
"id": "BBK_DIRECT",
"name": "Bank of Bahrain and Kuwait"
},
{
"id": "BBR_DIRECT",
"name": "Bank of Baroda - Retail Banking"
},
{
"id": "BCB_DIRECT",
"name": "Bassien Catholic Co-Operative Bank "
},
{
"id": "CNB_DIRECT",
"name": "Canara Bank"
},
{
"id": "SYD_DIRECT",
"name": "Canara Bank (e-Syndicate)"
},
{
"id": "CSB_DIRECT",
"name": "Catholic Syrian Bank"
},
{
"id": "CBI_DIRECT",
"name": "Central Bank of India"
},
{
"id": "CUB_DIRECT",
"name": "City Union Bank"
},
{
"id": "COB_DIRECT",
"name": "Cosmos Bank"
},
{
"id": "DEN_DIRECT",
"name": "Dena Bank"
},
{
"id": "DBK_DIRECT",
"name": "Deutsche Bank"
},
{
"id": "DCB_DIRECT",
"name": "Development Credit Bank"
},
{
"id": "DLB_DIRECT",
"name": "Dhanlakshmi Bank - Retail Net Banking"
},
{
"id": "ESF_DIRECT",
"name": "ESAF Small Finance Bank"
},
{
"id": "EQB_DIRECT",
"name": "Equitas Small Finance Bank"
},
{
"id": "FBK_DIRECT",
"name": "Federal Bank"
},
{
"id": "FNC_DIRECT",
"name": "Fincare Bank"
},
{
"id": "HDF_DIRECT",
"name": "HDFC Bank"
},
{
"id": "ICI_DIRECT",
"name": "ICICI Bank "
},
{
"id": "IDB_DIRECT",
"name": "IDBI Bank - Retail Net Banking"
},
{
"id": "IDN_DIRECT",
"name": "IDFC FIRST Bank"
},
{
"id": "INB_DIRECT",
"name": "Indian Bank"
},
{
"id": "IOB_DIRECT",
"name": "Indian Overseas Bank"
},
{
"id": "IDS_DIRECT",
"name": "IndusInd Bank"
},
{
"id": "JKB_DIRECT",
"name": "Jammu & Kashmir Bank"
},
{
"id": "JNB_DIRECT",
"name": "Jana Small Finance Bank"
},
{
"id": "JSB_DIRECT",
"name": "Janata Sahakari Bank Ltd Pune"
},
{
"id": "KJB_DIRECT",
"name": "Kalyan Janata Sahakari Bank"
},
{
"id": "KBL_DIRECT",
"name": "Karnataka Bank Ltd"
},
{
"id": "KVB_DIRECT",
"name": "Karur Vysya Bank"
},
{
"id": "162_DIRECT",
"name": "Kotak Bank"
},
{
"id": "LVR_DIRECT",
"name": "Laxmi Vilas Bank - Retail"
},
{
"id": "NKB_DIRECT",
"name": "NKGSB Co-op Bank"
},
{
"id": "NEB_DIRECT",
"name": "North East Small Finance Bank"
},
{
"id": "OBC_DIRECT",
"name": "PNB (Erstwhile-Oriental Bank of Commerce)"
},
{
"id": "UNI_DIRECT",
"name": "PNB (Erstwhile-United Bank of India)"
},
{
"id": "PMC_DIRECT",
"name": "Punjab & Maharastra Co-op Bank"
},
{
"id": "PSB_DIRECT",
"name": "Punjab & Sind Bank"
},
{
"id": "CPN_DIRECT",
"name": "Punjab National Bank - Corporate "
},
{
"id": "PNB_DIRECT",
"name": "Punjab National Bank - Retail Banking"
},
{
"id": "RBL_DIRECT",
"name": "RBL Bank Limited"
},
{
"id": "SWB_DIRECT",
"name": "Saraswat Bank"
},
{
"id": "SHB_DIRECT",
"name": "Shivalik Mercantile Cooperative Bank Ltd"
},
{
"id": "SIB_DIRECT",
"name": "South Indian Bank"
},
{
"id": "SCB_DIRECT",
"name": "Standard Chartered Bank"
},
{
"id": "SBI_DIRECT",
"name": "State Bank of India"
},
{
"id": "SRB_DIRECT",
"name": "Suryoday Small Finance Bank"
},
{
"id": "TJB_DIRECT",
"name": "TJSB Bank"
},
{
"id": "TNC_DIRECT",
"name": "Tamil Nadu State Co-operative Bank"
},
{
"id": "TMB_DIRECT",
"name": "Tamilnad Mercantile Bank Ltd"
},
{
"id": "TBB_DIRECT",
"name": "Thane Bharat Sahakari Bank Ltd"
},
{
"id": "MSB_DIRECT",
"name": "The Mehsana Urban Co Op Bank Ltd"
},
{
"id": "UCO_DIRECT",
"name": "UCO Bank"
},
{
"id": "UBI_DIRECT",
"name": "Union Bank of India"
},
{
"id": "ADB_DIRECT",
"name": "Union Bank of India (Erstwhile Andhra Bank)"
},
{
"id": "CRP_DIRECT",
"name": "Union Bank of India (Erstwhile Corporation Bank)"
},
{
"id": "VRB_DIRECT",
"name": "Varachha Co-operative Bank Limited"
},
{
"id": "VJB_DIRECT",
"name": "Vijaya Bank"
},
{
"id": "YBK_DIRECT",
"name": "Yes Bank"
},
{
"id": "ZOB_DIRECT",
"name": "Zoroastrian Co-operative Bank Limited"
},
{
"id": "DBS_DIRECT",
"name": "digibank by DBS"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "Online Banking India",
"type": "billdesk_online"
},
{
"name": "UPI",
"type": "billdesk_upi"
},
{
"details": [
{
"items": [
{
"id": "DCW_DIRECT",
"name": "DCB Cippy"
},
{
"id": "ICC_DIRECT",
"name": "ICC Cash Card"
},
{
"id": "OXY_DIRECT",
"name": "Oxigen Wallet"
},
{
"id": "PCH_DIRECT",
"name": "Pay World Money"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "Wallets India",
"type": "billdesk_wallet"
},
{
"name": "Blik",
"type": "blik"
},
{
"name": "Bloemen Giftcard",
"type": "bloemengiftcard"
},
{
"name": "Boekenbon Giftcard",
"type": "boekenbon"
},
{
"name": "Boleto",
"type": "boleto"
},
{
"name": "Boleto Bancario",
"type": "boletobancario_santander"
},
{
"name": "Bradesco",
"type": "bradesco"
},
{
"name": "Cash-Ticket",
"type": "cashticket"
},
{
"name": "CashU",
"type": "cashu"
},
{
"name": "CCAvenue",
"type": "ccavenue"
},
{
"name": "Mula Checkout",
"type": "cellulant"
},
{
"name": "Chasin Giftcard",
"type": "chasingiftcard"
},
{
"name": "Clearpay",
"type": "clearpay"
},
{
"name": "ClickandBuy",
"type": "clickandbuy"
},
{
"name": "Paiement en 3 fois par Cartes Bancaires",
"type": "cofinoga_3xcb"
},
{
"name": "Costes Giftcard",
"type": "costesgiftcard"
},
{
"name": "custom_settlement",
"type": "custom_settlement"
},
{
"name": "DANA",
"type": "dana"
},
{
"name": "DineroMail",
"type": "dineromail"
},
{
"name": "Online bank transfer.",
"type": "directEbanking"
},
{
"name": "Direct Debit Brazil - Banco do Brazil",
"type": "directdebit_BR_bancodobrasil"
},
{
"name": "Direct Debit Brazil - Bradesco",
"type": "directdebit_BR_bradesco"
},
{
"name": "Direct Debit Brazil - Caixa Economica Federal",
"type": "directdebit_BR_caixa"
},
{
"name": "Direct Debit Brazil - HSBC",
"type": "directdebit_BR_hsbc"
},
{
"name": "Direct Debit Brazil - Itau",
"type": "directdebit_BR_itau"
},
{
"name": "Direct Debit Brazil - Santander",
"type": "directdebit_BR_santander"
},
{
"name": "BACS Direct Debit",
"type": "directdebit_GB"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "Alfamart",
"type": "doku_alfamart"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "BCA Bank Transfer",
"type": "doku_bca_va"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "BNI VA",
"type": "doku_bni_va"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "BRI VA",
"type": "doku_bri_va"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "CIMB VA",
"type": "doku_cimb_va"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "Danamon VA",
"type": "doku_danamon_va"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "Indomaret",
"type": "doku_indomaret"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "Mandiri VA",
"type": "doku_mandiri_va"
},
{
"details": [
{
"key": "ovoId",
"type": "text"
}
],
"name": "OVO",
"type": "doku_ovo"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "Bank Transfer",
"type": "doku_permata_lite_atm"
},
{
"details": [
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"key": "infix",
"optional": true,
"type": "text"
}
],
"name": "DOKU wallet",
"type": "doku_wallet"
},
{
"details": [
{
"items": [
{
"id": "66",
"name": "Bank Nowy BFG S.A."
},
{
"id": "92",
"name": "Bank Spółdzielczy w Brodnicy"
},
{
"id": "11",
"name": "Bank transfer / postal"
},
{
"id": "74",
"name": "Banki Spółdzielcze"
},
{
"id": "73",
"name": "BLIK"
},
{
"id": "90",
"name": "BNP Paribas - płacę z Pl@net"
},
{
"id": "59",
"name": "CinkciarzPAY"
},
{
"id": "87",
"name": "Credit Agricole PBL"
},
{
"id": "83",
"name": "EnveloBank"
},
{
"id": "76",
"name": "Getin Bank PBL"
},
{
"id": "81",
"name": "Idea Cloud"
},
{
"id": "7",
"name": "ING Corporate customers"
},
{
"id": "93",
"name": "Kasa Stefczyka"
},
{
"id": "44",
"name": "Millennium - Płatności Internetowe"
},
{
"id": "10",
"name": "Millennium Corporate customers"
},
{
"id": "68",
"name": "mRaty"
},
{
"id": "1",
"name": "mTransfer"
},
{
"id": "91",
"name": "Nest Bank"
},
{
"id": "80",
"name": "Noble Pay"
},
{
"id": "50",
"name": "Pay Way Toyota Bank"
},
{
"id": "45",
"name": "Pay with Alior Bank"
},
{
"id": "36",
"name": "Pekao24Przelew"
},
{
"id": "70",
"name": "Pocztowy24"
},
{
"id": "6",
"name": "Przelew24"
},
{
"id": "46",
"name": "Płacę z Citi Handlowy"
},
{
"id": "38",
"name": "Płacę z ING"
},
{
"id": "2",
"name": "Płacę z Inteligo"
},
{
"id": "4",
"name": "Płacę z iPKO"
},
{
"id": "75",
"name": "Płacę z Plus Bank"
},
{
"id": "51",
"name": "Płać z BOŚ"
},
{
"id": "55",
"name": "Raty z Alior Bankiem PLN"
},
{
"id": "89",
"name": "Santander"
},
{
"id": "52",
"name": "SkyCash"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "Local Polish Payment Methods",
"type": "dotpay"
},
{
"name": "Dragonpay Prepaid Credits",
"type": "dragonpay_credits"
},
{
"name": "Online Banking",
"type": "dragonpay_ebanking"
},
{
"name": "GCash",
"type": "dragonpay_gcash"
},
{
"name": "Over The Counter Banks",
"type": "dragonpay_otc_banking"
},
{
"name": "OTC non-Bank via Dragonpay",
"type": "dragonpay_otc_non_banking"
},
{
"name": "Convenience Stores",
"type": "dragonpay_otc_philippines"
},
{
"name": "7/11",
"type": "dragonpay_seveneleven"
},
{
"name": "eagleeye_voucher",
"type": "eagleeye_voucher"
},
{
"name": "Finnish E-Banking",
"type": "ebanking_FI"
},
{
"name": "Pay-easy ATM",
"type": "econtext_atm"
},
{
"name": "Online Banking",
"type": "econtext_online"
},
{
"name": "7-Eleven",
"type": "econtext_seven_eleven"
},
{
"name": "Convenience Stores",
"type": "econtext_stores"
},
{
"name": "eft_directdebit_CA",
"type": "eft_directdebit_CA"
},
{
"name": "Lastschrift (ELV)",
"type": "elv"
},
{
"details": [
{
"items": [
{
"id": "231",
"name": "POP Pankki"
},
{
"id": "551",
"name": "Komerční banka"
},
{
"id": "232",
"name": "Aktia"
},
{
"id": "552",
"name": "Raiffeisen"
},
{
"id": "233",
"name": "Säästöpankki"
},
{
"id": "750",
"name": "Swedbank"
},
{
"id": "211",
"name": "Nordea"
},
{
"id": "553",
"name": "ČSOB"
},
{
"id": "234",
"name": "S-Pankki"
},
{
"id": "751",
"name": "SEB"
},
{
"id": "554",
"name": "Moneta"
},
{
"id": "235",
"name": "OmaSP"
},
{
"id": "752",
"name": "Nordea"
},
{
"id": "213",
"name": "Op-Pohjola"
},
{
"id": "555",
"name": "UniCredit"
},
{
"id": "753",
"name": "LHV"
},
{
"id": "556",
"name": "Fio"
},
{
"id": "557",
"name": "mBank"
},
{
"id": "216",
"name": "Handelsbanken"
},
{
"id": "558",
"name": "Air Bank"
},
{
"id": "260",
"name": "Länsförsäkringar"
},
{
"id": "240",
"name": "BankDeposit"
},
{
"id": "265",
"name": "Sparbanken"
},
{
"id": "640",
"name": "BankDeposit"
},
{
"id": "200",
"name": "Ålandsbanken"
},
{
"id": "940",
"name": "Swedbank"
},
{
"id": "500",
"name": "Česká spořitelna"
},
{
"id": "720",
"name": "Swedbank"
},
{
"id": "941",
"name": "SEB"
},
{
"id": "204",
"name": "Danske Bank"
},
{
"id": "721",
"name": "SEB"
},
{
"id": "942",
"name": "Citadele"
},
{
"id": "205",
"name": "Handelsbanken"
},
{
"id": "722",
"name": "DNB"
},
{
"id": "943",
"name": "DNB"
},
{
"id": "206",
"name": "Nordea"
},
{
"id": "723",
"name": "Šiaulių bankas"
},
{
"id": "207",
"name": "SEB"
},
{
"id": "724",
"name": "Nordea"
},
{
"id": "505",
"name": "Komerční banka"
},
{
"id": "208",
"name": "Skandiabanken"
},
{
"id": "209",
"name": "Swedbank"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "Bank Payment",
"type": "entercash"
},
{
"name": "Nationale Entertainment Card",
"type": "entertainmentcard"
},
{
"details": [
{
"items": [
{
"id": "d5d5b133-1c0d-4c08-b2be-3c9b116dc326",
"name": "Dolomitenbank"
},
{
"id": "ee9fc487-ebe0-486c-8101-17dce5141a67",
"name": "Raiffeissen Bankengruppe"
},
{
"id": "6765e225-a0dc-4481-9666-e26303d4f221",
"name": "Hypo Tirol Bank AG"
},
{
"id": "8b0bfeea-fbb0-4337-b3a1-0e25c0f060fc",
"name": "Sparda Bank Wien"
},
{
"id": "1190c4d1-b37a-487e-9355-e0a067f54a9f",
"name": "Schoellerbank AG"
},
{
"id": "e2e97aaa-de4c-4e18-9431-d99790773433",
"name": "Volksbank Gruppe"
},
{
"id": "bb7d223a-17d5-48af-a6ef-8a2bf5a4e5d9",
"name": "Immo-Bank"
},
{
"id": "e6819e7a-f663-414b-92ec-cf7c82d2f4e5",
"name": "Bank Austria"
},
{
"id": "eff103e6-843d-48b7-a6e6-fbd88f511b11",
"name": "Easybank AG"
},
{
"id": "25942cc9-617d-42a1-89ba-d1ab5a05770a",
"name": "VR-BankBraunau"
},
{
"id": "4a0a975b-0594-4b40-9068-39f77b3a91f9",
"name": "Volkskreditbank"
},
{
"id": "3fdc41fc-3d3d-4ee3-a1fe-cd79cfd58ea3",
"name": "Erste Bank und Sparkassen"
},
{
"id": "ba7199cc-f057-42f2-9856-2378abf21638",
"name": "BAWAG P.S.K. Gruppe"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "EPS",
"type": "eps"
},
{
"name": "Expert Cadeaukaart",
"type": "expertgiftcard"
},
{
"details": [
{
"details": [
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"items": [
{
"id": "M",
"name": "male"
},
{
"id": "F",
"name": "female"
}
],
"key": "gender",
"type": "radio"
},
{
"key": "telephoneNumber",
"type": "tel"
},
{
"key": "shopperEmail",
"type": "emailAddress"
}
],
"key": "personalDetails",
"type": "fieldSet"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "FR",
"name": "France"
},
{
"id": "ES",
"name": "Spain"
}
],
"key": "country",
"type": "select"
}
],
"key": "billingAddress",
"type": "address"
},
{
"key": "separateDeliveryAddress",
"optional": true,
"type": "boolean",
"value": "false"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "FR",
"name": "France"
},
{
"id": "ES",
"name": "Spain"
}
],
"key": "country",
"type": "select"
}
],
"key": "deliveryAddress",
"optional": true,
"type": "address"
}
],
"name": "3x Oney",
"type": "facilypay_3x"
},
{
"details": [
{
"details": [
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"items": [
{
"id": "M",
"name": "male"
},
{
"id": "F",
"name": "female"
}
],
"key": "gender",
"type": "radio"
},
{
"key": "telephoneNumber",
"type": "tel"
},
{
"key": "shopperEmail",
"type": "emailAddress"
}
],
"key": "personalDetails",
"type": "fieldSet"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "FR",
"name": "France"
},
{
"id": "ES",
"name": "Spain"
}
],
"key": "country",
"type": "select"
}
],
"key": "billingAddress",
"type": "address"
},
{
"key": "separateDeliveryAddress",
"optional": true,
"type": "boolean",
"value": "false"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "FR",
"name": "France"
},
{
"id": "ES",
"name": "Spain"
}
],
"key": "country",
"type": "select"
}
],
"key": "deliveryAddress",
"optional": true,
"type": "address"
}
],
"name": "4x Oney",
"type": "facilypay_4x"
},
{
"name": "Fashioncheque",
"type": "fashioncheque"
},
{
"details": [
{
"key": "shopper.firstName",
"type": "text"
},
{
"key": "shopper.lastName",
"type": "text"
},
{
"key": "shopper.gender",
"type": "text"
},
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "telephoneNumber",
"type": "tel"
},
{
"key": "countryCode",
"type": "text"
}
],
"name": "Fawry",
"type": "fawry"
},
{
"name": "FijnCadeau",
"type": "fijncadeau"
},
{
"name": "Fleurop Bloemenbon",
"type": "fleuropbloemenbon"
},
{
"name": "Fonq Giftcard",
"type": "fonqgiftcard"
},
{
"name": "Gall & Gall",
"type": "gallgall"
},
{
"name": "GCash",
"type": "gcash"
},
{
"name": "Generic GiftCard",
"type": "genericgiftcard"
},
{
"name": "GiftFor2",
"type": "giftfor2card"
},
{
"details": [
{
"key": "bic",
"type": "text"
}
],
"name": "GiroPay",
"type": "giropay"
},
{
"name": "Givex",
"type": "givex"
},
{
"name": "Globe GCash",
"type": "globegcash"
},
{
"name": "Goldsmiths Card",
"type": "goldsmithscard"
},
{
"name": "GoPay Wallet",
"type": "gopay_wallet"
},
{
"name": "OVO",
"type": "grabpay_ID"
},
{
"name": "GrabPay",
"type": "grabpay_PH"
},
{
"name": "GrabPay",
"type": "grabpay_SG"
},
{
"name": "Hallmark Card",
"type": "hallmarkcard"
},
{
"name": "HDFC",
"type": "hdfc"
},
{
"name": "Hunkemoller Member Card",
"type": "hmclub"
},
{
"name": "Hunkemoller Lingerie Card",
"type": "hmlingerie"
},
{
"details": [
{
"items": [
{
"id": "1121",
"name": "Test Issuer"
},
{
"id": "1154",
"name": "Test Issuer 5"
},
{
"id": "1153",
"name": "Test Issuer 4"
},
{
"id": "1152",
"name": "Test Issuer 3"
},
{
"id": "1151",
"name": "Test Issuer 2"
},
{
"id": "1162",
"name": "Test Issuer Cancelled"
},
{
"id": "1161",
"name": "Test Issuer Pending"
},
{
"id": "1160",
"name": "Test Issuer Refused"
},
{
"id": "1159",
"name": "Test Issuer 10"
},
{
"id": "1158",
"name": "Test Issuer 9"
},
{
"id": "1157",
"name": "Test Issuer 8"
},
{
"id": "1156",
"name": "Test Issuer 7"
},
{
"id": "1155",
"name": "Test Issuer 6"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "iDEAL",
"type": "ideal"
},
{
"name": "igive",
"type": "igive"
},
{
"name": "Korean Account Transfer (IniPay)",
"type": "inicisIniPay_accounttransfer"
},
{
"name": "Korean Credit Cards (IniPay)",
"type": "inicisIniPay_creditcard"
},
{
"name": "Korean Mobile Phone (IniPay)",
"type": "inicisIniPay_mobilephone"
},
{
"name": "Korean Virtual Account (IniPay)",
"type": "inicisIniPay_virtualaccount"
},
{
"name": "Korean Account Transfer (Mobile)",
"type": "inicisMobile_accounttransfer"
},
{
"name": "Korean Credit Cards (Mobile)",
"type": "inicisMobile_creditcard"
},
{
"name": "Korean Mobile Phone (Mobile)",
"type": "inicisMobile_mobilephone"
},
{
"name": "Korean Virtual Account (Mobile)",
"type": "inicisMobile_virtualaccount"
},
{
"name": "Korean Credit Cards",
"type": "inicis_creditcard"
},
{
"name": "Interac® Online",
"type": "interac"
},
{
"name": "Instant EFT",
"type": "ipay"
},
{
"name": "iPay88",
"type": "ipay88"
},
{
"name": "isracard",
"type": "isracard"
},
{
"name": "Phone Payment",
"type": "ivr"
},
{
"name": "Landline phone",
"type": "ivrLandline"
},
{
"name": "Mobile phone",
"type": "ivrMobile"
},
{
"name": "Kado Wereld",
"type": "kadowereld"
},
{
"name": "KakaoPay",
"type": "kakaopay"
},
{
"name": "Karen Millen Card",
"type": "karenmillen"
},
{
"name": "Karen Millen GiftCard",
"type": "karenmillengiftcard"
},
{
"name": "Bank Transfer",
"type": "kcp_banktransfer"
},
{
"name": "Korea–issued cards",
"type": "kcp_creditcard"
},
{
"name": "PayCo",
"type": "kcp_payco"
},
{
"name": "Naver Pay",
"type": "kcp_naverpay"
},
{
"name": "Virtual Account via KCP",
"type": "kcp_va"
},
{
"name": "Pay later with Klarna.",
"type": "klarna"
},
{
"name": "Pay over time with Klarna.",
"type": "klarna_account"
},
{
"name": "Buy Now, Pay Later with Billie",
"type": "klarna_b2b"
},
{
"name": "Pay now with Klarna.",
"type": "klarna_paynow"
},
{
"name": "Leisure Card",
"type": "leisurecard"
},
{
"name": "China Credit Card",
"type": "lianlianpay_creditcard"
},
{
"name": "China Debit Card",
"type": "lianlianpay_debitcard"
},
{
"details": [
{
"key": "telephoneNumber",
"type": "tel"
}
],
"name": "China Online Banking - Credit Card",
"type": "lianlianpay_ebanking_credit"
},
{
"details": [
{
"items": [
{
"id": "01030000",
"name": "Agricultural Bank of China"
},
{
"id": "4031000",
"name": "Bank of Beijing"
},
{
"id": "01040000",
"name": "Bank of China"
},
{
"id": "03020000",
"name": "China Citic Bank"
},
{
"id": "01050000",
"name": "China Construction Bank"
},
{
"id": "03030000",
"name": "China Everbright Bank"
},
{
"id": "03080000",
"name": "China Merchants Bank"
},
{
"id": "03050000",
"name": "China Minsheng Banking Group"
},
{
"id": "03040000",
"name": "Hua Xia Bank Co"
},
{
"id": "01020000",
"name": "Industrial and Commercial Bank of China"
},
{
"id": "03070000",
"name": "PingAn Bank"
},
{
"id": "1000000",
"name": "Postal Savings Bank of China"
}
],
"key": "issuer",
"type": "select"
},
{
"key": "telephoneNumber",
"type": "tel"
}
],
"name": "China Online Banking - Debit Card",
"type": "lianlianpay_ebanking_debit"
},
{
"details": [
{
"items": [
{
"id": "01030000",
"name": "Agricultural Bank of China"
},
{
"id": "01050000",
"name": "China Construction Bank"
},
{
"id": "03080000",
"name": "China Merchants Bank"
},
{
"id": "01020000",
"name": "Industrial and Commercial Bank of China"
},
{
"id": "03100000",
"name": "Shanghai Pudong Development Bank"
}
],
"key": "issuer",
"type": "select"
},
{
"key": "telephoneNumber",
"type": "tel"
}
],
"name": "China Online Banking - Enterprise",
"type": "lianlianpay_ebanking_enterprise"
},
{
"name": "Loods5 Cadeaukaart",
"type": "loods5giftcard"
},
{
"name": "Loods5 Tegoedbon",
"type": "loods5prepaidcard"
},
{
"name": "Love2Shop GiftCard",
"type": "love2shop"
},
{
"details": [
{
"key": "shopper.firstName",
"type": "text"
},
{
"key": "shopper.lastName",
"type": "text"
},
{
"key": "shopper.gender",
"type": "text"
},
{
"key": "shopperEmail",
"type": "emailAddress"
},
{
"key": "telephoneNumber",
"type": "tel"
},
{
"key": "countryCode",
"type": "text"
}
],
"name": "mada",
"type": "mada"
},
{
"name": "Mappin & Webb Card",
"type": "mappinwebbcard"
},
{
"name": "MB WAY",
"type": "mbway"
},
{
"details": [
{
"key": "additionalData.amazonPayToken",
"type": "text"
}
],
"name": "Amazon Pay",
"supportsRecurring": true,
"type": "amazonpay"
},
{
"name": "Mercado Pago",
"type": "mercadopago"
},
{
"name": "MobilePay",
"type": "mobilepay"
},
{
"name": "AliPay via Razer Merchant Services",
"type": "molpay_alipay"
},
{
"name": "7-Eleven",
"type": "molpay_cash"
},
{
"name": "CIMB Virtual Account",
"type": "molpay_cimb_va"
},
{
"name": "Malaysia E-Banking via Razer Merchant Services",
"type": "molpay_ebanking_MY"
},
{
"details": [
{
"items": [
{
"id": "vtcpay-vietinbank",
"name": "Vietinbank"
},
{
"id": "vtcpay-bidv",
"name": "BIDV"
},
{
"id": "vtcpay-agribank",
"name": "Agribank"
},
{
"id": "vtcpay-mb",
"name": "MB Bank"
},
{
"id": "vtcpay-sacombank",
"name": "Sacombank"
},
{
"id": "vtcpay-dongabank",
"name": "DongABank"
},
{
"id": "vtcpay-maritimebank",
"name": "MaritimeBank"
},
{
"id": "vtcpay-vietcombank",
"name": "Vietcombank"
},
{
"id": "vtcpay-acb",
"name": "ACB"
},
{
"id": "vtcpay-techcombank",
"name": "Techcombank"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "Vietnam E-Banking",
"type": "molpay_ebanking_VN"
},
{
"details": [
{
"items": [
{
"id": "fpx_bimb",
"name": "Bank Islam"
},
{
"id": "fpx_uob",
"name": "UOB Bank"
},
{
"id": "fpx_cimbclicks",
"name": "CIMB Clicks"
},
{
"id": "fpx_kfh",
"name": "Kuwait Finance House"
},
{
"id": "fpx_rhb",
"name": "RHB Now"
},
{
"id": "fpx_abmb",
"name": "Alliance Bank"
},
{
"id": "fpx_amb",
"name": "Am Online"
},
{
"id": "fpx_hsbc",
"name": "HSBC"
},
{
"id": "fpx_abb",
"name": "Affin Bank"
},
{
"id": "fpx_ocbc",
"name": "OCBC Bank"
},
{
"id": "fpx_pbb",
"name": "Public Bank"
},
{
"id": "fpx_scb",
"name": "Standard Chartered Bank"
},
{
"id": "fpx_bsn",
"name": "Bank Simpanan Nasional"
},
{
"id": "fpx_mb2u",
"name": "Maybank2u"
},
{
"id": "fpx_hlb",
"name": "Hong Leong Connect"
},
{
"id": "fpx_bmmb",
"name": "Bank Muamalat"
},
{
"id": "fpx_bkrm",
"name": "Bank Rakyat"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "Malaysia E-Banking",
"type": "molpay_ebanking_fpx_MY"
},
{
"name": "eNETS Debit",
"type": "molpay_enetsd"
},
{
"name": "epay",
"type": "molpay_epay"
},
{
"name": "Esapay",
"type": "molpay_esapay"
},
{
"name": "MyClear FPX",
"type": "molpay_fpx"
},
{
"name": "Maybank2u",
"type": "molpay_maybank2u"
},
{
"name": "Nganluong",
"type": "molpay_nganluong"
},
{
"name": "Convenience Stores Thailand",
"type": "molpay_paysbuy"
},
{
"name": "MOLPoints",
"type": "molpay_points"
},
{
"name": "RHB Now",
"type": "molpay_rhb"
},
{
"name": "SAM by SingPost",
"type": "molpay_singpost"
},
{
"name": "MOLWallet",
"type": "molpay_wallet"
},
{
"name": "MoMo ATM",
"type": "momo_atm"
},
{
"name": "Momo Wallet",
"type": "momo_wallet"
},
{
"name": "Moneybookers",
"type": "moneybookers"
},
{
"name": "Multibanco",
"type": "multibanco"
},
{
"name": "De Nationale Musicalcard",
"type": "musicalcard"
},
{
"name": "Nationale Bioscoopbon",
"type": "nationalebioscoopbon"
},
{
"name": "Nationale Tuinbon",
"type": "nationaletuinbon"
},
{
"name": "Nationale Verwen Cadeaubon",
"type": "nationaleverwencadeaubon"
},
{
"name": "BankAxess",
"type": "netaxept_bankaxess"
},
{
"name": "NETELLER",
"type": "neteller"
},
{
"name": "Onebip",
"type": "onebip"
},
{
"name": "One Two Three",
"type": "onetwothree"
},
{
"name": "Online Banking PL",
"type": "onlineBanking_PL"
},
{
"details": [
{
"items": [
{
"id": "1",
"name": "Model Bank v2"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "Online banking",
"type": "openbanking_UK"
},
{
"name": "Oxxo",
"type": "oxxo"
},
{
"name": "Pathe Giftcard",
"type": "pathegiftcard"
},
{
"name": "PayBright",
"type": "paybright"
},
{
"name": "Maya Wallet",
"type": "paymaya_wallet"
},
{
"name": "PayPal",
"type": "paypal"
},
{
"name": "Paysafecard",
"type": "paysafecard"
},
{
"name": "Payshop",
"type": "payshop"
},
{
"name": "PayD AMT via Paythru",
"type": "paythru_amt"
},
{
"name": "EFT via Paythru",
"type": "paythru_eft"
},
{
"name": "PayTM",
"type": "paytm"
},
{
"details": [
{
"key": "virtualPaymentAddress",
"type": "text"
}
],
"name": "PayU UPI",
"type": "payu_IN_upi"
},
{
"name": "EFT Pro via PayU",
"type": "payu_ZA_eftpro"
},
{
"details": [
{
"key": "additionalData.paywithgoogle.token",
"type": "payWithGoogleToken"
}
],
"name": "Google Pay",
"type": "paywithgoogle"
},
{
"name": "pix",
"type": "pix"
},
{
"name": "Plastix",
"type": "plastix"
},
{
"name": "Pluim",
"type": "pluimgiftcard"
},
{
"name": "Podium Card",
"type": "podiumcard"
},
{
"name": "POLi",
"type": "poli"
},
{
"name": "PPS",
"type": "pps"
},
{
"name": "Primera Cadeaukaart",
"type": "primeracadeaucard"
},
{
"name": "Illicado Gift Card",
"type": "prosodie_illicado"
},
{
"name": "PSE",
"type": "pse"
},
{
"details": [
{
"items": [
{
"id": "+7",
"name": "RU"
},
{
"id": "+9955",
"name": "GE"
},
{
"id": "+507",
"name": "PA"
},
{
"id": "+44",
"name": "GB"
},
{
"id": "+992",
"name": "TJ"
},
{
"id": "+370",
"name": "LT"
},
{
"id": "+972",
"name": "IL"
},
{
"id": "+996",
"name": "KG"
},
{
"id": "+380",
"name": "UA"
},
{
"id": "+84",
"name": "VN"
},
{
"id": "+90",
"name": "TR"
},
{
"id": "+994",
"name": "AZ"
},
{
"id": "+374",
"name": "AM"
},
{
"id": "+371",
"name": "LV"
},
{
"id": "+91",
"name": "IN"
},
{
"id": "+66",
"name": "TH"
},
{
"id": "+373",
"name": "MD"
},
{
"id": "+1",
"name": "US"
},
{
"id": "+81",
"name": "JP"
},
{
"id": "+998",
"name": "UZ"
},
{
"id": "+77",
"name": "KZ"
},
{
"id": "+375",
"name": "BY"
},
{
"id": "+372",
"name": "EE"
},
{
"id": "+40",
"name": "RO"
},
{
"id": "+82",
"name": "KR"
}
],
"key": "qiwiwallet.telephoneNumberPrefix",
"type": "select"
},
{
"key": "qiwiwallet.telephoneNumber",
"type": "text"
}
],
"name": "Qiwi Wallet",
"type": "qiwiwallet"
},
{
"name": "RatePay Invoice",
"type": "ratepay"
},
{
"name": "RatePay Direct Debit",
"type": "ratepay_directdebit"
},
{
"name": "Rituals Giftcard",
"type": "rituals"
},
{
"name": "Rob Peetoom Giftcard",
"type": "robpeetoomgiftcard"
},
{
"name": "SafetyPay",
"type": "safetypay"
},
{
"name": "SafetyPay Cash",
"type": "safetypay_cash"
},
{
"name": "Shoes&Accessories Cadeau",
"type": "sagiftcard"
},
{
"name": "Score Giftcard",
"type": "scoregiftcard"
},
{
"name": "SEB Direktbetalning",
"type": "sebdirectpayment"
},
{
"details": [
{
"key": "sepa.ownerName",
"type": "text"
},
{
"key": "sepa.ibanNumber",
"type": "text"
}
],
"name": "SEPA Direct Debit",
"type": "sepadirectdebit"
},
{
"name": "7-Eleven",
"type": "seveneleven"
},
{
"name": "Premium SMS",
"type": "sms"
},
{
"name": "SVS",
"type": "svs"
},
{
"name": "Swish",
"type": "swish"
},
{
"name": "TCS Test GiftCard",
"type": "tcstestgiftcard"
},
{
"name": "TenPay",
"type": "tenpay"
},
{
"name": "The Sting Giftcard",
"type": "thestinggiftcard"
},
{
"name": "TrueMoney",
"type": "truemoney"
},
{
"name": "Trustly",
"type": "trustly"
},
{
"name": "Online Banking by Trustpay",
"type": "trustpay"
},
{
"name": "TWINT",
"type": "twint"
},
{
"name": "Ukash",
"type": "ukash"
},
{
"name": "UnionPay",
"type": "unionpay"
},
{
"details": [
{
"key": "virtualPaymentAddress",
"type": "text"
}
],
"name": "UPI Collect",
"type": "upi_collect"
},
{
"name": "Valuelink",
"type": "valuelink"
},
{
"name": "V&D Cadeaukaart",
"type": "vdcadeaucard"
},
{
"details": [
{
"key": "telephoneNumber",
"optional": true,
"type": "tel"
}
],
"name": "Vipps",
"type": "vipps"
},
{
"details": [
{
"key": "additionalData.visacheckout.callId",
"type": "text"
}
],
"name": "Visa Checkout",
"type": "visacheckout"
},
{
"name": "VVV Cadeaubon",
"type": "vvvcadeaubon"
},
{
"name": "VVV Giftcard",
"type": "vvvgiftcard"
},
{
"name": "Webshop Giftcard",
"type": "webshopgiftcard"
},
{
"name": "WeChat Pay",
"type": "wechatpayMiniProgram"
},
{
"name": "WeChat Pay",
"type": "wechatpayQR"
},
{
"name": "WeChat Pay",
"type": "wechatpayWeb"
},
{
"name": "WE Fashion Giftcard",
"type": "wefashiongiftcard"
},
{
"name": "Western Union",
"type": "westernunion"
},
{
"name": "Winkel Cheque",
"type": "winkelcheque"
},
{
"name": "WOS Card",
"type": "woscard"
},
{
"name": "Alfa-Click",
"type": "yandex_alfaclick"
},
{
"name": "Pay using bank card",
"type": "yandex_bank_card"
},
{
"name": "Cash terminals",
"type": "yandex_cash"
},
{
"name": "Pay using installments",
"type": "yandex_installments"
},
{
"name": "YooMoney",
"type": "yandex_money"
},
{
"name": "Promsvyazbank",
"type": "yandex_promsvyazbank"
},
{
"name": "SberPay",
"type": "yandex_sberbank"
},
{
"name": "WebMoney",
"type": "yandex_webmoney"
},
{
"name": "Your Gift",
"type": "yourgift"
},
{
"name": "Zip",
"type": "zip"
}
]
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"paymentMethods": [
{
"details": [
{
"items": [
{
"id": "1121",
"name": "Test Issuer"
},
{
"id": "1154",
"name": "Test Issuer 5"
},
{
"id": "1153",
"name": "Test Issuer 4"
},
{
"id": "1152",
"name": "Test Issuer 3"
},
{
"id": "1151",
"name": "Test Issuer 2"
},
{
"id": "1162",
"name": "Test Issuer Cancelled"
},
{
"id": "1161",
"name": "Test Issuer Pending"
},
{
"id": "1160",
"name": "Test Issuer Refused"
},
{
"id": "1159",
"name": "Test Issuer 10"
},
{
"id": "1158",
"name": "Test Issuer 9"
},
{
"id": "1157",
"name": "Test Issuer 8"
},
{
"id": "1156",
"name": "Test Issuer 7"
},
{
"id": "1155",
"name": "Test Issuer 6"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "iDEAL",
"type": "ideal"
},
{
"details": [
{
"key": "encryptedCardNumber",
"type": "cardToken"
},
{
"key": "encryptedSecurityCode",
"type": "cardToken"
},
{
"key": "encryptedExpiryMonth",
"type": "cardToken"
},
{
"key": "encryptedExpiryYear",
"type": "cardToken"
},
{
"key": "holderName",
"optional": true,
"type": "text"
}
],
"name": "Hitelkártya",
"type": "scheme"
},
{
"name": "PayPal",
"type": "paypal"
},
{
"details": [
{
"details": [
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"items": [
{
"id": "M",
"name": "male"
},
{
"id": "F",
"name": "female"
}
],
"key": "gender",
"type": "radio"
},
{
"key": "dateOfBirth",
"type": "date"
},
{
"key": "telephoneNumber",
"type": "tel"
},
{
"key": "shopperEmail",
"type": "emailAddress"
}
],
"key": "personalDetails",
"type": "fieldSet"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "NL",
"name": "Netherlands"
},
{
"id": "BE",
"name": "Belgium"
}
],
"key": "country",
"type": "select",
"value": "NL"
}
],
"key": "billingAddress",
"type": "address"
},
{
"key": "separateDeliveryAddress",
"optional": true,
"type": "boolean",
"value": "false"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "NL",
"name": "Netherlands"
},
{
"id": "BE",
"name": "Belgium"
}
],
"key": "country",
"type": "select",
"value": "NL"
}
],
"key": "deliveryAddress",
"optional": true,
"type": "address"
}
],
"name": "AfterPay Invoice",
"type": "afterpay_default"
},
{
"name": "Pay later with Klarna.",
"type": "klarna"
},
{
"details": [
{
"key": "sepa.ownerName",
"type": "text"
},
{
"key": "sepa.ibanNumber",
"type": "text"
}
],
"name": "SEPA Direct Debit",
"type": "sepadirectdebit"
},
{
"name": "Paysafecard",
"type": "paysafecard"
},
{
"name": "Bijenkorf Cadeaucard",
"type": "bijcadeaucard"
},
{
"name": "Fonq Giftcard",
"type": "fonqgiftcard"
},
{
"name": "Bank Transfer (NL)",
"type": "bankTransfer_NL"
},
{
"name": "Pathe Giftcard",
"type": "pathegiftcard"
},
{
"name": "VVV Giftcard",
"type": "vvvgiftcard"
},
{
"name": "Podium Card",
"type": "podiumcard"
},
{
"name": "RatePay Direct Debit",
"type": "ratepay_directdebit"
},
{
"name": "Rituals Giftcard",
"type": "rituals"
},
{
"name": "Hunkemoller Lingerie Card",
"type": "hmlingerie"
},
{
"name": "Primera Cadeaukaart",
"type": "primeracadeaucard"
},
{
"name": "Fashioncheque",
"type": "fashioncheque"
},
{
"name": "NETELLER",
"type": "neteller"
},
{
"name": "Adyen Voucher",
"type": "adyen_test_voucher"
},
{
"name": "AfterPay B2B",
"type": "afterpay_b2b"
},
{
"name": "AfterPay DirectDebit",
"type": "afterpay_directdebit"
},
{
"name": "AliPay",
"type": "alipay"
},
{
"name": "AliPay",
"type": "alipay_wap"
},
{
"details": [
{
"key": "additionalData.androidpay.token",
"type": "androidPayToken"
}
],
"name": "Android Pay",
"type": "androidpay"
},
{
"details": [
{
"key": "additionalData.applepay.token",
"type": "applePayToken"
}
],
"name": "Apple Pay",
"type": "applepay"
},
{
"name": "Baby Gift Card",
"type": "babygiftcard"
},
{
"name": "SEPA Bank Transfer",
"type": "bankTransfer_IBAN"
},
{
"name": "Bloemen Giftcard",
"type": "bloemengiftcard"
},
{
"name": "Boekenbon Giftcard",
"type": "boekenbon"
},
{
"name": "Cash-Ticket",
"type": "cashticket"
},
{
"name": "Chasin Giftcard",
"type": "chasingiftcard"
},
{
"name": "ClickandBuy",
"type": "clickandbuy"
},
{
"name": "Costes Giftcard",
"type": "costesgiftcard"
},
{
"name": "custom_settlement",
"type": "custom_settlement"
},
{
"name": "eft_directdebit_CA",
"type": "eft_directdebit_CA"
},
{
"name": "Nationale Entertainment Card",
"type": "entertainmentcard"
},
{
"name": "Expert Cadeaukaart",
"type": "expertgiftcard"
},
{
"name": "FijnCadeau",
"type": "fijncadeau"
},
{
"name": "Fleurop Bloemenbon",
"type": "fleuropbloemenbon"
},
{
"name": "Gall & Gall",
"type": "gallgall"
},
{
"name": "Generic GiftCard",
"type": "genericgiftcard"
},
{
"name": "GiftFor2",
"type": "giftfor2card"
},
{
"name": "Givex",
"type": "givex"
},
{
"name": "Goldsmiths Card",
"type": "goldsmithscard"
},
{
"name": "Hunkemoller Member Card",
"type": "hmclub"
},
{
"name": "Phone Payment",
"type": "ivr"
},
{
"name": "Landline phone",
"type": "ivrLandline"
},
{
"name": "Mobile phone",
"type": "ivrMobile"
},
{
"name": "Kado Wereld",
"type": "kadowereld"
},
{
"name": "Karen Millen GiftCard",
"type": "karenmillengiftcard"
},
{
"name": "Leisure Card",
"type": "leisurecard"
},
{
"name": "Loods5 Cadeaukaart",
"type": "loods5giftcard"
},
{
"name": "Loods5 Tegoedbon",
"type": "loods5prepaidcard"
},
{
"details": [
{
"key": "additionalData.amazonPayToken",
"type": "text"
}
],
"name": "Amazon Pay",
"supportsRecurring": true,
"type": "amazonpay"
},
{
"name": "MOLPoints",
"type": "molpay_points"
},
{
"name": "Moneybookers",
"type": "moneybookers"
},
{
"name": "De Nationale Musicalcard",
"type": "musicalcard"
},
{
"name": "Nationale Bioscoopbon",
"type": "nationalebioscoopbon"
},
{
"name": "Nationale Tuinbon",
"type": "nationaletuinbon"
},
{
"name": "Nationale Verwen Cadeaubon",
"type": "nationaleverwencadeaubon"
},
{
"name": "Onebip",
"type": "onebip"
},
{
"details": [
{
"key": "additionalData.paywithgoogle.token",
"type": "payWithGoogleToken"
}
],
"name": "Google Pay",
"type": "paywithgoogle"
},
{
"name": "Plastix",
"type": "plastix"
},
{
"name": "Pluim",
"type": "pluimgiftcard"
},
{
"name": "Illicado Gift Card",
"type": "prosodie_illicado"
},
{
"name": "RatePay Invoice",
"type": "ratepay"
},
{
"name": "Rob Peetoom Giftcard",
"type": "robpeetoomgiftcard"
},
{
"name": "Shoes&Accessories Cadeau",
"type": "sagiftcard"
},
{
"name": "Score Giftcard",
"type": "scoregiftcard"
},
{
"name": "Premium SMS",
"type": "sms"
},
{
"name": "SVS",
"type": "svs"
},
{
"name": "TCS Test GiftCard",
"type": "tcstestgiftcard"
},
{
"name": "The Sting Giftcard",
"type": "thestinggiftcard"
},
{
"name": "Ukash",
"type": "ukash"
},
{
"name": "UnionPay",
"type": "unionpay"
},
{
"name": "Valuelink",
"type": "valuelink"
},
{
"name": "V&D Cadeaukaart",
"type": "vdcadeaucard"
},
{
"details": [
{
"key": "additionalData.visacheckout.callId",
"type": "text"
}
],
"name": "Visa Checkout",
"type": "visacheckout"
},
{
"name": "VVV Cadeaubon",
"type": "vvvcadeaubon"
},
{
"name": "Webshop Giftcard",
"type": "webshopgiftcard"
},
{
"name": "WE Fashion Giftcard",
"type": "wefashiongiftcard"
},
{
"name": "Western Union",
"type": "westernunion"
},
{
"name": "Winkel Cheque",
"type": "winkelcheque"
},
{
"name": "Your Gift",
"type": "yourgift"
}
]
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"paymentMethods": [
{
"details": [
{
"items": [
{
"id": "1121",
"name": "Test Issuer"
},
{
"id": "1154",
"name": "Test Issuer 5"
},
{
"id": "1153",
"name": "Test Issuer 4"
},
{
"id": "1152",
"name": "Test Issuer 3"
},
{
"id": "1151",
"name": "Test Issuer 2"
},
{
"id": "1162",
"name": "Test Issuer Cancelled"
},
{
"id": "1161",
"name": "Test Issuer Pending"
},
{
"id": "1160",
"name": "Test Issuer Refused"
},
{
"id": "1159",
"name": "Test Issuer 10"
},
{
"id": "1158",
"name": "Test Issuer 9"
},
{
"id": "1157",
"name": "Test Issuer 8"
},
{
"id": "1156",
"name": "Test Issuer 7"
},
{
"id": "1155",
"name": "Test Issuer 6"
}
],
"key": "issuer",
"type": "select"
}
],
"name": "iDEAL",
"type": "ideal"
},
{
"details": [
{
"key": "encryptedCardNumber",
"type": "cardToken"
},
{
"key": "encryptedSecurityCode",
"type": "cardToken"
},
{
"key": "encryptedExpiryMonth",
"type": "cardToken"
},
{
"key": "encryptedExpiryYear",
"type": "cardToken"
},
{
"key": "holderName",
"optional": true,
"type": "text"
}
],
"name": "Credit Card",
"type": "scheme"
},
{
"name": "PayPal",
"type": "paypal"
},
{
"details": [
{
"details": [
{
"key": "firstName",
"type": "text"
},
{
"key": "lastName",
"type": "text"
},
{
"items": [
{
"id": "M",
"name": "male"
},
{
"id": "F",
"name": "female"
}
],
"key": "gender",
"type": "radio"
},
{
"key": "dateOfBirth",
"type": "date"
},
{
"key": "telephoneNumber",
"type": "tel"
},
{
"key": "shopperEmail",
"type": "emailAddress"
}
],
"key": "personalDetails",
"type": "fieldSet"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "NL",
"name": "Netherlands"
},
{
"id": "BE",
"name": "Belgium"
}
],
"key": "country",
"type": "select",
"value": "NL"
}
],
"key": "billingAddress",
"type": "address"
},
{
"key": "separateDeliveryAddress",
"optional": true,
"type": "boolean",
"value": "false"
},
{
"details": [
{
"key": "street",
"type": "text"
},
{
"key": "houseNumberOrName",
"type": "text"
},
{
"key": "city",
"type": "text"
},
{
"key": "postalCode",
"type": "text"
},
{
"key": "stateOrProvince",
"optional": true,
"type": "text"
},
{
"items": [
{
"id": "NL",
"name": "Netherlands"
},
{
"id": "BE",
"name": "Belgium"
}
],
"key": "country",
"type": "select",
"value": "NL"
}
],
"key": "deliveryAddress",
"optional": true,
"type": "address"
}
],
"name": "AfterPay Invoice",
"type": "afterpay_default"
},
{
"name": "Pay later with Klarna.",
"type": "klarna"
},
{
"details": [
{
"key": "sepa.ownerName",
"type": "text"
},
{
"key": "sepa.ibanNumber",
"type": "text"
}
],
"name": "SEPA Direct Debit",
"type": "sepadirectdebit"
},
{
"name": "Paysafecard",
"type": "paysafecard"
},
{
"name": "Bijenkorf Cadeaucard",
"type": "bijcadeaucard"
},
{
"name": "Fonq Giftcard",
"type": "fonqgiftcard"
},
{
"name": "Bank Transfer (NL)",
"type": "bankTransfer_NL"
},
{
"name": "Pathe Giftcard",
"type": "pathegiftcard"
},
{
"name": "VVV Giftcard",
"type": "vvvgiftcard"
},
{
"name": "Podium Card",
"type": "podiumcard"
},
{
"name": "RatePay Direct Debit",
"type": "ratepay_directdebit"
},
{
"name": "Rituals Giftcard",
"type": "rituals"
},
{
"name": "Hunkemoller Lingerie Card",
"type": "hmlingerie"
},
{
"name": "Primera Cadeaukaart",
"type": "primeracadeaucard"
},
{
"name": "Fashioncheque",
"type": "fashioncheque"
},
{
"name": "NETELLER",
"type": "neteller"
},
{
"name": "Adyen Voucher",
"type": "adyen_test_voucher"
},
{
"name": "AfterPay B2B",
"type": "afterpay_b2b"
},
{
"name": "AfterPay DirectDebit",
"type": "afterpay_directdebit"
},
{
"name": "AliPay",
"type": "alipay"
},
{
"name": "AliPay",
"type": "alipay_wap"
},
{
"details": [
{
"key": "additionalData.androidpay.token",
"type": "androidPayToken"
}
],
"name": "Android Pay",
"type": "androidpay"
},
{
"details": [
{
"key": "additionalData.applepay.token",
"type": "applePayToken"
}
],
"name": "Apple Pay",
"type": "applepay"
},
{
"name": "Baby Gift Card",
"type": "babygiftcard"
},
{
"name": "SEPA Bank Transfer",
"type": "bankTransfer_IBAN"
},
{
"name": "Bloemen Giftcard",
"type": "bloemengiftcard"
},
{
"name": "Boekenbon Giftcard",
"type": "boekenbon"
},
{
"name": "Cash-Ticket",
"type": "cashticket"
},
{
"name": "Chasin Giftcard",
"type": "chasingiftcard"
},
{
"name": "ClickandBuy",
"type": "clickandbuy"
},
{
"name": "Costes Giftcard",
"type": "costesgiftcard"
},
{
"name": "custom_settlement",
"type": "custom_settlement"
},
{
"name": "eft_directdebit_CA",
"type": "eft_directdebit_CA"
},
{
"name": "Nationale Entertainment Card",
"type": "entertainmentcard"
},
{
"name": "Expert Cadeaukaart",
"type": "expertgiftcard"
},
{
"name": "FijnCadeau",
"type": "fijncadeau"
},
{
"name": "Fleurop Bloemenbon",
"type": "fleuropbloemenbon"
},
{
"name": "Gall & Gall",
"type": "gallgall"
},
{
"name": "Generic GiftCard",
"type": "genericgiftcard"
},
{
"name": "GiftFor2",
"type": "giftfor2card"
},
{
"name": "Givex",
"type": "givex"
},
{
"name": "Goldsmiths Card",
"type": "goldsmithscard"
},
{
"name": "Hunkemoller Member Card",
"type": "hmclub"
},
{
"name": "Phone Payment",
"type": "ivr"
},
{
"name": "Landline phone",
"type": "ivrLandline"
},
{
"name": "Mobile phone",
"type": "ivrMobile"
},
{
"name": "Kado Wereld",
"type": "kadowereld"
},
{
"name": "Karen Millen GiftCard",
"type": "karenmillengiftcard"
},
{
"name": "Leisure Card",
"type": "leisurecard"
},
{
"name": "Loods5 Cadeaukaart",
"type": "loods5giftcard"
},
{
"name": "Loods5 Tegoedbon",
"type": "loods5prepaidcard"
},
{
"details": [
{
"key": "additionalData.amazonPayToken",
"type": "text"
}
],
"name": "Amazon Pay",
"supportsRecurring": true,
"type": "amazonpay"
},
{
"name": "MOLPoints",
"type": "molpay_points"
},
{
"name": "Moneybookers",
"type": "moneybookers"
},
{
"name": "De Nationale Musicalcard",
"type": "musicalcard"
},
{
"name": "Nationale Bioscoopbon",
"type": "nationalebioscoopbon"
},
{
"name": "Nationale Tuinbon",
"type": "nationaletuinbon"
},
{
"name": "Nationale Verwen Cadeaubon",
"type": "nationaleverwencadeaubon"
},
{
"name": "Onebip",
"type": "onebip"
},
{
"details": [
{
"key": "additionalData.paywithgoogle.token",
"type": "payWithGoogleToken"
}
],
"name": "Google Pay",
"type": "paywithgoogle"
},
{
"name": "Plastix",
"type": "plastix"
},
{
"name": "Pluim",
"type": "pluimgiftcard"
},
{
"name": "Illicado Gift Card",
"type": "prosodie_illicado"
},
{
"name": "RatePay Invoice",
"type": "ratepay"
},
{
"name": "Rob Peetoom Giftcard",
"type": "robpeetoomgiftcard"
},
{
"name": "Shoes&Accessories Cadeau",
"type": "sagiftcard"
},
{
"name": "Score Giftcard",
"type": "scoregiftcard"
},
{
"name": "Premium SMS",
"type": "sms"
},
{
"name": "SVS",
"type": "svs"
},
{
"name": "TCS Test GiftCard",
"type": "tcstestgiftcard"
},
{
"name": "The Sting Giftcard",
"type": "thestinggiftcard"
},
{
"name": "Ukash",
"type": "ukash"
},
{
"name": "UnionPay",
"type": "unionpay"
},
{
"name": "Valuelink",
"type": "valuelink"
},
{
"name": "V&D Cadeaukaart",
"type": "vdcadeaucard"
},
{
"details": [
{
"key": "additionalData.visacheckout.callId",
"type": "text"
}
],
"name": "Visa Checkout",
"type": "visacheckout"
},
{
"name": "VVV Cadeaubon",
"type": "vvvcadeaubon"
},
{
"name": "Webshop Giftcard",
"type": "webshopgiftcard"
},
{
"name": "WE Fashion Giftcard",
"type": "wefashiongiftcard"
},
{
"name": "Western Union",
"type": "westernunion"
},
{
"name": "Winkel Cheque",
"type": "winkelcheque"
},
{
"name": "Your Gift",
"type": "yourgift"
}
]
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Get the list of brands on the card
{{baseUrl}}/cardDetails
BODY json
{
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/cardDetails");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/cardDetails" {:content-type :json
:form-params {:cardNumber ""
:countryCode ""
:encryptedCardNumber ""
:merchantAccount ""
:supportedBrands []}})
require "http/client"
url = "{{baseUrl}}/cardDetails"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/cardDetails"),
Content = new StringContent("{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/cardDetails");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/cardDetails"
payload := strings.NewReader("{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/cardDetails HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 122
{
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/cardDetails")
.setHeader("content-type", "application/json")
.setBody("{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/cardDetails"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/cardDetails")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/cardDetails")
.header("content-type", "application/json")
.body("{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}")
.asString();
const data = JSON.stringify({
cardNumber: '',
countryCode: '',
encryptedCardNumber: '',
merchantAccount: '',
supportedBrands: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/cardDetails');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/cardDetails',
headers: {'content-type': 'application/json'},
data: {
cardNumber: '',
countryCode: '',
encryptedCardNumber: '',
merchantAccount: '',
supportedBrands: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/cardDetails';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cardNumber":"","countryCode":"","encryptedCardNumber":"","merchantAccount":"","supportedBrands":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/cardDetails',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "cardNumber": "",\n "countryCode": "",\n "encryptedCardNumber": "",\n "merchantAccount": "",\n "supportedBrands": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/cardDetails")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/cardDetails',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
cardNumber: '',
countryCode: '',
encryptedCardNumber: '',
merchantAccount: '',
supportedBrands: []
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/cardDetails',
headers: {'content-type': 'application/json'},
body: {
cardNumber: '',
countryCode: '',
encryptedCardNumber: '',
merchantAccount: '',
supportedBrands: []
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/cardDetails');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
cardNumber: '',
countryCode: '',
encryptedCardNumber: '',
merchantAccount: '',
supportedBrands: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/cardDetails',
headers: {'content-type': 'application/json'},
data: {
cardNumber: '',
countryCode: '',
encryptedCardNumber: '',
merchantAccount: '',
supportedBrands: []
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/cardDetails';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"cardNumber":"","countryCode":"","encryptedCardNumber":"","merchantAccount":"","supportedBrands":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"cardNumber": @"",
@"countryCode": @"",
@"encryptedCardNumber": @"",
@"merchantAccount": @"",
@"supportedBrands": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/cardDetails"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/cardDetails" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/cardDetails",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cardNumber' => '',
'countryCode' => '',
'encryptedCardNumber' => '',
'merchantAccount' => '',
'supportedBrands' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/cardDetails', [
'body' => '{
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/cardDetails');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'cardNumber' => '',
'countryCode' => '',
'encryptedCardNumber' => '',
'merchantAccount' => '',
'supportedBrands' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'cardNumber' => '',
'countryCode' => '',
'encryptedCardNumber' => '',
'merchantAccount' => '',
'supportedBrands' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/cardDetails');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/cardDetails' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/cardDetails' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/cardDetails", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/cardDetails"
payload = {
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": []
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/cardDetails"
payload <- "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/cardDetails")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/cardDetails') do |req|
req.body = "{\n \"cardNumber\": \"\",\n \"countryCode\": \"\",\n \"encryptedCardNumber\": \"\",\n \"merchantAccount\": \"\",\n \"supportedBrands\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/cardDetails";
let payload = json!({
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": ()
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/cardDetails \
--header 'content-type: application/json' \
--data '{
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": []
}'
echo '{
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": []
}' | \
http POST {{baseUrl}}/cardDetails \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "cardNumber": "",\n "countryCode": "",\n "encryptedCardNumber": "",\n "merchantAccount": "",\n "supportedBrands": []\n}' \
--output-document \
- {{baseUrl}}/cardDetails
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"cardNumber": "",
"countryCode": "",
"encryptedCardNumber": "",
"merchantAccount": "",
"supportedBrands": []
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/cardDetails")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"brands": [
{
"supported": true,
"type": "visa"
},
{
"supported": true,
"type": "cartebancaire"
}
]
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"brands": [
{
"supported": true,
"type": "visa"
},
{
"supported": false,
"type": "cartebancaire"
}
]
}
POST
Start a transaction for donations
{{baseUrl}}/donations
BODY json
{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/donations");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/donations" {:content-type :json
:form-params {:accountInfo {:accountAgeIndicator ""
:accountChangeDate ""
:accountChangeIndicator ""
:accountCreationDate ""
:accountType ""
:addCardAttemptsDay 0
:deliveryAddressUsageDate ""
:deliveryAddressUsageIndicator ""
:homePhone ""
:mobilePhone ""
:passwordChangeDate ""
:passwordChangeIndicator ""
:pastTransactionsDay 0
:pastTransactionsYear 0
:paymentAccountAge ""
:paymentAccountIndicator ""
:purchasesLast6Months 0
:suspiciousActivity false
:workPhone ""}
:additionalAmount {:currency ""
:value 0}
:additionalData {}
:amount {}
:applicationInfo {:adyenLibrary {:name ""
:version ""}
:adyenPaymentSource {}
:externalPlatform {:integrator ""
:name ""
:version ""}
:merchantApplication {}
:merchantDevice {:os ""
:osVersion ""
:reference ""}
:shopperInteractionDevice {:locale ""
:os ""
:osVersion ""}}
:authenticationData {:attemptAuthentication ""
:authenticationOnly false
:threeDSRequestData {:challengeWindowSize ""
:dataOnly ""
:nativeThreeDS ""
:threeDSVersion ""}}
:billingAddress {:city ""
:country ""
:houseNumberOrName ""
:postalCode ""
:stateOrProvince ""
:street ""}
:browserInfo {:acceptHeader ""
:colorDepth 0
:javaEnabled false
:javaScriptEnabled false
:language ""
:screenHeight 0
:screenWidth 0
:timeZoneOffset 0
:userAgent ""}
:captureDelayHours 0
:channel ""
:checkoutAttemptId ""
:company {:homepage ""
:name ""
:registrationNumber ""
:registryLocation ""
:taxId ""
:type ""}
:conversionId ""
:countryCode ""
:dateOfBirth ""
:dccQuote {:account ""
:accountType ""
:baseAmount {}
:basePoints 0
:buy {}
:interbank {}
:reference ""
:sell {}
:signature ""
:source ""
:type ""
:validTill ""}
:deliveryAddress {}
:deliveryDate ""
:deviceFingerprint ""
:donationAccount ""
:donationOriginalPspReference ""
:donationToken ""
:enableOneClick false
:enablePayOut false
:enableRecurring false
:entityType ""
:fraudOffset 0
:industryUsage ""
:installments {:plan ""
:value 0}
:lineItems [{:amountExcludingTax 0
:amountIncludingTax 0
:brand ""
:color ""
:description ""
:id ""
:imageUrl ""
:itemCategory ""
:manufacturer ""
:productUrl ""
:quantity 0
:receiverEmail ""
:size ""
:sku ""
:taxAmount 0
:taxPercentage 0
:upc ""}]
:localizedShopperStatement {}
:mandate {:amount ""
:amountRule ""
:billingAttemptsRule ""
:billingDay ""
:endsAt ""
:frequency ""
:remarks ""
:startsAt ""}
:mcc ""
:merchantAccount ""
:merchantOrderReference ""
:merchantRiskIndicator {:addressMatch false
:deliveryAddressIndicator ""
:deliveryEmail ""
:deliveryEmailAddress ""
:deliveryTimeframe ""
:giftCardAmount {}
:giftCardCount 0
:giftCardCurr ""
:preOrderDate ""
:preOrderPurchase false
:preOrderPurchaseInd ""
:reorderItems false
:reorderItemsInd ""
:shipIndicator ""}
:metadata {}
:mpiData {:authenticationResponse ""
:cavv ""
:cavvAlgorithm ""
:challengeCancel ""
:directoryResponse ""
:dsTransID ""
:eci ""
:riskScore ""
:threeDSVersion ""
:tokenAuthenticationVerificationValue ""
:transStatusReason ""
:xid ""}
:order {:orderData ""
:pspReference ""}
:orderReference ""
:origin ""
:paymentMethod ""
:platformChargebackLogic {:behavior ""
:costAllocationAccount ""
:targetAccount ""}
:recurringExpiry ""
:recurringFrequency ""
:recurringProcessingModel ""
:redirectFromIssuerMethod ""
:redirectToIssuerMethod ""
:reference ""
:returnUrl ""
:riskData {:clientData ""
:customFields {}
:fraudOffset 0
:profileReference ""}
:sessionValidity ""
:shopperEmail ""
:shopperIP ""
:shopperInteraction ""
:shopperLocale ""
:shopperName {:firstName ""
:lastName ""}
:shopperReference ""
:shopperStatement ""
:socialSecurityNumber ""
:splits [{:account ""
:amount {:currency ""
:value 0}
:description ""
:reference ""
:type ""}]
:store ""
:storePaymentMethod false
:telephoneNumber ""
:threeDS2RequestData {:acctInfo {:chAccAgeInd ""
:chAccChange ""
:chAccChangeInd ""
:chAccPwChange ""
:chAccPwChangeInd ""
:chAccString ""
:nbPurchaseAccount ""
:paymentAccAge ""
:paymentAccInd ""
:provisionAttemptsDay ""
:shipAddressUsage ""
:shipAddressUsageInd ""
:shipNameIndicator ""
:suspiciousAccActivity ""
:txnActivityDay ""
:txnActivityYear ""}
:acctType ""
:acquirerBIN ""
:acquirerMerchantID ""
:addrMatch ""
:authenticationOnly false
:challengeIndicator ""
:deviceChannel ""
:deviceRenderOptions {:sdkInterface ""
:sdkUiType []}
:homePhone {:cc ""
:subscriber ""}
:mcc ""
:merchantName ""
:messageVersion ""
:mobilePhone {}
:notificationURL ""
:payTokenInd false
:paymentAuthenticationUseCase ""
:purchaseInstalData ""
:recurringExpiry ""
:recurringFrequency ""
:sdkAppID ""
:sdkEncData ""
:sdkEphemPubKey {:crv ""
:kty ""
:x ""
:y ""}
:sdkMaxTimeout 0
:sdkReferenceNumber ""
:sdkTransID ""
:sdkVersion ""
:threeDSCompInd ""
:threeDSRequestorAuthenticationInd ""
:threeDSRequestorAuthenticationInfo {:threeDSReqAuthData ""
:threeDSReqAuthMethod ""
:threeDSReqAuthTimestamp ""}
:threeDSRequestorChallengeInd ""
:threeDSRequestorID ""
:threeDSRequestorName ""
:threeDSRequestorPriorAuthenticationInfo {:threeDSReqPriorAuthData ""
:threeDSReqPriorAuthMethod ""
:threeDSReqPriorAuthTimestamp ""
:threeDSReqPriorRef ""}
:threeDSRequestorURL ""
:transType ""
:transactionType ""
:whiteListStatus ""
:workPhone {}}
:threeDSAuthenticationOnly false
:trustedShopper false}})
require "http/client"
url = "{{baseUrl}}/donations"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/donations"),
Content = new StringContent("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/donations");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/donations"
payload := strings.NewReader("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/donations HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 7291
{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/donations")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/donations"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/donations")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/donations")
.header("content-type", "application/json")
.body("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
.asString();
const data = JSON.stringify({
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {
currency: '',
value: 0
},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {
challengeWindowSize: '',
dataOnly: '',
nativeThreeDS: '',
threeDSVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
donationAccount: '',
donationOriginalPspReference: '',
donationToken: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {
plan: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {
orderData: '',
pspReference: ''
},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {
behavior: '',
costAllocationAccount: '',
targetAccount: ''
},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {
clientData: '',
customFields: {},
fraudOffset: 0,
profileReference: ''
},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {
sdkInterface: '',
sdkUiType: []
},
homePhone: {
cc: '',
subscriber: ''
},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {
crv: '',
kty: '',
x: '',
y: ''
},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {
threeDSReqAuthData: '',
threeDSReqAuthMethod: '',
threeDSReqAuthTimestamp: ''
},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/donations');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/donations',
headers: {'content-type': 'application/json'},
data: {
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {challengeWindowSize: '', dataOnly: '', nativeThreeDS: '', threeDSVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
donationAccount: '',
donationOriginalPspReference: '',
donationToken: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {orderData: '', pspReference: ''},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/donations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountInfo":{"accountAgeIndicator":"","accountChangeDate":"","accountChangeIndicator":"","accountCreationDate":"","accountType":"","addCardAttemptsDay":0,"deliveryAddressUsageDate":"","deliveryAddressUsageIndicator":"","homePhone":"","mobilePhone":"","passwordChangeDate":"","passwordChangeIndicator":"","pastTransactionsDay":0,"pastTransactionsYear":0,"paymentAccountAge":"","paymentAccountIndicator":"","purchasesLast6Months":0,"suspiciousActivity":false,"workPhone":""},"additionalAmount":{"currency":"","value":0},"additionalData":{},"amount":{},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"authenticationData":{"attemptAuthentication":"","authenticationOnly":false,"threeDSRequestData":{"challengeWindowSize":"","dataOnly":"","nativeThreeDS":"","threeDSVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"browserInfo":{"acceptHeader":"","colorDepth":0,"javaEnabled":false,"javaScriptEnabled":false,"language":"","screenHeight":0,"screenWidth":0,"timeZoneOffset":0,"userAgent":""},"captureDelayHours":0,"channel":"","checkoutAttemptId":"","company":{"homepage":"","name":"","registrationNumber":"","registryLocation":"","taxId":"","type":""},"conversionId":"","countryCode":"","dateOfBirth":"","dccQuote":{"account":"","accountType":"","baseAmount":{},"basePoints":0,"buy":{},"interbank":{},"reference":"","sell":{},"signature":"","source":"","type":"","validTill":""},"deliveryAddress":{},"deliveryDate":"","deviceFingerprint":"","donationAccount":"","donationOriginalPspReference":"","donationToken":"","enableOneClick":false,"enablePayOut":false,"enableRecurring":false,"entityType":"","fraudOffset":0,"industryUsage":"","installments":{"plan":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"localizedShopperStatement":{},"mandate":{"amount":"","amountRule":"","billingAttemptsRule":"","billingDay":"","endsAt":"","frequency":"","remarks":"","startsAt":""},"mcc":"","merchantAccount":"","merchantOrderReference":"","merchantRiskIndicator":{"addressMatch":false,"deliveryAddressIndicator":"","deliveryEmail":"","deliveryEmailAddress":"","deliveryTimeframe":"","giftCardAmount":{},"giftCardCount":0,"giftCardCurr":"","preOrderDate":"","preOrderPurchase":false,"preOrderPurchaseInd":"","reorderItems":false,"reorderItemsInd":"","shipIndicator":""},"metadata":{},"mpiData":{"authenticationResponse":"","cavv":"","cavvAlgorithm":"","challengeCancel":"","directoryResponse":"","dsTransID":"","eci":"","riskScore":"","threeDSVersion":"","tokenAuthenticationVerificationValue":"","transStatusReason":"","xid":""},"order":{"orderData":"","pspReference":""},"orderReference":"","origin":"","paymentMethod":"","platformChargebackLogic":{"behavior":"","costAllocationAccount":"","targetAccount":""},"recurringExpiry":"","recurringFrequency":"","recurringProcessingModel":"","redirectFromIssuerMethod":"","redirectToIssuerMethod":"","reference":"","returnUrl":"","riskData":{"clientData":"","customFields":{},"fraudOffset":0,"profileReference":""},"sessionValidity":"","shopperEmail":"","shopperIP":"","shopperInteraction":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","socialSecurityNumber":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","storePaymentMethod":false,"telephoneNumber":"","threeDS2RequestData":{"acctInfo":{"chAccAgeInd":"","chAccChange":"","chAccChangeInd":"","chAccPwChange":"","chAccPwChangeInd":"","chAccString":"","nbPurchaseAccount":"","paymentAccAge":"","paymentAccInd":"","provisionAttemptsDay":"","shipAddressUsage":"","shipAddressUsageInd":"","shipNameIndicator":"","suspiciousAccActivity":"","txnActivityDay":"","txnActivityYear":""},"acctType":"","acquirerBIN":"","acquirerMerchantID":"","addrMatch":"","authenticationOnly":false,"challengeIndicator":"","deviceChannel":"","deviceRenderOptions":{"sdkInterface":"","sdkUiType":[]},"homePhone":{"cc":"","subscriber":""},"mcc":"","merchantName":"","messageVersion":"","mobilePhone":{},"notificationURL":"","payTokenInd":false,"paymentAuthenticationUseCase":"","purchaseInstalData":"","recurringExpiry":"","recurringFrequency":"","sdkAppID":"","sdkEncData":"","sdkEphemPubKey":{"crv":"","kty":"","x":"","y":""},"sdkMaxTimeout":0,"sdkReferenceNumber":"","sdkTransID":"","sdkVersion":"","threeDSCompInd":"","threeDSRequestorAuthenticationInd":"","threeDSRequestorAuthenticationInfo":{"threeDSReqAuthData":"","threeDSReqAuthMethod":"","threeDSReqAuthTimestamp":""},"threeDSRequestorChallengeInd":"","threeDSRequestorID":"","threeDSRequestorName":"","threeDSRequestorPriorAuthenticationInfo":{"threeDSReqPriorAuthData":"","threeDSReqPriorAuthMethod":"","threeDSReqPriorAuthTimestamp":"","threeDSReqPriorRef":""},"threeDSRequestorURL":"","transType":"","transactionType":"","whiteListStatus":"","workPhone":{}},"threeDSAuthenticationOnly":false,"trustedShopper":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/donations',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountInfo": {\n "accountAgeIndicator": "",\n "accountChangeDate": "",\n "accountChangeIndicator": "",\n "accountCreationDate": "",\n "accountType": "",\n "addCardAttemptsDay": 0,\n "deliveryAddressUsageDate": "",\n "deliveryAddressUsageIndicator": "",\n "homePhone": "",\n "mobilePhone": "",\n "passwordChangeDate": "",\n "passwordChangeIndicator": "",\n "pastTransactionsDay": 0,\n "pastTransactionsYear": 0,\n "paymentAccountAge": "",\n "paymentAccountIndicator": "",\n "purchasesLast6Months": 0,\n "suspiciousActivity": false,\n "workPhone": ""\n },\n "additionalAmount": {\n "currency": "",\n "value": 0\n },\n "additionalData": {},\n "amount": {},\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "authenticationData": {\n "attemptAuthentication": "",\n "authenticationOnly": false,\n "threeDSRequestData": {\n "challengeWindowSize": "",\n "dataOnly": "",\n "nativeThreeDS": "",\n "threeDSVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "browserInfo": {\n "acceptHeader": "",\n "colorDepth": 0,\n "javaEnabled": false,\n "javaScriptEnabled": false,\n "language": "",\n "screenHeight": 0,\n "screenWidth": 0,\n "timeZoneOffset": 0,\n "userAgent": ""\n },\n "captureDelayHours": 0,\n "channel": "",\n "checkoutAttemptId": "",\n "company": {\n "homepage": "",\n "name": "",\n "registrationNumber": "",\n "registryLocation": "",\n "taxId": "",\n "type": ""\n },\n "conversionId": "",\n "countryCode": "",\n "dateOfBirth": "",\n "dccQuote": {\n "account": "",\n "accountType": "",\n "baseAmount": {},\n "basePoints": 0,\n "buy": {},\n "interbank": {},\n "reference": "",\n "sell": {},\n "signature": "",\n "source": "",\n "type": "",\n "validTill": ""\n },\n "deliveryAddress": {},\n "deliveryDate": "",\n "deviceFingerprint": "",\n "donationAccount": "",\n "donationOriginalPspReference": "",\n "donationToken": "",\n "enableOneClick": false,\n "enablePayOut": false,\n "enableRecurring": false,\n "entityType": "",\n "fraudOffset": 0,\n "industryUsage": "",\n "installments": {\n "plan": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "localizedShopperStatement": {},\n "mandate": {\n "amount": "",\n "amountRule": "",\n "billingAttemptsRule": "",\n "billingDay": "",\n "endsAt": "",\n "frequency": "",\n "remarks": "",\n "startsAt": ""\n },\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "merchantRiskIndicator": {\n "addressMatch": false,\n "deliveryAddressIndicator": "",\n "deliveryEmail": "",\n "deliveryEmailAddress": "",\n "deliveryTimeframe": "",\n "giftCardAmount": {},\n "giftCardCount": 0,\n "giftCardCurr": "",\n "preOrderDate": "",\n "preOrderPurchase": false,\n "preOrderPurchaseInd": "",\n "reorderItems": false,\n "reorderItemsInd": "",\n "shipIndicator": ""\n },\n "metadata": {},\n "mpiData": {\n "authenticationResponse": "",\n "cavv": "",\n "cavvAlgorithm": "",\n "challengeCancel": "",\n "directoryResponse": "",\n "dsTransID": "",\n "eci": "",\n "riskScore": "",\n "threeDSVersion": "",\n "tokenAuthenticationVerificationValue": "",\n "transStatusReason": "",\n "xid": ""\n },\n "order": {\n "orderData": "",\n "pspReference": ""\n },\n "orderReference": "",\n "origin": "",\n "paymentMethod": "",\n "platformChargebackLogic": {\n "behavior": "",\n "costAllocationAccount": "",\n "targetAccount": ""\n },\n "recurringExpiry": "",\n "recurringFrequency": "",\n "recurringProcessingModel": "",\n "redirectFromIssuerMethod": "",\n "redirectToIssuerMethod": "",\n "reference": "",\n "returnUrl": "",\n "riskData": {\n "clientData": "",\n "customFields": {},\n "fraudOffset": 0,\n "profileReference": ""\n },\n "sessionValidity": "",\n "shopperEmail": "",\n "shopperIP": "",\n "shopperInteraction": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "socialSecurityNumber": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "storePaymentMethod": false,\n "telephoneNumber": "",\n "threeDS2RequestData": {\n "acctInfo": {\n "chAccAgeInd": "",\n "chAccChange": "",\n "chAccChangeInd": "",\n "chAccPwChange": "",\n "chAccPwChangeInd": "",\n "chAccString": "",\n "nbPurchaseAccount": "",\n "paymentAccAge": "",\n "paymentAccInd": "",\n "provisionAttemptsDay": "",\n "shipAddressUsage": "",\n "shipAddressUsageInd": "",\n "shipNameIndicator": "",\n "suspiciousAccActivity": "",\n "txnActivityDay": "",\n "txnActivityYear": ""\n },\n "acctType": "",\n "acquirerBIN": "",\n "acquirerMerchantID": "",\n "addrMatch": "",\n "authenticationOnly": false,\n "challengeIndicator": "",\n "deviceChannel": "",\n "deviceRenderOptions": {\n "sdkInterface": "",\n "sdkUiType": []\n },\n "homePhone": {\n "cc": "",\n "subscriber": ""\n },\n "mcc": "",\n "merchantName": "",\n "messageVersion": "",\n "mobilePhone": {},\n "notificationURL": "",\n "payTokenInd": false,\n "paymentAuthenticationUseCase": "",\n "purchaseInstalData": "",\n "recurringExpiry": "",\n "recurringFrequency": "",\n "sdkAppID": "",\n "sdkEncData": "",\n "sdkEphemPubKey": {\n "crv": "",\n "kty": "",\n "x": "",\n "y": ""\n },\n "sdkMaxTimeout": 0,\n "sdkReferenceNumber": "",\n "sdkTransID": "",\n "sdkVersion": "",\n "threeDSCompInd": "",\n "threeDSRequestorAuthenticationInd": "",\n "threeDSRequestorAuthenticationInfo": {\n "threeDSReqAuthData": "",\n "threeDSReqAuthMethod": "",\n "threeDSReqAuthTimestamp": ""\n },\n "threeDSRequestorChallengeInd": "",\n "threeDSRequestorID": "",\n "threeDSRequestorName": "",\n "threeDSRequestorPriorAuthenticationInfo": {\n "threeDSReqPriorAuthData": "",\n "threeDSReqPriorAuthMethod": "",\n "threeDSReqPriorAuthTimestamp": "",\n "threeDSReqPriorRef": ""\n },\n "threeDSRequestorURL": "",\n "transType": "",\n "transactionType": "",\n "whiteListStatus": "",\n "workPhone": {}\n },\n "threeDSAuthenticationOnly": false,\n "trustedShopper": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/donations")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/donations',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {challengeWindowSize: '', dataOnly: '', nativeThreeDS: '', threeDSVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
donationAccount: '',
donationOriginalPspReference: '',
donationToken: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {orderData: '', pspReference: ''},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/donations',
headers: {'content-type': 'application/json'},
body: {
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {challengeWindowSize: '', dataOnly: '', nativeThreeDS: '', threeDSVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
donationAccount: '',
donationOriginalPspReference: '',
donationToken: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {orderData: '', pspReference: ''},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/donations');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {
currency: '',
value: 0
},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {
challengeWindowSize: '',
dataOnly: '',
nativeThreeDS: '',
threeDSVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
donationAccount: '',
donationOriginalPspReference: '',
donationToken: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {
plan: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {
orderData: '',
pspReference: ''
},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {
behavior: '',
costAllocationAccount: '',
targetAccount: ''
},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {
clientData: '',
customFields: {},
fraudOffset: 0,
profileReference: ''
},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {
sdkInterface: '',
sdkUiType: []
},
homePhone: {
cc: '',
subscriber: ''
},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {
crv: '',
kty: '',
x: '',
y: ''
},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {
threeDSReqAuthData: '',
threeDSReqAuthMethod: '',
threeDSReqAuthTimestamp: ''
},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/donations',
headers: {'content-type': 'application/json'},
data: {
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {challengeWindowSize: '', dataOnly: '', nativeThreeDS: '', threeDSVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
donationAccount: '',
donationOriginalPspReference: '',
donationToken: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {orderData: '', pspReference: ''},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/donations';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountInfo":{"accountAgeIndicator":"","accountChangeDate":"","accountChangeIndicator":"","accountCreationDate":"","accountType":"","addCardAttemptsDay":0,"deliveryAddressUsageDate":"","deliveryAddressUsageIndicator":"","homePhone":"","mobilePhone":"","passwordChangeDate":"","passwordChangeIndicator":"","pastTransactionsDay":0,"pastTransactionsYear":0,"paymentAccountAge":"","paymentAccountIndicator":"","purchasesLast6Months":0,"suspiciousActivity":false,"workPhone":""},"additionalAmount":{"currency":"","value":0},"additionalData":{},"amount":{},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"authenticationData":{"attemptAuthentication":"","authenticationOnly":false,"threeDSRequestData":{"challengeWindowSize":"","dataOnly":"","nativeThreeDS":"","threeDSVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"browserInfo":{"acceptHeader":"","colorDepth":0,"javaEnabled":false,"javaScriptEnabled":false,"language":"","screenHeight":0,"screenWidth":0,"timeZoneOffset":0,"userAgent":""},"captureDelayHours":0,"channel":"","checkoutAttemptId":"","company":{"homepage":"","name":"","registrationNumber":"","registryLocation":"","taxId":"","type":""},"conversionId":"","countryCode":"","dateOfBirth":"","dccQuote":{"account":"","accountType":"","baseAmount":{},"basePoints":0,"buy":{},"interbank":{},"reference":"","sell":{},"signature":"","source":"","type":"","validTill":""},"deliveryAddress":{},"deliveryDate":"","deviceFingerprint":"","donationAccount":"","donationOriginalPspReference":"","donationToken":"","enableOneClick":false,"enablePayOut":false,"enableRecurring":false,"entityType":"","fraudOffset":0,"industryUsage":"","installments":{"plan":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"localizedShopperStatement":{},"mandate":{"amount":"","amountRule":"","billingAttemptsRule":"","billingDay":"","endsAt":"","frequency":"","remarks":"","startsAt":""},"mcc":"","merchantAccount":"","merchantOrderReference":"","merchantRiskIndicator":{"addressMatch":false,"deliveryAddressIndicator":"","deliveryEmail":"","deliveryEmailAddress":"","deliveryTimeframe":"","giftCardAmount":{},"giftCardCount":0,"giftCardCurr":"","preOrderDate":"","preOrderPurchase":false,"preOrderPurchaseInd":"","reorderItems":false,"reorderItemsInd":"","shipIndicator":""},"metadata":{},"mpiData":{"authenticationResponse":"","cavv":"","cavvAlgorithm":"","challengeCancel":"","directoryResponse":"","dsTransID":"","eci":"","riskScore":"","threeDSVersion":"","tokenAuthenticationVerificationValue":"","transStatusReason":"","xid":""},"order":{"orderData":"","pspReference":""},"orderReference":"","origin":"","paymentMethod":"","platformChargebackLogic":{"behavior":"","costAllocationAccount":"","targetAccount":""},"recurringExpiry":"","recurringFrequency":"","recurringProcessingModel":"","redirectFromIssuerMethod":"","redirectToIssuerMethod":"","reference":"","returnUrl":"","riskData":{"clientData":"","customFields":{},"fraudOffset":0,"profileReference":""},"sessionValidity":"","shopperEmail":"","shopperIP":"","shopperInteraction":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","socialSecurityNumber":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","storePaymentMethod":false,"telephoneNumber":"","threeDS2RequestData":{"acctInfo":{"chAccAgeInd":"","chAccChange":"","chAccChangeInd":"","chAccPwChange":"","chAccPwChangeInd":"","chAccString":"","nbPurchaseAccount":"","paymentAccAge":"","paymentAccInd":"","provisionAttemptsDay":"","shipAddressUsage":"","shipAddressUsageInd":"","shipNameIndicator":"","suspiciousAccActivity":"","txnActivityDay":"","txnActivityYear":""},"acctType":"","acquirerBIN":"","acquirerMerchantID":"","addrMatch":"","authenticationOnly":false,"challengeIndicator":"","deviceChannel":"","deviceRenderOptions":{"sdkInterface":"","sdkUiType":[]},"homePhone":{"cc":"","subscriber":""},"mcc":"","merchantName":"","messageVersion":"","mobilePhone":{},"notificationURL":"","payTokenInd":false,"paymentAuthenticationUseCase":"","purchaseInstalData":"","recurringExpiry":"","recurringFrequency":"","sdkAppID":"","sdkEncData":"","sdkEphemPubKey":{"crv":"","kty":"","x":"","y":""},"sdkMaxTimeout":0,"sdkReferenceNumber":"","sdkTransID":"","sdkVersion":"","threeDSCompInd":"","threeDSRequestorAuthenticationInd":"","threeDSRequestorAuthenticationInfo":{"threeDSReqAuthData":"","threeDSReqAuthMethod":"","threeDSReqAuthTimestamp":""},"threeDSRequestorChallengeInd":"","threeDSRequestorID":"","threeDSRequestorName":"","threeDSRequestorPriorAuthenticationInfo":{"threeDSReqPriorAuthData":"","threeDSReqPriorAuthMethod":"","threeDSReqPriorAuthTimestamp":"","threeDSReqPriorRef":""},"threeDSRequestorURL":"","transType":"","transactionType":"","whiteListStatus":"","workPhone":{}},"threeDSAuthenticationOnly":false,"trustedShopper":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountInfo": @{ @"accountAgeIndicator": @"", @"accountChangeDate": @"", @"accountChangeIndicator": @"", @"accountCreationDate": @"", @"accountType": @"", @"addCardAttemptsDay": @0, @"deliveryAddressUsageDate": @"", @"deliveryAddressUsageIndicator": @"", @"homePhone": @"", @"mobilePhone": @"", @"passwordChangeDate": @"", @"passwordChangeIndicator": @"", @"pastTransactionsDay": @0, @"pastTransactionsYear": @0, @"paymentAccountAge": @"", @"paymentAccountIndicator": @"", @"purchasesLast6Months": @0, @"suspiciousActivity": @NO, @"workPhone": @"" },
@"additionalAmount": @{ @"currency": @"", @"value": @0 },
@"additionalData": @{ },
@"amount": @{ },
@"applicationInfo": @{ @"adyenLibrary": @{ @"name": @"", @"version": @"" }, @"adyenPaymentSource": @{ }, @"externalPlatform": @{ @"integrator": @"", @"name": @"", @"version": @"" }, @"merchantApplication": @{ }, @"merchantDevice": @{ @"os": @"", @"osVersion": @"", @"reference": @"" }, @"shopperInteractionDevice": @{ @"locale": @"", @"os": @"", @"osVersion": @"" } },
@"authenticationData": @{ @"attemptAuthentication": @"", @"authenticationOnly": @NO, @"threeDSRequestData": @{ @"challengeWindowSize": @"", @"dataOnly": @"", @"nativeThreeDS": @"", @"threeDSVersion": @"" } },
@"billingAddress": @{ @"city": @"", @"country": @"", @"houseNumberOrName": @"", @"postalCode": @"", @"stateOrProvince": @"", @"street": @"" },
@"browserInfo": @{ @"acceptHeader": @"", @"colorDepth": @0, @"javaEnabled": @NO, @"javaScriptEnabled": @NO, @"language": @"", @"screenHeight": @0, @"screenWidth": @0, @"timeZoneOffset": @0, @"userAgent": @"" },
@"captureDelayHours": @0,
@"channel": @"",
@"checkoutAttemptId": @"",
@"company": @{ @"homepage": @"", @"name": @"", @"registrationNumber": @"", @"registryLocation": @"", @"taxId": @"", @"type": @"" },
@"conversionId": @"",
@"countryCode": @"",
@"dateOfBirth": @"",
@"dccQuote": @{ @"account": @"", @"accountType": @"", @"baseAmount": @{ }, @"basePoints": @0, @"buy": @{ }, @"interbank": @{ }, @"reference": @"", @"sell": @{ }, @"signature": @"", @"source": @"", @"type": @"", @"validTill": @"" },
@"deliveryAddress": @{ },
@"deliveryDate": @"",
@"deviceFingerprint": @"",
@"donationAccount": @"",
@"donationOriginalPspReference": @"",
@"donationToken": @"",
@"enableOneClick": @NO,
@"enablePayOut": @NO,
@"enableRecurring": @NO,
@"entityType": @"",
@"fraudOffset": @0,
@"industryUsage": @"",
@"installments": @{ @"plan": @"", @"value": @0 },
@"lineItems": @[ @{ @"amountExcludingTax": @0, @"amountIncludingTax": @0, @"brand": @"", @"color": @"", @"description": @"", @"id": @"", @"imageUrl": @"", @"itemCategory": @"", @"manufacturer": @"", @"productUrl": @"", @"quantity": @0, @"receiverEmail": @"", @"size": @"", @"sku": @"", @"taxAmount": @0, @"taxPercentage": @0, @"upc": @"" } ],
@"localizedShopperStatement": @{ },
@"mandate": @{ @"amount": @"", @"amountRule": @"", @"billingAttemptsRule": @"", @"billingDay": @"", @"endsAt": @"", @"frequency": @"", @"remarks": @"", @"startsAt": @"" },
@"mcc": @"",
@"merchantAccount": @"",
@"merchantOrderReference": @"",
@"merchantRiskIndicator": @{ @"addressMatch": @NO, @"deliveryAddressIndicator": @"", @"deliveryEmail": @"", @"deliveryEmailAddress": @"", @"deliveryTimeframe": @"", @"giftCardAmount": @{ }, @"giftCardCount": @0, @"giftCardCurr": @"", @"preOrderDate": @"", @"preOrderPurchase": @NO, @"preOrderPurchaseInd": @"", @"reorderItems": @NO, @"reorderItemsInd": @"", @"shipIndicator": @"" },
@"metadata": @{ },
@"mpiData": @{ @"authenticationResponse": @"", @"cavv": @"", @"cavvAlgorithm": @"", @"challengeCancel": @"", @"directoryResponse": @"", @"dsTransID": @"", @"eci": @"", @"riskScore": @"", @"threeDSVersion": @"", @"tokenAuthenticationVerificationValue": @"", @"transStatusReason": @"", @"xid": @"" },
@"order": @{ @"orderData": @"", @"pspReference": @"" },
@"orderReference": @"",
@"origin": @"",
@"paymentMethod": @"",
@"platformChargebackLogic": @{ @"behavior": @"", @"costAllocationAccount": @"", @"targetAccount": @"" },
@"recurringExpiry": @"",
@"recurringFrequency": @"",
@"recurringProcessingModel": @"",
@"redirectFromIssuerMethod": @"",
@"redirectToIssuerMethod": @"",
@"reference": @"",
@"returnUrl": @"",
@"riskData": @{ @"clientData": @"", @"customFields": @{ }, @"fraudOffset": @0, @"profileReference": @"" },
@"sessionValidity": @"",
@"shopperEmail": @"",
@"shopperIP": @"",
@"shopperInteraction": @"",
@"shopperLocale": @"",
@"shopperName": @{ @"firstName": @"", @"lastName": @"" },
@"shopperReference": @"",
@"shopperStatement": @"",
@"socialSecurityNumber": @"",
@"splits": @[ @{ @"account": @"", @"amount": @{ @"currency": @"", @"value": @0 }, @"description": @"", @"reference": @"", @"type": @"" } ],
@"store": @"",
@"storePaymentMethod": @NO,
@"telephoneNumber": @"",
@"threeDS2RequestData": @{ @"acctInfo": @{ @"chAccAgeInd": @"", @"chAccChange": @"", @"chAccChangeInd": @"", @"chAccPwChange": @"", @"chAccPwChangeInd": @"", @"chAccString": @"", @"nbPurchaseAccount": @"", @"paymentAccAge": @"", @"paymentAccInd": @"", @"provisionAttemptsDay": @"", @"shipAddressUsage": @"", @"shipAddressUsageInd": @"", @"shipNameIndicator": @"", @"suspiciousAccActivity": @"", @"txnActivityDay": @"", @"txnActivityYear": @"" }, @"acctType": @"", @"acquirerBIN": @"", @"acquirerMerchantID": @"", @"addrMatch": @"", @"authenticationOnly": @NO, @"challengeIndicator": @"", @"deviceChannel": @"", @"deviceRenderOptions": @{ @"sdkInterface": @"", @"sdkUiType": @[ ] }, @"homePhone": @{ @"cc": @"", @"subscriber": @"" }, @"mcc": @"", @"merchantName": @"", @"messageVersion": @"", @"mobilePhone": @{ }, @"notificationURL": @"", @"payTokenInd": @NO, @"paymentAuthenticationUseCase": @"", @"purchaseInstalData": @"", @"recurringExpiry": @"", @"recurringFrequency": @"", @"sdkAppID": @"", @"sdkEncData": @"", @"sdkEphemPubKey": @{ @"crv": @"", @"kty": @"", @"x": @"", @"y": @"" }, @"sdkMaxTimeout": @0, @"sdkReferenceNumber": @"", @"sdkTransID": @"", @"sdkVersion": @"", @"threeDSCompInd": @"", @"threeDSRequestorAuthenticationInd": @"", @"threeDSRequestorAuthenticationInfo": @{ @"threeDSReqAuthData": @"", @"threeDSReqAuthMethod": @"", @"threeDSReqAuthTimestamp": @"" }, @"threeDSRequestorChallengeInd": @"", @"threeDSRequestorID": @"", @"threeDSRequestorName": @"", @"threeDSRequestorPriorAuthenticationInfo": @{ @"threeDSReqPriorAuthData": @"", @"threeDSReqPriorAuthMethod": @"", @"threeDSReqPriorAuthTimestamp": @"", @"threeDSReqPriorRef": @"" }, @"threeDSRequestorURL": @"", @"transType": @"", @"transactionType": @"", @"whiteListStatus": @"", @"workPhone": @{ } },
@"threeDSAuthenticationOnly": @NO,
@"trustedShopper": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/donations"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/donations" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/donations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountInfo' => [
'accountAgeIndicator' => '',
'accountChangeDate' => '',
'accountChangeIndicator' => '',
'accountCreationDate' => '',
'accountType' => '',
'addCardAttemptsDay' => 0,
'deliveryAddressUsageDate' => '',
'deliveryAddressUsageIndicator' => '',
'homePhone' => '',
'mobilePhone' => '',
'passwordChangeDate' => '',
'passwordChangeIndicator' => '',
'pastTransactionsDay' => 0,
'pastTransactionsYear' => 0,
'paymentAccountAge' => '',
'paymentAccountIndicator' => '',
'purchasesLast6Months' => 0,
'suspiciousActivity' => null,
'workPhone' => ''
],
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'authenticationData' => [
'attemptAuthentication' => '',
'authenticationOnly' => null,
'threeDSRequestData' => [
'challengeWindowSize' => '',
'dataOnly' => '',
'nativeThreeDS' => '',
'threeDSVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'browserInfo' => [
'acceptHeader' => '',
'colorDepth' => 0,
'javaEnabled' => null,
'javaScriptEnabled' => null,
'language' => '',
'screenHeight' => 0,
'screenWidth' => 0,
'timeZoneOffset' => 0,
'userAgent' => ''
],
'captureDelayHours' => 0,
'channel' => '',
'checkoutAttemptId' => '',
'company' => [
'homepage' => '',
'name' => '',
'registrationNumber' => '',
'registryLocation' => '',
'taxId' => '',
'type' => ''
],
'conversionId' => '',
'countryCode' => '',
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'deviceFingerprint' => '',
'donationAccount' => '',
'donationOriginalPspReference' => '',
'donationToken' => '',
'enableOneClick' => null,
'enablePayOut' => null,
'enableRecurring' => null,
'entityType' => '',
'fraudOffset' => 0,
'industryUsage' => '',
'installments' => [
'plan' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'localizedShopperStatement' => [
],
'mandate' => [
'amount' => '',
'amountRule' => '',
'billingAttemptsRule' => '',
'billingDay' => '',
'endsAt' => '',
'frequency' => '',
'remarks' => '',
'startsAt' => ''
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'merchantRiskIndicator' => [
'addressMatch' => null,
'deliveryAddressIndicator' => '',
'deliveryEmail' => '',
'deliveryEmailAddress' => '',
'deliveryTimeframe' => '',
'giftCardAmount' => [
],
'giftCardCount' => 0,
'giftCardCurr' => '',
'preOrderDate' => '',
'preOrderPurchase' => null,
'preOrderPurchaseInd' => '',
'reorderItems' => null,
'reorderItemsInd' => '',
'shipIndicator' => ''
],
'metadata' => [
],
'mpiData' => [
'authenticationResponse' => '',
'cavv' => '',
'cavvAlgorithm' => '',
'challengeCancel' => '',
'directoryResponse' => '',
'dsTransID' => '',
'eci' => '',
'riskScore' => '',
'threeDSVersion' => '',
'tokenAuthenticationVerificationValue' => '',
'transStatusReason' => '',
'xid' => ''
],
'order' => [
'orderData' => '',
'pspReference' => ''
],
'orderReference' => '',
'origin' => '',
'paymentMethod' => '',
'platformChargebackLogic' => [
'behavior' => '',
'costAllocationAccount' => '',
'targetAccount' => ''
],
'recurringExpiry' => '',
'recurringFrequency' => '',
'recurringProcessingModel' => '',
'redirectFromIssuerMethod' => '',
'redirectToIssuerMethod' => '',
'reference' => '',
'returnUrl' => '',
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'sessionValidity' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethod' => null,
'telephoneNumber' => '',
'threeDS2RequestData' => [
'acctInfo' => [
'chAccAgeInd' => '',
'chAccChange' => '',
'chAccChangeInd' => '',
'chAccPwChange' => '',
'chAccPwChangeInd' => '',
'chAccString' => '',
'nbPurchaseAccount' => '',
'paymentAccAge' => '',
'paymentAccInd' => '',
'provisionAttemptsDay' => '',
'shipAddressUsage' => '',
'shipAddressUsageInd' => '',
'shipNameIndicator' => '',
'suspiciousAccActivity' => '',
'txnActivityDay' => '',
'txnActivityYear' => ''
],
'acctType' => '',
'acquirerBIN' => '',
'acquirerMerchantID' => '',
'addrMatch' => '',
'authenticationOnly' => null,
'challengeIndicator' => '',
'deviceChannel' => '',
'deviceRenderOptions' => [
'sdkInterface' => '',
'sdkUiType' => [
]
],
'homePhone' => [
'cc' => '',
'subscriber' => ''
],
'mcc' => '',
'merchantName' => '',
'messageVersion' => '',
'mobilePhone' => [
],
'notificationURL' => '',
'payTokenInd' => null,
'paymentAuthenticationUseCase' => '',
'purchaseInstalData' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'sdkAppID' => '',
'sdkEncData' => '',
'sdkEphemPubKey' => [
'crv' => '',
'kty' => '',
'x' => '',
'y' => ''
],
'sdkMaxTimeout' => 0,
'sdkReferenceNumber' => '',
'sdkTransID' => '',
'sdkVersion' => '',
'threeDSCompInd' => '',
'threeDSRequestorAuthenticationInd' => '',
'threeDSRequestorAuthenticationInfo' => [
'threeDSReqAuthData' => '',
'threeDSReqAuthMethod' => '',
'threeDSReqAuthTimestamp' => ''
],
'threeDSRequestorChallengeInd' => '',
'threeDSRequestorID' => '',
'threeDSRequestorName' => '',
'threeDSRequestorPriorAuthenticationInfo' => [
'threeDSReqPriorAuthData' => '',
'threeDSReqPriorAuthMethod' => '',
'threeDSReqPriorAuthTimestamp' => '',
'threeDSReqPriorRef' => ''
],
'threeDSRequestorURL' => '',
'transType' => '',
'transactionType' => '',
'whiteListStatus' => '',
'workPhone' => [
]
],
'threeDSAuthenticationOnly' => null,
'trustedShopper' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/donations', [
'body' => '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/donations');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountInfo' => [
'accountAgeIndicator' => '',
'accountChangeDate' => '',
'accountChangeIndicator' => '',
'accountCreationDate' => '',
'accountType' => '',
'addCardAttemptsDay' => 0,
'deliveryAddressUsageDate' => '',
'deliveryAddressUsageIndicator' => '',
'homePhone' => '',
'mobilePhone' => '',
'passwordChangeDate' => '',
'passwordChangeIndicator' => '',
'pastTransactionsDay' => 0,
'pastTransactionsYear' => 0,
'paymentAccountAge' => '',
'paymentAccountIndicator' => '',
'purchasesLast6Months' => 0,
'suspiciousActivity' => null,
'workPhone' => ''
],
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'authenticationData' => [
'attemptAuthentication' => '',
'authenticationOnly' => null,
'threeDSRequestData' => [
'challengeWindowSize' => '',
'dataOnly' => '',
'nativeThreeDS' => '',
'threeDSVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'browserInfo' => [
'acceptHeader' => '',
'colorDepth' => 0,
'javaEnabled' => null,
'javaScriptEnabled' => null,
'language' => '',
'screenHeight' => 0,
'screenWidth' => 0,
'timeZoneOffset' => 0,
'userAgent' => ''
],
'captureDelayHours' => 0,
'channel' => '',
'checkoutAttemptId' => '',
'company' => [
'homepage' => '',
'name' => '',
'registrationNumber' => '',
'registryLocation' => '',
'taxId' => '',
'type' => ''
],
'conversionId' => '',
'countryCode' => '',
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'deviceFingerprint' => '',
'donationAccount' => '',
'donationOriginalPspReference' => '',
'donationToken' => '',
'enableOneClick' => null,
'enablePayOut' => null,
'enableRecurring' => null,
'entityType' => '',
'fraudOffset' => 0,
'industryUsage' => '',
'installments' => [
'plan' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'localizedShopperStatement' => [
],
'mandate' => [
'amount' => '',
'amountRule' => '',
'billingAttemptsRule' => '',
'billingDay' => '',
'endsAt' => '',
'frequency' => '',
'remarks' => '',
'startsAt' => ''
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'merchantRiskIndicator' => [
'addressMatch' => null,
'deliveryAddressIndicator' => '',
'deliveryEmail' => '',
'deliveryEmailAddress' => '',
'deliveryTimeframe' => '',
'giftCardAmount' => [
],
'giftCardCount' => 0,
'giftCardCurr' => '',
'preOrderDate' => '',
'preOrderPurchase' => null,
'preOrderPurchaseInd' => '',
'reorderItems' => null,
'reorderItemsInd' => '',
'shipIndicator' => ''
],
'metadata' => [
],
'mpiData' => [
'authenticationResponse' => '',
'cavv' => '',
'cavvAlgorithm' => '',
'challengeCancel' => '',
'directoryResponse' => '',
'dsTransID' => '',
'eci' => '',
'riskScore' => '',
'threeDSVersion' => '',
'tokenAuthenticationVerificationValue' => '',
'transStatusReason' => '',
'xid' => ''
],
'order' => [
'orderData' => '',
'pspReference' => ''
],
'orderReference' => '',
'origin' => '',
'paymentMethod' => '',
'platformChargebackLogic' => [
'behavior' => '',
'costAllocationAccount' => '',
'targetAccount' => ''
],
'recurringExpiry' => '',
'recurringFrequency' => '',
'recurringProcessingModel' => '',
'redirectFromIssuerMethod' => '',
'redirectToIssuerMethod' => '',
'reference' => '',
'returnUrl' => '',
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'sessionValidity' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethod' => null,
'telephoneNumber' => '',
'threeDS2RequestData' => [
'acctInfo' => [
'chAccAgeInd' => '',
'chAccChange' => '',
'chAccChangeInd' => '',
'chAccPwChange' => '',
'chAccPwChangeInd' => '',
'chAccString' => '',
'nbPurchaseAccount' => '',
'paymentAccAge' => '',
'paymentAccInd' => '',
'provisionAttemptsDay' => '',
'shipAddressUsage' => '',
'shipAddressUsageInd' => '',
'shipNameIndicator' => '',
'suspiciousAccActivity' => '',
'txnActivityDay' => '',
'txnActivityYear' => ''
],
'acctType' => '',
'acquirerBIN' => '',
'acquirerMerchantID' => '',
'addrMatch' => '',
'authenticationOnly' => null,
'challengeIndicator' => '',
'deviceChannel' => '',
'deviceRenderOptions' => [
'sdkInterface' => '',
'sdkUiType' => [
]
],
'homePhone' => [
'cc' => '',
'subscriber' => ''
],
'mcc' => '',
'merchantName' => '',
'messageVersion' => '',
'mobilePhone' => [
],
'notificationURL' => '',
'payTokenInd' => null,
'paymentAuthenticationUseCase' => '',
'purchaseInstalData' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'sdkAppID' => '',
'sdkEncData' => '',
'sdkEphemPubKey' => [
'crv' => '',
'kty' => '',
'x' => '',
'y' => ''
],
'sdkMaxTimeout' => 0,
'sdkReferenceNumber' => '',
'sdkTransID' => '',
'sdkVersion' => '',
'threeDSCompInd' => '',
'threeDSRequestorAuthenticationInd' => '',
'threeDSRequestorAuthenticationInfo' => [
'threeDSReqAuthData' => '',
'threeDSReqAuthMethod' => '',
'threeDSReqAuthTimestamp' => ''
],
'threeDSRequestorChallengeInd' => '',
'threeDSRequestorID' => '',
'threeDSRequestorName' => '',
'threeDSRequestorPriorAuthenticationInfo' => [
'threeDSReqPriorAuthData' => '',
'threeDSReqPriorAuthMethod' => '',
'threeDSReqPriorAuthTimestamp' => '',
'threeDSReqPriorRef' => ''
],
'threeDSRequestorURL' => '',
'transType' => '',
'transactionType' => '',
'whiteListStatus' => '',
'workPhone' => [
]
],
'threeDSAuthenticationOnly' => null,
'trustedShopper' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountInfo' => [
'accountAgeIndicator' => '',
'accountChangeDate' => '',
'accountChangeIndicator' => '',
'accountCreationDate' => '',
'accountType' => '',
'addCardAttemptsDay' => 0,
'deliveryAddressUsageDate' => '',
'deliveryAddressUsageIndicator' => '',
'homePhone' => '',
'mobilePhone' => '',
'passwordChangeDate' => '',
'passwordChangeIndicator' => '',
'pastTransactionsDay' => 0,
'pastTransactionsYear' => 0,
'paymentAccountAge' => '',
'paymentAccountIndicator' => '',
'purchasesLast6Months' => 0,
'suspiciousActivity' => null,
'workPhone' => ''
],
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'authenticationData' => [
'attemptAuthentication' => '',
'authenticationOnly' => null,
'threeDSRequestData' => [
'challengeWindowSize' => '',
'dataOnly' => '',
'nativeThreeDS' => '',
'threeDSVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'browserInfo' => [
'acceptHeader' => '',
'colorDepth' => 0,
'javaEnabled' => null,
'javaScriptEnabled' => null,
'language' => '',
'screenHeight' => 0,
'screenWidth' => 0,
'timeZoneOffset' => 0,
'userAgent' => ''
],
'captureDelayHours' => 0,
'channel' => '',
'checkoutAttemptId' => '',
'company' => [
'homepage' => '',
'name' => '',
'registrationNumber' => '',
'registryLocation' => '',
'taxId' => '',
'type' => ''
],
'conversionId' => '',
'countryCode' => '',
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'deviceFingerprint' => '',
'donationAccount' => '',
'donationOriginalPspReference' => '',
'donationToken' => '',
'enableOneClick' => null,
'enablePayOut' => null,
'enableRecurring' => null,
'entityType' => '',
'fraudOffset' => 0,
'industryUsage' => '',
'installments' => [
'plan' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'localizedShopperStatement' => [
],
'mandate' => [
'amount' => '',
'amountRule' => '',
'billingAttemptsRule' => '',
'billingDay' => '',
'endsAt' => '',
'frequency' => '',
'remarks' => '',
'startsAt' => ''
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'merchantRiskIndicator' => [
'addressMatch' => null,
'deliveryAddressIndicator' => '',
'deliveryEmail' => '',
'deliveryEmailAddress' => '',
'deliveryTimeframe' => '',
'giftCardAmount' => [
],
'giftCardCount' => 0,
'giftCardCurr' => '',
'preOrderDate' => '',
'preOrderPurchase' => null,
'preOrderPurchaseInd' => '',
'reorderItems' => null,
'reorderItemsInd' => '',
'shipIndicator' => ''
],
'metadata' => [
],
'mpiData' => [
'authenticationResponse' => '',
'cavv' => '',
'cavvAlgorithm' => '',
'challengeCancel' => '',
'directoryResponse' => '',
'dsTransID' => '',
'eci' => '',
'riskScore' => '',
'threeDSVersion' => '',
'tokenAuthenticationVerificationValue' => '',
'transStatusReason' => '',
'xid' => ''
],
'order' => [
'orderData' => '',
'pspReference' => ''
],
'orderReference' => '',
'origin' => '',
'paymentMethod' => '',
'platformChargebackLogic' => [
'behavior' => '',
'costAllocationAccount' => '',
'targetAccount' => ''
],
'recurringExpiry' => '',
'recurringFrequency' => '',
'recurringProcessingModel' => '',
'redirectFromIssuerMethod' => '',
'redirectToIssuerMethod' => '',
'reference' => '',
'returnUrl' => '',
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'sessionValidity' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethod' => null,
'telephoneNumber' => '',
'threeDS2RequestData' => [
'acctInfo' => [
'chAccAgeInd' => '',
'chAccChange' => '',
'chAccChangeInd' => '',
'chAccPwChange' => '',
'chAccPwChangeInd' => '',
'chAccString' => '',
'nbPurchaseAccount' => '',
'paymentAccAge' => '',
'paymentAccInd' => '',
'provisionAttemptsDay' => '',
'shipAddressUsage' => '',
'shipAddressUsageInd' => '',
'shipNameIndicator' => '',
'suspiciousAccActivity' => '',
'txnActivityDay' => '',
'txnActivityYear' => ''
],
'acctType' => '',
'acquirerBIN' => '',
'acquirerMerchantID' => '',
'addrMatch' => '',
'authenticationOnly' => null,
'challengeIndicator' => '',
'deviceChannel' => '',
'deviceRenderOptions' => [
'sdkInterface' => '',
'sdkUiType' => [
]
],
'homePhone' => [
'cc' => '',
'subscriber' => ''
],
'mcc' => '',
'merchantName' => '',
'messageVersion' => '',
'mobilePhone' => [
],
'notificationURL' => '',
'payTokenInd' => null,
'paymentAuthenticationUseCase' => '',
'purchaseInstalData' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'sdkAppID' => '',
'sdkEncData' => '',
'sdkEphemPubKey' => [
'crv' => '',
'kty' => '',
'x' => '',
'y' => ''
],
'sdkMaxTimeout' => 0,
'sdkReferenceNumber' => '',
'sdkTransID' => '',
'sdkVersion' => '',
'threeDSCompInd' => '',
'threeDSRequestorAuthenticationInd' => '',
'threeDSRequestorAuthenticationInfo' => [
'threeDSReqAuthData' => '',
'threeDSReqAuthMethod' => '',
'threeDSReqAuthTimestamp' => ''
],
'threeDSRequestorChallengeInd' => '',
'threeDSRequestorID' => '',
'threeDSRequestorName' => '',
'threeDSRequestorPriorAuthenticationInfo' => [
'threeDSReqPriorAuthData' => '',
'threeDSReqPriorAuthMethod' => '',
'threeDSReqPriorAuthTimestamp' => '',
'threeDSReqPriorRef' => ''
],
'threeDSRequestorURL' => '',
'transType' => '',
'transactionType' => '',
'whiteListStatus' => '',
'workPhone' => [
]
],
'threeDSAuthenticationOnly' => null,
'trustedShopper' => null
]));
$request->setRequestUrl('{{baseUrl}}/donations');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/donations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/donations' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/donations", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/donations"
payload = {
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": False,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": False,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": False,
"javaScriptEnabled": False,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": False,
"enablePayOut": False,
"enableRecurring": False,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": False,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": False,
"preOrderPurchaseInd": "",
"reorderItems": False,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": False,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": False,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": False,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": False,
"trustedShopper": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/donations"
payload <- "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/donations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/donations') do |req|
req.body = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"donationAccount\": \"\",\n \"donationOriginalPspReference\": \"\",\n \"donationToken\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/donations";
let payload = json!({
"accountInfo": json!({
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
}),
"additionalAmount": json!({
"currency": "",
"value": 0
}),
"additionalData": json!({}),
"amount": json!({}),
"applicationInfo": json!({
"adyenLibrary": json!({
"name": "",
"version": ""
}),
"adyenPaymentSource": json!({}),
"externalPlatform": json!({
"integrator": "",
"name": "",
"version": ""
}),
"merchantApplication": json!({}),
"merchantDevice": json!({
"os": "",
"osVersion": "",
"reference": ""
}),
"shopperInteractionDevice": json!({
"locale": "",
"os": "",
"osVersion": ""
})
}),
"authenticationData": json!({
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": json!({
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
})
}),
"billingAddress": json!({
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
}),
"browserInfo": json!({
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
}),
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": json!({
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
}),
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": json!({
"account": "",
"accountType": "",
"baseAmount": json!({}),
"basePoints": 0,
"buy": json!({}),
"interbank": json!({}),
"reference": "",
"sell": json!({}),
"signature": "",
"source": "",
"type": "",
"validTill": ""
}),
"deliveryAddress": json!({}),
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": json!({
"plan": "",
"value": 0
}),
"lineItems": (
json!({
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
})
),
"localizedShopperStatement": json!({}),
"mandate": json!({
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
}),
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": json!({
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": json!({}),
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
}),
"metadata": json!({}),
"mpiData": json!({
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
}),
"order": json!({
"orderData": "",
"pspReference": ""
}),
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": json!({
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
}),
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": json!({
"clientData": "",
"customFields": json!({}),
"fraudOffset": 0,
"profileReference": ""
}),
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": json!({
"firstName": "",
"lastName": ""
}),
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": (
json!({
"account": "",
"amount": json!({
"currency": "",
"value": 0
}),
"description": "",
"reference": "",
"type": ""
})
),
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": json!({
"acctInfo": json!({
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
}),
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": json!({
"sdkInterface": "",
"sdkUiType": ()
}),
"homePhone": json!({
"cc": "",
"subscriber": ""
}),
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": json!({}),
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": json!({
"crv": "",
"kty": "",
"x": "",
"y": ""
}),
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": json!({
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
}),
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": json!({
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
}),
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": json!({})
}),
"threeDSAuthenticationOnly": false,
"trustedShopper": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/donations \
--header 'content-type: application/json' \
--data '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}'
echo '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}' | \
http POST {{baseUrl}}/donations \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountInfo": {\n "accountAgeIndicator": "",\n "accountChangeDate": "",\n "accountChangeIndicator": "",\n "accountCreationDate": "",\n "accountType": "",\n "addCardAttemptsDay": 0,\n "deliveryAddressUsageDate": "",\n "deliveryAddressUsageIndicator": "",\n "homePhone": "",\n "mobilePhone": "",\n "passwordChangeDate": "",\n "passwordChangeIndicator": "",\n "pastTransactionsDay": 0,\n "pastTransactionsYear": 0,\n "paymentAccountAge": "",\n "paymentAccountIndicator": "",\n "purchasesLast6Months": 0,\n "suspiciousActivity": false,\n "workPhone": ""\n },\n "additionalAmount": {\n "currency": "",\n "value": 0\n },\n "additionalData": {},\n "amount": {},\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "authenticationData": {\n "attemptAuthentication": "",\n "authenticationOnly": false,\n "threeDSRequestData": {\n "challengeWindowSize": "",\n "dataOnly": "",\n "nativeThreeDS": "",\n "threeDSVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "browserInfo": {\n "acceptHeader": "",\n "colorDepth": 0,\n "javaEnabled": false,\n "javaScriptEnabled": false,\n "language": "",\n "screenHeight": 0,\n "screenWidth": 0,\n "timeZoneOffset": 0,\n "userAgent": ""\n },\n "captureDelayHours": 0,\n "channel": "",\n "checkoutAttemptId": "",\n "company": {\n "homepage": "",\n "name": "",\n "registrationNumber": "",\n "registryLocation": "",\n "taxId": "",\n "type": ""\n },\n "conversionId": "",\n "countryCode": "",\n "dateOfBirth": "",\n "dccQuote": {\n "account": "",\n "accountType": "",\n "baseAmount": {},\n "basePoints": 0,\n "buy": {},\n "interbank": {},\n "reference": "",\n "sell": {},\n "signature": "",\n "source": "",\n "type": "",\n "validTill": ""\n },\n "deliveryAddress": {},\n "deliveryDate": "",\n "deviceFingerprint": "",\n "donationAccount": "",\n "donationOriginalPspReference": "",\n "donationToken": "",\n "enableOneClick": false,\n "enablePayOut": false,\n "enableRecurring": false,\n "entityType": "",\n "fraudOffset": 0,\n "industryUsage": "",\n "installments": {\n "plan": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "localizedShopperStatement": {},\n "mandate": {\n "amount": "",\n "amountRule": "",\n "billingAttemptsRule": "",\n "billingDay": "",\n "endsAt": "",\n "frequency": "",\n "remarks": "",\n "startsAt": ""\n },\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "merchantRiskIndicator": {\n "addressMatch": false,\n "deliveryAddressIndicator": "",\n "deliveryEmail": "",\n "deliveryEmailAddress": "",\n "deliveryTimeframe": "",\n "giftCardAmount": {},\n "giftCardCount": 0,\n "giftCardCurr": "",\n "preOrderDate": "",\n "preOrderPurchase": false,\n "preOrderPurchaseInd": "",\n "reorderItems": false,\n "reorderItemsInd": "",\n "shipIndicator": ""\n },\n "metadata": {},\n "mpiData": {\n "authenticationResponse": "",\n "cavv": "",\n "cavvAlgorithm": "",\n "challengeCancel": "",\n "directoryResponse": "",\n "dsTransID": "",\n "eci": "",\n "riskScore": "",\n "threeDSVersion": "",\n "tokenAuthenticationVerificationValue": "",\n "transStatusReason": "",\n "xid": ""\n },\n "order": {\n "orderData": "",\n "pspReference": ""\n },\n "orderReference": "",\n "origin": "",\n "paymentMethod": "",\n "platformChargebackLogic": {\n "behavior": "",\n "costAllocationAccount": "",\n "targetAccount": ""\n },\n "recurringExpiry": "",\n "recurringFrequency": "",\n "recurringProcessingModel": "",\n "redirectFromIssuerMethod": "",\n "redirectToIssuerMethod": "",\n "reference": "",\n "returnUrl": "",\n "riskData": {\n "clientData": "",\n "customFields": {},\n "fraudOffset": 0,\n "profileReference": ""\n },\n "sessionValidity": "",\n "shopperEmail": "",\n "shopperIP": "",\n "shopperInteraction": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "socialSecurityNumber": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "storePaymentMethod": false,\n "telephoneNumber": "",\n "threeDS2RequestData": {\n "acctInfo": {\n "chAccAgeInd": "",\n "chAccChange": "",\n "chAccChangeInd": "",\n "chAccPwChange": "",\n "chAccPwChangeInd": "",\n "chAccString": "",\n "nbPurchaseAccount": "",\n "paymentAccAge": "",\n "paymentAccInd": "",\n "provisionAttemptsDay": "",\n "shipAddressUsage": "",\n "shipAddressUsageInd": "",\n "shipNameIndicator": "",\n "suspiciousAccActivity": "",\n "txnActivityDay": "",\n "txnActivityYear": ""\n },\n "acctType": "",\n "acquirerBIN": "",\n "acquirerMerchantID": "",\n "addrMatch": "",\n "authenticationOnly": false,\n "challengeIndicator": "",\n "deviceChannel": "",\n "deviceRenderOptions": {\n "sdkInterface": "",\n "sdkUiType": []\n },\n "homePhone": {\n "cc": "",\n "subscriber": ""\n },\n "mcc": "",\n "merchantName": "",\n "messageVersion": "",\n "mobilePhone": {},\n "notificationURL": "",\n "payTokenInd": false,\n "paymentAuthenticationUseCase": "",\n "purchaseInstalData": "",\n "recurringExpiry": "",\n "recurringFrequency": "",\n "sdkAppID": "",\n "sdkEncData": "",\n "sdkEphemPubKey": {\n "crv": "",\n "kty": "",\n "x": "",\n "y": ""\n },\n "sdkMaxTimeout": 0,\n "sdkReferenceNumber": "",\n "sdkTransID": "",\n "sdkVersion": "",\n "threeDSCompInd": "",\n "threeDSRequestorAuthenticationInd": "",\n "threeDSRequestorAuthenticationInfo": {\n "threeDSReqAuthData": "",\n "threeDSReqAuthMethod": "",\n "threeDSReqAuthTimestamp": ""\n },\n "threeDSRequestorChallengeInd": "",\n "threeDSRequestorID": "",\n "threeDSRequestorName": "",\n "threeDSRequestorPriorAuthenticationInfo": {\n "threeDSReqPriorAuthData": "",\n "threeDSReqPriorAuthMethod": "",\n "threeDSReqPriorAuthTimestamp": "",\n "threeDSReqPriorRef": ""\n },\n "threeDSRequestorURL": "",\n "transType": "",\n "transactionType": "",\n "whiteListStatus": "",\n "workPhone": {}\n },\n "threeDSAuthenticationOnly": false,\n "trustedShopper": false\n}' \
--output-document \
- {{baseUrl}}/donations
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountInfo": [
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
],
"additionalAmount": [
"currency": "",
"value": 0
],
"additionalData": [],
"amount": [],
"applicationInfo": [
"adyenLibrary": [
"name": "",
"version": ""
],
"adyenPaymentSource": [],
"externalPlatform": [
"integrator": "",
"name": "",
"version": ""
],
"merchantApplication": [],
"merchantDevice": [
"os": "",
"osVersion": "",
"reference": ""
],
"shopperInteractionDevice": [
"locale": "",
"os": "",
"osVersion": ""
]
],
"authenticationData": [
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": [
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
]
],
"billingAddress": [
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
],
"browserInfo": [
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": [
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
],
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": [
"account": "",
"accountType": "",
"baseAmount": [],
"basePoints": 0,
"buy": [],
"interbank": [],
"reference": "",
"sell": [],
"signature": "",
"source": "",
"type": "",
"validTill": ""
],
"deliveryAddress": [],
"deliveryDate": "",
"deviceFingerprint": "",
"donationAccount": "",
"donationOriginalPspReference": "",
"donationToken": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": [
"plan": "",
"value": 0
],
"lineItems": [
[
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
]
],
"localizedShopperStatement": [],
"mandate": [
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
],
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": [
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": [],
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
],
"metadata": [],
"mpiData": [
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
],
"order": [
"orderData": "",
"pspReference": ""
],
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": [
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
],
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": [
"clientData": "",
"customFields": [],
"fraudOffset": 0,
"profileReference": ""
],
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": [
"firstName": "",
"lastName": ""
],
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
[
"account": "",
"amount": [
"currency": "",
"value": 0
],
"description": "",
"reference": "",
"type": ""
]
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": [
"acctInfo": [
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
],
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": [
"sdkInterface": "",
"sdkUiType": []
],
"homePhone": [
"cc": "",
"subscriber": ""
],
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": [],
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": [
"crv": "",
"kty": "",
"x": "",
"y": ""
],
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": [
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
],
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": [
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
],
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": []
],
"threeDSAuthenticationOnly": false,
"trustedShopper": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/donations")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"amount": {
"currency": "EUR",
"value": 1000
},
"donationAccount": "CHARITY_ACCOUNT",
"id": "UNIQUE_RESOURCE_ID",
"merchantAccount": "YOUR_MERCHANT_ACCOUNT",
"payment": {
"amount": {
"currency": "EUR",
"value": 1000
},
"merchantReference": "YOUR_DONATION_REFERENCE",
"pspReference": "8535762347980628",
"resultCode": "Authorised"
},
"reference": "YOUR_DONATION_REFERENCE",
"status": "completed"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Start a transaction
{{baseUrl}}/payments
BODY json
{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payments" {:content-type :json
:form-params {:accountInfo {:accountAgeIndicator ""
:accountChangeDate ""
:accountChangeIndicator ""
:accountCreationDate ""
:accountType ""
:addCardAttemptsDay 0
:deliveryAddressUsageDate ""
:deliveryAddressUsageIndicator ""
:homePhone ""
:mobilePhone ""
:passwordChangeDate ""
:passwordChangeIndicator ""
:pastTransactionsDay 0
:pastTransactionsYear 0
:paymentAccountAge ""
:paymentAccountIndicator ""
:purchasesLast6Months 0
:suspiciousActivity false
:workPhone ""}
:additionalAmount {:currency ""
:value 0}
:additionalData {}
:amount {}
:applicationInfo {:adyenLibrary {:name ""
:version ""}
:adyenPaymentSource {}
:externalPlatform {:integrator ""
:name ""
:version ""}
:merchantApplication {}
:merchantDevice {:os ""
:osVersion ""
:reference ""}
:shopperInteractionDevice {:locale ""
:os ""
:osVersion ""}}
:authenticationData {:attemptAuthentication ""
:authenticationOnly false
:threeDSRequestData {:challengeWindowSize ""
:dataOnly ""
:nativeThreeDS ""
:threeDSVersion ""}}
:billingAddress {:city ""
:country ""
:houseNumberOrName ""
:postalCode ""
:stateOrProvince ""
:street ""}
:browserInfo {:acceptHeader ""
:colorDepth 0
:javaEnabled false
:javaScriptEnabled false
:language ""
:screenHeight 0
:screenWidth 0
:timeZoneOffset 0
:userAgent ""}
:captureDelayHours 0
:channel ""
:checkoutAttemptId ""
:company {:homepage ""
:name ""
:registrationNumber ""
:registryLocation ""
:taxId ""
:type ""}
:conversionId ""
:countryCode ""
:dateOfBirth ""
:dccQuote {:account ""
:accountType ""
:baseAmount {}
:basePoints 0
:buy {}
:interbank {}
:reference ""
:sell {}
:signature ""
:source ""
:type ""
:validTill ""}
:deliveryAddress {}
:deliveryDate ""
:deviceFingerprint ""
:enableOneClick false
:enablePayOut false
:enableRecurring false
:entityType ""
:fraudOffset 0
:industryUsage ""
:installments {:plan ""
:value 0}
:lineItems [{:amountExcludingTax 0
:amountIncludingTax 0
:brand ""
:color ""
:description ""
:id ""
:imageUrl ""
:itemCategory ""
:manufacturer ""
:productUrl ""
:quantity 0
:receiverEmail ""
:size ""
:sku ""
:taxAmount 0
:taxPercentage 0
:upc ""}]
:localizedShopperStatement {}
:mandate {:amount ""
:amountRule ""
:billingAttemptsRule ""
:billingDay ""
:endsAt ""
:frequency ""
:remarks ""
:startsAt ""}
:mcc ""
:merchantAccount ""
:merchantOrderReference ""
:merchantRiskIndicator {:addressMatch false
:deliveryAddressIndicator ""
:deliveryEmail ""
:deliveryEmailAddress ""
:deliveryTimeframe ""
:giftCardAmount {}
:giftCardCount 0
:giftCardCurr ""
:preOrderDate ""
:preOrderPurchase false
:preOrderPurchaseInd ""
:reorderItems false
:reorderItemsInd ""
:shipIndicator ""}
:metadata {}
:mpiData {:authenticationResponse ""
:cavv ""
:cavvAlgorithm ""
:challengeCancel ""
:directoryResponse ""
:dsTransID ""
:eci ""
:riskScore ""
:threeDSVersion ""
:tokenAuthenticationVerificationValue ""
:transStatusReason ""
:xid ""}
:order {:orderData ""
:pspReference ""}
:orderReference ""
:origin ""
:paymentMethod ""
:platformChargebackLogic {:behavior ""
:costAllocationAccount ""
:targetAccount ""}
:recurringExpiry ""
:recurringFrequency ""
:recurringProcessingModel ""
:redirectFromIssuerMethod ""
:redirectToIssuerMethod ""
:reference ""
:returnUrl ""
:riskData {:clientData ""
:customFields {}
:fraudOffset 0
:profileReference ""}
:sessionValidity ""
:shopperEmail ""
:shopperIP ""
:shopperInteraction ""
:shopperLocale ""
:shopperName {:firstName ""
:lastName ""}
:shopperReference ""
:shopperStatement ""
:socialSecurityNumber ""
:splits [{:account ""
:amount {:currency ""
:value 0}
:description ""
:reference ""
:type ""}]
:store ""
:storePaymentMethod false
:telephoneNumber ""
:threeDS2RequestData {:acctInfo {:chAccAgeInd ""
:chAccChange ""
:chAccChangeInd ""
:chAccPwChange ""
:chAccPwChangeInd ""
:chAccString ""
:nbPurchaseAccount ""
:paymentAccAge ""
:paymentAccInd ""
:provisionAttemptsDay ""
:shipAddressUsage ""
:shipAddressUsageInd ""
:shipNameIndicator ""
:suspiciousAccActivity ""
:txnActivityDay ""
:txnActivityYear ""}
:acctType ""
:acquirerBIN ""
:acquirerMerchantID ""
:addrMatch ""
:authenticationOnly false
:challengeIndicator ""
:deviceChannel ""
:deviceRenderOptions {:sdkInterface ""
:sdkUiType []}
:homePhone {:cc ""
:subscriber ""}
:mcc ""
:merchantName ""
:messageVersion ""
:mobilePhone {}
:notificationURL ""
:payTokenInd false
:paymentAuthenticationUseCase ""
:purchaseInstalData ""
:recurringExpiry ""
:recurringFrequency ""
:sdkAppID ""
:sdkEncData ""
:sdkEphemPubKey {:crv ""
:kty ""
:x ""
:y ""}
:sdkMaxTimeout 0
:sdkReferenceNumber ""
:sdkTransID ""
:sdkVersion ""
:threeDSCompInd ""
:threeDSRequestorAuthenticationInd ""
:threeDSRequestorAuthenticationInfo {:threeDSReqAuthData ""
:threeDSReqAuthMethod ""
:threeDSReqAuthTimestamp ""}
:threeDSRequestorChallengeInd ""
:threeDSRequestorID ""
:threeDSRequestorName ""
:threeDSRequestorPriorAuthenticationInfo {:threeDSReqPriorAuthData ""
:threeDSReqPriorAuthMethod ""
:threeDSReqPriorAuthTimestamp ""
:threeDSReqPriorRef ""}
:threeDSRequestorURL ""
:transType ""
:transactionType ""
:whiteListStatus ""
:workPhone {}}
:threeDSAuthenticationOnly false
:trustedShopper false}})
require "http/client"
url = "{{baseUrl}}/payments"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payments"),
Content = new StringContent("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments"
payload := strings.NewReader("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payments HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 7205
{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payments")
.setHeader("content-type", "application/json")
.setBody("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payments")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payments")
.header("content-type", "application/json")
.body("{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
.asString();
const data = JSON.stringify({
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {
currency: '',
value: 0
},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {
challengeWindowSize: '',
dataOnly: '',
nativeThreeDS: '',
threeDSVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {
plan: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {
orderData: '',
pspReference: ''
},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {
behavior: '',
costAllocationAccount: '',
targetAccount: ''
},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {
clientData: '',
customFields: {},
fraudOffset: 0,
profileReference: ''
},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {
sdkInterface: '',
sdkUiType: []
},
homePhone: {
cc: '',
subscriber: ''
},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {
crv: '',
kty: '',
x: '',
y: ''
},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {
threeDSReqAuthData: '',
threeDSReqAuthMethod: '',
threeDSReqAuthTimestamp: ''
},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payments');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payments',
headers: {'content-type': 'application/json'},
data: {
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {challengeWindowSize: '', dataOnly: '', nativeThreeDS: '', threeDSVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {orderData: '', pspReference: ''},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountInfo":{"accountAgeIndicator":"","accountChangeDate":"","accountChangeIndicator":"","accountCreationDate":"","accountType":"","addCardAttemptsDay":0,"deliveryAddressUsageDate":"","deliveryAddressUsageIndicator":"","homePhone":"","mobilePhone":"","passwordChangeDate":"","passwordChangeIndicator":"","pastTransactionsDay":0,"pastTransactionsYear":0,"paymentAccountAge":"","paymentAccountIndicator":"","purchasesLast6Months":0,"suspiciousActivity":false,"workPhone":""},"additionalAmount":{"currency":"","value":0},"additionalData":{},"amount":{},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"authenticationData":{"attemptAuthentication":"","authenticationOnly":false,"threeDSRequestData":{"challengeWindowSize":"","dataOnly":"","nativeThreeDS":"","threeDSVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"browserInfo":{"acceptHeader":"","colorDepth":0,"javaEnabled":false,"javaScriptEnabled":false,"language":"","screenHeight":0,"screenWidth":0,"timeZoneOffset":0,"userAgent":""},"captureDelayHours":0,"channel":"","checkoutAttemptId":"","company":{"homepage":"","name":"","registrationNumber":"","registryLocation":"","taxId":"","type":""},"conversionId":"","countryCode":"","dateOfBirth":"","dccQuote":{"account":"","accountType":"","baseAmount":{},"basePoints":0,"buy":{},"interbank":{},"reference":"","sell":{},"signature":"","source":"","type":"","validTill":""},"deliveryAddress":{},"deliveryDate":"","deviceFingerprint":"","enableOneClick":false,"enablePayOut":false,"enableRecurring":false,"entityType":"","fraudOffset":0,"industryUsage":"","installments":{"plan":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"localizedShopperStatement":{},"mandate":{"amount":"","amountRule":"","billingAttemptsRule":"","billingDay":"","endsAt":"","frequency":"","remarks":"","startsAt":""},"mcc":"","merchantAccount":"","merchantOrderReference":"","merchantRiskIndicator":{"addressMatch":false,"deliveryAddressIndicator":"","deliveryEmail":"","deliveryEmailAddress":"","deliveryTimeframe":"","giftCardAmount":{},"giftCardCount":0,"giftCardCurr":"","preOrderDate":"","preOrderPurchase":false,"preOrderPurchaseInd":"","reorderItems":false,"reorderItemsInd":"","shipIndicator":""},"metadata":{},"mpiData":{"authenticationResponse":"","cavv":"","cavvAlgorithm":"","challengeCancel":"","directoryResponse":"","dsTransID":"","eci":"","riskScore":"","threeDSVersion":"","tokenAuthenticationVerificationValue":"","transStatusReason":"","xid":""},"order":{"orderData":"","pspReference":""},"orderReference":"","origin":"","paymentMethod":"","platformChargebackLogic":{"behavior":"","costAllocationAccount":"","targetAccount":""},"recurringExpiry":"","recurringFrequency":"","recurringProcessingModel":"","redirectFromIssuerMethod":"","redirectToIssuerMethod":"","reference":"","returnUrl":"","riskData":{"clientData":"","customFields":{},"fraudOffset":0,"profileReference":""},"sessionValidity":"","shopperEmail":"","shopperIP":"","shopperInteraction":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","socialSecurityNumber":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","storePaymentMethod":false,"telephoneNumber":"","threeDS2RequestData":{"acctInfo":{"chAccAgeInd":"","chAccChange":"","chAccChangeInd":"","chAccPwChange":"","chAccPwChangeInd":"","chAccString":"","nbPurchaseAccount":"","paymentAccAge":"","paymentAccInd":"","provisionAttemptsDay":"","shipAddressUsage":"","shipAddressUsageInd":"","shipNameIndicator":"","suspiciousAccActivity":"","txnActivityDay":"","txnActivityYear":""},"acctType":"","acquirerBIN":"","acquirerMerchantID":"","addrMatch":"","authenticationOnly":false,"challengeIndicator":"","deviceChannel":"","deviceRenderOptions":{"sdkInterface":"","sdkUiType":[]},"homePhone":{"cc":"","subscriber":""},"mcc":"","merchantName":"","messageVersion":"","mobilePhone":{},"notificationURL":"","payTokenInd":false,"paymentAuthenticationUseCase":"","purchaseInstalData":"","recurringExpiry":"","recurringFrequency":"","sdkAppID":"","sdkEncData":"","sdkEphemPubKey":{"crv":"","kty":"","x":"","y":""},"sdkMaxTimeout":0,"sdkReferenceNumber":"","sdkTransID":"","sdkVersion":"","threeDSCompInd":"","threeDSRequestorAuthenticationInd":"","threeDSRequestorAuthenticationInfo":{"threeDSReqAuthData":"","threeDSReqAuthMethod":"","threeDSReqAuthTimestamp":""},"threeDSRequestorChallengeInd":"","threeDSRequestorID":"","threeDSRequestorName":"","threeDSRequestorPriorAuthenticationInfo":{"threeDSReqPriorAuthData":"","threeDSReqPriorAuthMethod":"","threeDSReqPriorAuthTimestamp":"","threeDSReqPriorRef":""},"threeDSRequestorURL":"","transType":"","transactionType":"","whiteListStatus":"","workPhone":{}},"threeDSAuthenticationOnly":false,"trustedShopper":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "accountInfo": {\n "accountAgeIndicator": "",\n "accountChangeDate": "",\n "accountChangeIndicator": "",\n "accountCreationDate": "",\n "accountType": "",\n "addCardAttemptsDay": 0,\n "deliveryAddressUsageDate": "",\n "deliveryAddressUsageIndicator": "",\n "homePhone": "",\n "mobilePhone": "",\n "passwordChangeDate": "",\n "passwordChangeIndicator": "",\n "pastTransactionsDay": 0,\n "pastTransactionsYear": 0,\n "paymentAccountAge": "",\n "paymentAccountIndicator": "",\n "purchasesLast6Months": 0,\n "suspiciousActivity": false,\n "workPhone": ""\n },\n "additionalAmount": {\n "currency": "",\n "value": 0\n },\n "additionalData": {},\n "amount": {},\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "authenticationData": {\n "attemptAuthentication": "",\n "authenticationOnly": false,\n "threeDSRequestData": {\n "challengeWindowSize": "",\n "dataOnly": "",\n "nativeThreeDS": "",\n "threeDSVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "browserInfo": {\n "acceptHeader": "",\n "colorDepth": 0,\n "javaEnabled": false,\n "javaScriptEnabled": false,\n "language": "",\n "screenHeight": 0,\n "screenWidth": 0,\n "timeZoneOffset": 0,\n "userAgent": ""\n },\n "captureDelayHours": 0,\n "channel": "",\n "checkoutAttemptId": "",\n "company": {\n "homepage": "",\n "name": "",\n "registrationNumber": "",\n "registryLocation": "",\n "taxId": "",\n "type": ""\n },\n "conversionId": "",\n "countryCode": "",\n "dateOfBirth": "",\n "dccQuote": {\n "account": "",\n "accountType": "",\n "baseAmount": {},\n "basePoints": 0,\n "buy": {},\n "interbank": {},\n "reference": "",\n "sell": {},\n "signature": "",\n "source": "",\n "type": "",\n "validTill": ""\n },\n "deliveryAddress": {},\n "deliveryDate": "",\n "deviceFingerprint": "",\n "enableOneClick": false,\n "enablePayOut": false,\n "enableRecurring": false,\n "entityType": "",\n "fraudOffset": 0,\n "industryUsage": "",\n "installments": {\n "plan": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "localizedShopperStatement": {},\n "mandate": {\n "amount": "",\n "amountRule": "",\n "billingAttemptsRule": "",\n "billingDay": "",\n "endsAt": "",\n "frequency": "",\n "remarks": "",\n "startsAt": ""\n },\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "merchantRiskIndicator": {\n "addressMatch": false,\n "deliveryAddressIndicator": "",\n "deliveryEmail": "",\n "deliveryEmailAddress": "",\n "deliveryTimeframe": "",\n "giftCardAmount": {},\n "giftCardCount": 0,\n "giftCardCurr": "",\n "preOrderDate": "",\n "preOrderPurchase": false,\n "preOrderPurchaseInd": "",\n "reorderItems": false,\n "reorderItemsInd": "",\n "shipIndicator": ""\n },\n "metadata": {},\n "mpiData": {\n "authenticationResponse": "",\n "cavv": "",\n "cavvAlgorithm": "",\n "challengeCancel": "",\n "directoryResponse": "",\n "dsTransID": "",\n "eci": "",\n "riskScore": "",\n "threeDSVersion": "",\n "tokenAuthenticationVerificationValue": "",\n "transStatusReason": "",\n "xid": ""\n },\n "order": {\n "orderData": "",\n "pspReference": ""\n },\n "orderReference": "",\n "origin": "",\n "paymentMethod": "",\n "platformChargebackLogic": {\n "behavior": "",\n "costAllocationAccount": "",\n "targetAccount": ""\n },\n "recurringExpiry": "",\n "recurringFrequency": "",\n "recurringProcessingModel": "",\n "redirectFromIssuerMethod": "",\n "redirectToIssuerMethod": "",\n "reference": "",\n "returnUrl": "",\n "riskData": {\n "clientData": "",\n "customFields": {},\n "fraudOffset": 0,\n "profileReference": ""\n },\n "sessionValidity": "",\n "shopperEmail": "",\n "shopperIP": "",\n "shopperInteraction": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "socialSecurityNumber": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "storePaymentMethod": false,\n "telephoneNumber": "",\n "threeDS2RequestData": {\n "acctInfo": {\n "chAccAgeInd": "",\n "chAccChange": "",\n "chAccChangeInd": "",\n "chAccPwChange": "",\n "chAccPwChangeInd": "",\n "chAccString": "",\n "nbPurchaseAccount": "",\n "paymentAccAge": "",\n "paymentAccInd": "",\n "provisionAttemptsDay": "",\n "shipAddressUsage": "",\n "shipAddressUsageInd": "",\n "shipNameIndicator": "",\n "suspiciousAccActivity": "",\n "txnActivityDay": "",\n "txnActivityYear": ""\n },\n "acctType": "",\n "acquirerBIN": "",\n "acquirerMerchantID": "",\n "addrMatch": "",\n "authenticationOnly": false,\n "challengeIndicator": "",\n "deviceChannel": "",\n "deviceRenderOptions": {\n "sdkInterface": "",\n "sdkUiType": []\n },\n "homePhone": {\n "cc": "",\n "subscriber": ""\n },\n "mcc": "",\n "merchantName": "",\n "messageVersion": "",\n "mobilePhone": {},\n "notificationURL": "",\n "payTokenInd": false,\n "paymentAuthenticationUseCase": "",\n "purchaseInstalData": "",\n "recurringExpiry": "",\n "recurringFrequency": "",\n "sdkAppID": "",\n "sdkEncData": "",\n "sdkEphemPubKey": {\n "crv": "",\n "kty": "",\n "x": "",\n "y": ""\n },\n "sdkMaxTimeout": 0,\n "sdkReferenceNumber": "",\n "sdkTransID": "",\n "sdkVersion": "",\n "threeDSCompInd": "",\n "threeDSRequestorAuthenticationInd": "",\n "threeDSRequestorAuthenticationInfo": {\n "threeDSReqAuthData": "",\n "threeDSReqAuthMethod": "",\n "threeDSReqAuthTimestamp": ""\n },\n "threeDSRequestorChallengeInd": "",\n "threeDSRequestorID": "",\n "threeDSRequestorName": "",\n "threeDSRequestorPriorAuthenticationInfo": {\n "threeDSReqPriorAuthData": "",\n "threeDSReqPriorAuthMethod": "",\n "threeDSReqPriorAuthTimestamp": "",\n "threeDSReqPriorRef": ""\n },\n "threeDSRequestorURL": "",\n "transType": "",\n "transactionType": "",\n "whiteListStatus": "",\n "workPhone": {}\n },\n "threeDSAuthenticationOnly": false,\n "trustedShopper": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payments")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {challengeWindowSize: '', dataOnly: '', nativeThreeDS: '', threeDSVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {orderData: '', pspReference: ''},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payments',
headers: {'content-type': 'application/json'},
body: {
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {challengeWindowSize: '', dataOnly: '', nativeThreeDS: '', threeDSVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {orderData: '', pspReference: ''},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payments');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {
currency: '',
value: 0
},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {
name: '',
version: ''
},
adyenPaymentSource: {},
externalPlatform: {
integrator: '',
name: '',
version: ''
},
merchantApplication: {},
merchantDevice: {
os: '',
osVersion: '',
reference: ''
},
shopperInteractionDevice: {
locale: '',
os: '',
osVersion: ''
}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {
challengeWindowSize: '',
dataOnly: '',
nativeThreeDS: '',
threeDSVersion: ''
}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {
plan: '',
value: 0
},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {
orderData: '',
pspReference: ''
},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {
behavior: '',
costAllocationAccount: '',
targetAccount: ''
},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {
clientData: '',
customFields: {},
fraudOffset: 0,
profileReference: ''
},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {
firstName: '',
lastName: ''
},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {
currency: '',
value: 0
},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {
sdkInterface: '',
sdkUiType: []
},
homePhone: {
cc: '',
subscriber: ''
},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {
crv: '',
kty: '',
x: '',
y: ''
},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {
threeDSReqAuthData: '',
threeDSReqAuthMethod: '',
threeDSReqAuthTimestamp: ''
},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payments',
headers: {'content-type': 'application/json'},
data: {
accountInfo: {
accountAgeIndicator: '',
accountChangeDate: '',
accountChangeIndicator: '',
accountCreationDate: '',
accountType: '',
addCardAttemptsDay: 0,
deliveryAddressUsageDate: '',
deliveryAddressUsageIndicator: '',
homePhone: '',
mobilePhone: '',
passwordChangeDate: '',
passwordChangeIndicator: '',
pastTransactionsDay: 0,
pastTransactionsYear: 0,
paymentAccountAge: '',
paymentAccountIndicator: '',
purchasesLast6Months: 0,
suspiciousActivity: false,
workPhone: ''
},
additionalAmount: {currency: '', value: 0},
additionalData: {},
amount: {},
applicationInfo: {
adyenLibrary: {name: '', version: ''},
adyenPaymentSource: {},
externalPlatform: {integrator: '', name: '', version: ''},
merchantApplication: {},
merchantDevice: {os: '', osVersion: '', reference: ''},
shopperInteractionDevice: {locale: '', os: '', osVersion: ''}
},
authenticationData: {
attemptAuthentication: '',
authenticationOnly: false,
threeDSRequestData: {challengeWindowSize: '', dataOnly: '', nativeThreeDS: '', threeDSVersion: ''}
},
billingAddress: {
city: '',
country: '',
houseNumberOrName: '',
postalCode: '',
stateOrProvince: '',
street: ''
},
browserInfo: {
acceptHeader: '',
colorDepth: 0,
javaEnabled: false,
javaScriptEnabled: false,
language: '',
screenHeight: 0,
screenWidth: 0,
timeZoneOffset: 0,
userAgent: ''
},
captureDelayHours: 0,
channel: '',
checkoutAttemptId: '',
company: {
homepage: '',
name: '',
registrationNumber: '',
registryLocation: '',
taxId: '',
type: ''
},
conversionId: '',
countryCode: '',
dateOfBirth: '',
dccQuote: {
account: '',
accountType: '',
baseAmount: {},
basePoints: 0,
buy: {},
interbank: {},
reference: '',
sell: {},
signature: '',
source: '',
type: '',
validTill: ''
},
deliveryAddress: {},
deliveryDate: '',
deviceFingerprint: '',
enableOneClick: false,
enablePayOut: false,
enableRecurring: false,
entityType: '',
fraudOffset: 0,
industryUsage: '',
installments: {plan: '', value: 0},
lineItems: [
{
amountExcludingTax: 0,
amountIncludingTax: 0,
brand: '',
color: '',
description: '',
id: '',
imageUrl: '',
itemCategory: '',
manufacturer: '',
productUrl: '',
quantity: 0,
receiverEmail: '',
size: '',
sku: '',
taxAmount: 0,
taxPercentage: 0,
upc: ''
}
],
localizedShopperStatement: {},
mandate: {
amount: '',
amountRule: '',
billingAttemptsRule: '',
billingDay: '',
endsAt: '',
frequency: '',
remarks: '',
startsAt: ''
},
mcc: '',
merchantAccount: '',
merchantOrderReference: '',
merchantRiskIndicator: {
addressMatch: false,
deliveryAddressIndicator: '',
deliveryEmail: '',
deliveryEmailAddress: '',
deliveryTimeframe: '',
giftCardAmount: {},
giftCardCount: 0,
giftCardCurr: '',
preOrderDate: '',
preOrderPurchase: false,
preOrderPurchaseInd: '',
reorderItems: false,
reorderItemsInd: '',
shipIndicator: ''
},
metadata: {},
mpiData: {
authenticationResponse: '',
cavv: '',
cavvAlgorithm: '',
challengeCancel: '',
directoryResponse: '',
dsTransID: '',
eci: '',
riskScore: '',
threeDSVersion: '',
tokenAuthenticationVerificationValue: '',
transStatusReason: '',
xid: ''
},
order: {orderData: '', pspReference: ''},
orderReference: '',
origin: '',
paymentMethod: '',
platformChargebackLogic: {behavior: '', costAllocationAccount: '', targetAccount: ''},
recurringExpiry: '',
recurringFrequency: '',
recurringProcessingModel: '',
redirectFromIssuerMethod: '',
redirectToIssuerMethod: '',
reference: '',
returnUrl: '',
riskData: {clientData: '', customFields: {}, fraudOffset: 0, profileReference: ''},
sessionValidity: '',
shopperEmail: '',
shopperIP: '',
shopperInteraction: '',
shopperLocale: '',
shopperName: {firstName: '', lastName: ''},
shopperReference: '',
shopperStatement: '',
socialSecurityNumber: '',
splits: [
{
account: '',
amount: {currency: '', value: 0},
description: '',
reference: '',
type: ''
}
],
store: '',
storePaymentMethod: false,
telephoneNumber: '',
threeDS2RequestData: {
acctInfo: {
chAccAgeInd: '',
chAccChange: '',
chAccChangeInd: '',
chAccPwChange: '',
chAccPwChangeInd: '',
chAccString: '',
nbPurchaseAccount: '',
paymentAccAge: '',
paymentAccInd: '',
provisionAttemptsDay: '',
shipAddressUsage: '',
shipAddressUsageInd: '',
shipNameIndicator: '',
suspiciousAccActivity: '',
txnActivityDay: '',
txnActivityYear: ''
},
acctType: '',
acquirerBIN: '',
acquirerMerchantID: '',
addrMatch: '',
authenticationOnly: false,
challengeIndicator: '',
deviceChannel: '',
deviceRenderOptions: {sdkInterface: '', sdkUiType: []},
homePhone: {cc: '', subscriber: ''},
mcc: '',
merchantName: '',
messageVersion: '',
mobilePhone: {},
notificationURL: '',
payTokenInd: false,
paymentAuthenticationUseCase: '',
purchaseInstalData: '',
recurringExpiry: '',
recurringFrequency: '',
sdkAppID: '',
sdkEncData: '',
sdkEphemPubKey: {crv: '', kty: '', x: '', y: ''},
sdkMaxTimeout: 0,
sdkReferenceNumber: '',
sdkTransID: '',
sdkVersion: '',
threeDSCompInd: '',
threeDSRequestorAuthenticationInd: '',
threeDSRequestorAuthenticationInfo: {threeDSReqAuthData: '', threeDSReqAuthMethod: '', threeDSReqAuthTimestamp: ''},
threeDSRequestorChallengeInd: '',
threeDSRequestorID: '',
threeDSRequestorName: '',
threeDSRequestorPriorAuthenticationInfo: {
threeDSReqPriorAuthData: '',
threeDSReqPriorAuthMethod: '',
threeDSReqPriorAuthTimestamp: '',
threeDSReqPriorRef: ''
},
threeDSRequestorURL: '',
transType: '',
transactionType: '',
whiteListStatus: '',
workPhone: {}
},
threeDSAuthenticationOnly: false,
trustedShopper: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"accountInfo":{"accountAgeIndicator":"","accountChangeDate":"","accountChangeIndicator":"","accountCreationDate":"","accountType":"","addCardAttemptsDay":0,"deliveryAddressUsageDate":"","deliveryAddressUsageIndicator":"","homePhone":"","mobilePhone":"","passwordChangeDate":"","passwordChangeIndicator":"","pastTransactionsDay":0,"pastTransactionsYear":0,"paymentAccountAge":"","paymentAccountIndicator":"","purchasesLast6Months":0,"suspiciousActivity":false,"workPhone":""},"additionalAmount":{"currency":"","value":0},"additionalData":{},"amount":{},"applicationInfo":{"adyenLibrary":{"name":"","version":""},"adyenPaymentSource":{},"externalPlatform":{"integrator":"","name":"","version":""},"merchantApplication":{},"merchantDevice":{"os":"","osVersion":"","reference":""},"shopperInteractionDevice":{"locale":"","os":"","osVersion":""}},"authenticationData":{"attemptAuthentication":"","authenticationOnly":false,"threeDSRequestData":{"challengeWindowSize":"","dataOnly":"","nativeThreeDS":"","threeDSVersion":""}},"billingAddress":{"city":"","country":"","houseNumberOrName":"","postalCode":"","stateOrProvince":"","street":""},"browserInfo":{"acceptHeader":"","colorDepth":0,"javaEnabled":false,"javaScriptEnabled":false,"language":"","screenHeight":0,"screenWidth":0,"timeZoneOffset":0,"userAgent":""},"captureDelayHours":0,"channel":"","checkoutAttemptId":"","company":{"homepage":"","name":"","registrationNumber":"","registryLocation":"","taxId":"","type":""},"conversionId":"","countryCode":"","dateOfBirth":"","dccQuote":{"account":"","accountType":"","baseAmount":{},"basePoints":0,"buy":{},"interbank":{},"reference":"","sell":{},"signature":"","source":"","type":"","validTill":""},"deliveryAddress":{},"deliveryDate":"","deviceFingerprint":"","enableOneClick":false,"enablePayOut":false,"enableRecurring":false,"entityType":"","fraudOffset":0,"industryUsage":"","installments":{"plan":"","value":0},"lineItems":[{"amountExcludingTax":0,"amountIncludingTax":0,"brand":"","color":"","description":"","id":"","imageUrl":"","itemCategory":"","manufacturer":"","productUrl":"","quantity":0,"receiverEmail":"","size":"","sku":"","taxAmount":0,"taxPercentage":0,"upc":""}],"localizedShopperStatement":{},"mandate":{"amount":"","amountRule":"","billingAttemptsRule":"","billingDay":"","endsAt":"","frequency":"","remarks":"","startsAt":""},"mcc":"","merchantAccount":"","merchantOrderReference":"","merchantRiskIndicator":{"addressMatch":false,"deliveryAddressIndicator":"","deliveryEmail":"","deliveryEmailAddress":"","deliveryTimeframe":"","giftCardAmount":{},"giftCardCount":0,"giftCardCurr":"","preOrderDate":"","preOrderPurchase":false,"preOrderPurchaseInd":"","reorderItems":false,"reorderItemsInd":"","shipIndicator":""},"metadata":{},"mpiData":{"authenticationResponse":"","cavv":"","cavvAlgorithm":"","challengeCancel":"","directoryResponse":"","dsTransID":"","eci":"","riskScore":"","threeDSVersion":"","tokenAuthenticationVerificationValue":"","transStatusReason":"","xid":""},"order":{"orderData":"","pspReference":""},"orderReference":"","origin":"","paymentMethod":"","platformChargebackLogic":{"behavior":"","costAllocationAccount":"","targetAccount":""},"recurringExpiry":"","recurringFrequency":"","recurringProcessingModel":"","redirectFromIssuerMethod":"","redirectToIssuerMethod":"","reference":"","returnUrl":"","riskData":{"clientData":"","customFields":{},"fraudOffset":0,"profileReference":""},"sessionValidity":"","shopperEmail":"","shopperIP":"","shopperInteraction":"","shopperLocale":"","shopperName":{"firstName":"","lastName":""},"shopperReference":"","shopperStatement":"","socialSecurityNumber":"","splits":[{"account":"","amount":{"currency":"","value":0},"description":"","reference":"","type":""}],"store":"","storePaymentMethod":false,"telephoneNumber":"","threeDS2RequestData":{"acctInfo":{"chAccAgeInd":"","chAccChange":"","chAccChangeInd":"","chAccPwChange":"","chAccPwChangeInd":"","chAccString":"","nbPurchaseAccount":"","paymentAccAge":"","paymentAccInd":"","provisionAttemptsDay":"","shipAddressUsage":"","shipAddressUsageInd":"","shipNameIndicator":"","suspiciousAccActivity":"","txnActivityDay":"","txnActivityYear":""},"acctType":"","acquirerBIN":"","acquirerMerchantID":"","addrMatch":"","authenticationOnly":false,"challengeIndicator":"","deviceChannel":"","deviceRenderOptions":{"sdkInterface":"","sdkUiType":[]},"homePhone":{"cc":"","subscriber":""},"mcc":"","merchantName":"","messageVersion":"","mobilePhone":{},"notificationURL":"","payTokenInd":false,"paymentAuthenticationUseCase":"","purchaseInstalData":"","recurringExpiry":"","recurringFrequency":"","sdkAppID":"","sdkEncData":"","sdkEphemPubKey":{"crv":"","kty":"","x":"","y":""},"sdkMaxTimeout":0,"sdkReferenceNumber":"","sdkTransID":"","sdkVersion":"","threeDSCompInd":"","threeDSRequestorAuthenticationInd":"","threeDSRequestorAuthenticationInfo":{"threeDSReqAuthData":"","threeDSReqAuthMethod":"","threeDSReqAuthTimestamp":""},"threeDSRequestorChallengeInd":"","threeDSRequestorID":"","threeDSRequestorName":"","threeDSRequestorPriorAuthenticationInfo":{"threeDSReqPriorAuthData":"","threeDSReqPriorAuthMethod":"","threeDSReqPriorAuthTimestamp":"","threeDSReqPriorRef":""},"threeDSRequestorURL":"","transType":"","transactionType":"","whiteListStatus":"","workPhone":{}},"threeDSAuthenticationOnly":false,"trustedShopper":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"accountInfo": @{ @"accountAgeIndicator": @"", @"accountChangeDate": @"", @"accountChangeIndicator": @"", @"accountCreationDate": @"", @"accountType": @"", @"addCardAttemptsDay": @0, @"deliveryAddressUsageDate": @"", @"deliveryAddressUsageIndicator": @"", @"homePhone": @"", @"mobilePhone": @"", @"passwordChangeDate": @"", @"passwordChangeIndicator": @"", @"pastTransactionsDay": @0, @"pastTransactionsYear": @0, @"paymentAccountAge": @"", @"paymentAccountIndicator": @"", @"purchasesLast6Months": @0, @"suspiciousActivity": @NO, @"workPhone": @"" },
@"additionalAmount": @{ @"currency": @"", @"value": @0 },
@"additionalData": @{ },
@"amount": @{ },
@"applicationInfo": @{ @"adyenLibrary": @{ @"name": @"", @"version": @"" }, @"adyenPaymentSource": @{ }, @"externalPlatform": @{ @"integrator": @"", @"name": @"", @"version": @"" }, @"merchantApplication": @{ }, @"merchantDevice": @{ @"os": @"", @"osVersion": @"", @"reference": @"" }, @"shopperInteractionDevice": @{ @"locale": @"", @"os": @"", @"osVersion": @"" } },
@"authenticationData": @{ @"attemptAuthentication": @"", @"authenticationOnly": @NO, @"threeDSRequestData": @{ @"challengeWindowSize": @"", @"dataOnly": @"", @"nativeThreeDS": @"", @"threeDSVersion": @"" } },
@"billingAddress": @{ @"city": @"", @"country": @"", @"houseNumberOrName": @"", @"postalCode": @"", @"stateOrProvince": @"", @"street": @"" },
@"browserInfo": @{ @"acceptHeader": @"", @"colorDepth": @0, @"javaEnabled": @NO, @"javaScriptEnabled": @NO, @"language": @"", @"screenHeight": @0, @"screenWidth": @0, @"timeZoneOffset": @0, @"userAgent": @"" },
@"captureDelayHours": @0,
@"channel": @"",
@"checkoutAttemptId": @"",
@"company": @{ @"homepage": @"", @"name": @"", @"registrationNumber": @"", @"registryLocation": @"", @"taxId": @"", @"type": @"" },
@"conversionId": @"",
@"countryCode": @"",
@"dateOfBirth": @"",
@"dccQuote": @{ @"account": @"", @"accountType": @"", @"baseAmount": @{ }, @"basePoints": @0, @"buy": @{ }, @"interbank": @{ }, @"reference": @"", @"sell": @{ }, @"signature": @"", @"source": @"", @"type": @"", @"validTill": @"" },
@"deliveryAddress": @{ },
@"deliveryDate": @"",
@"deviceFingerprint": @"",
@"enableOneClick": @NO,
@"enablePayOut": @NO,
@"enableRecurring": @NO,
@"entityType": @"",
@"fraudOffset": @0,
@"industryUsage": @"",
@"installments": @{ @"plan": @"", @"value": @0 },
@"lineItems": @[ @{ @"amountExcludingTax": @0, @"amountIncludingTax": @0, @"brand": @"", @"color": @"", @"description": @"", @"id": @"", @"imageUrl": @"", @"itemCategory": @"", @"manufacturer": @"", @"productUrl": @"", @"quantity": @0, @"receiverEmail": @"", @"size": @"", @"sku": @"", @"taxAmount": @0, @"taxPercentage": @0, @"upc": @"" } ],
@"localizedShopperStatement": @{ },
@"mandate": @{ @"amount": @"", @"amountRule": @"", @"billingAttemptsRule": @"", @"billingDay": @"", @"endsAt": @"", @"frequency": @"", @"remarks": @"", @"startsAt": @"" },
@"mcc": @"",
@"merchantAccount": @"",
@"merchantOrderReference": @"",
@"merchantRiskIndicator": @{ @"addressMatch": @NO, @"deliveryAddressIndicator": @"", @"deliveryEmail": @"", @"deliveryEmailAddress": @"", @"deliveryTimeframe": @"", @"giftCardAmount": @{ }, @"giftCardCount": @0, @"giftCardCurr": @"", @"preOrderDate": @"", @"preOrderPurchase": @NO, @"preOrderPurchaseInd": @"", @"reorderItems": @NO, @"reorderItemsInd": @"", @"shipIndicator": @"" },
@"metadata": @{ },
@"mpiData": @{ @"authenticationResponse": @"", @"cavv": @"", @"cavvAlgorithm": @"", @"challengeCancel": @"", @"directoryResponse": @"", @"dsTransID": @"", @"eci": @"", @"riskScore": @"", @"threeDSVersion": @"", @"tokenAuthenticationVerificationValue": @"", @"transStatusReason": @"", @"xid": @"" },
@"order": @{ @"orderData": @"", @"pspReference": @"" },
@"orderReference": @"",
@"origin": @"",
@"paymentMethod": @"",
@"platformChargebackLogic": @{ @"behavior": @"", @"costAllocationAccount": @"", @"targetAccount": @"" },
@"recurringExpiry": @"",
@"recurringFrequency": @"",
@"recurringProcessingModel": @"",
@"redirectFromIssuerMethod": @"",
@"redirectToIssuerMethod": @"",
@"reference": @"",
@"returnUrl": @"",
@"riskData": @{ @"clientData": @"", @"customFields": @{ }, @"fraudOffset": @0, @"profileReference": @"" },
@"sessionValidity": @"",
@"shopperEmail": @"",
@"shopperIP": @"",
@"shopperInteraction": @"",
@"shopperLocale": @"",
@"shopperName": @{ @"firstName": @"", @"lastName": @"" },
@"shopperReference": @"",
@"shopperStatement": @"",
@"socialSecurityNumber": @"",
@"splits": @[ @{ @"account": @"", @"amount": @{ @"currency": @"", @"value": @0 }, @"description": @"", @"reference": @"", @"type": @"" } ],
@"store": @"",
@"storePaymentMethod": @NO,
@"telephoneNumber": @"",
@"threeDS2RequestData": @{ @"acctInfo": @{ @"chAccAgeInd": @"", @"chAccChange": @"", @"chAccChangeInd": @"", @"chAccPwChange": @"", @"chAccPwChangeInd": @"", @"chAccString": @"", @"nbPurchaseAccount": @"", @"paymentAccAge": @"", @"paymentAccInd": @"", @"provisionAttemptsDay": @"", @"shipAddressUsage": @"", @"shipAddressUsageInd": @"", @"shipNameIndicator": @"", @"suspiciousAccActivity": @"", @"txnActivityDay": @"", @"txnActivityYear": @"" }, @"acctType": @"", @"acquirerBIN": @"", @"acquirerMerchantID": @"", @"addrMatch": @"", @"authenticationOnly": @NO, @"challengeIndicator": @"", @"deviceChannel": @"", @"deviceRenderOptions": @{ @"sdkInterface": @"", @"sdkUiType": @[ ] }, @"homePhone": @{ @"cc": @"", @"subscriber": @"" }, @"mcc": @"", @"merchantName": @"", @"messageVersion": @"", @"mobilePhone": @{ }, @"notificationURL": @"", @"payTokenInd": @NO, @"paymentAuthenticationUseCase": @"", @"purchaseInstalData": @"", @"recurringExpiry": @"", @"recurringFrequency": @"", @"sdkAppID": @"", @"sdkEncData": @"", @"sdkEphemPubKey": @{ @"crv": @"", @"kty": @"", @"x": @"", @"y": @"" }, @"sdkMaxTimeout": @0, @"sdkReferenceNumber": @"", @"sdkTransID": @"", @"sdkVersion": @"", @"threeDSCompInd": @"", @"threeDSRequestorAuthenticationInd": @"", @"threeDSRequestorAuthenticationInfo": @{ @"threeDSReqAuthData": @"", @"threeDSReqAuthMethod": @"", @"threeDSReqAuthTimestamp": @"" }, @"threeDSRequestorChallengeInd": @"", @"threeDSRequestorID": @"", @"threeDSRequestorName": @"", @"threeDSRequestorPriorAuthenticationInfo": @{ @"threeDSReqPriorAuthData": @"", @"threeDSReqPriorAuthMethod": @"", @"threeDSReqPriorAuthTimestamp": @"", @"threeDSReqPriorRef": @"" }, @"threeDSRequestorURL": @"", @"transType": @"", @"transactionType": @"", @"whiteListStatus": @"", @"workPhone": @{ } },
@"threeDSAuthenticationOnly": @NO,
@"trustedShopper": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accountInfo' => [
'accountAgeIndicator' => '',
'accountChangeDate' => '',
'accountChangeIndicator' => '',
'accountCreationDate' => '',
'accountType' => '',
'addCardAttemptsDay' => 0,
'deliveryAddressUsageDate' => '',
'deliveryAddressUsageIndicator' => '',
'homePhone' => '',
'mobilePhone' => '',
'passwordChangeDate' => '',
'passwordChangeIndicator' => '',
'pastTransactionsDay' => 0,
'pastTransactionsYear' => 0,
'paymentAccountAge' => '',
'paymentAccountIndicator' => '',
'purchasesLast6Months' => 0,
'suspiciousActivity' => null,
'workPhone' => ''
],
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'authenticationData' => [
'attemptAuthentication' => '',
'authenticationOnly' => null,
'threeDSRequestData' => [
'challengeWindowSize' => '',
'dataOnly' => '',
'nativeThreeDS' => '',
'threeDSVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'browserInfo' => [
'acceptHeader' => '',
'colorDepth' => 0,
'javaEnabled' => null,
'javaScriptEnabled' => null,
'language' => '',
'screenHeight' => 0,
'screenWidth' => 0,
'timeZoneOffset' => 0,
'userAgent' => ''
],
'captureDelayHours' => 0,
'channel' => '',
'checkoutAttemptId' => '',
'company' => [
'homepage' => '',
'name' => '',
'registrationNumber' => '',
'registryLocation' => '',
'taxId' => '',
'type' => ''
],
'conversionId' => '',
'countryCode' => '',
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'deviceFingerprint' => '',
'enableOneClick' => null,
'enablePayOut' => null,
'enableRecurring' => null,
'entityType' => '',
'fraudOffset' => 0,
'industryUsage' => '',
'installments' => [
'plan' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'localizedShopperStatement' => [
],
'mandate' => [
'amount' => '',
'amountRule' => '',
'billingAttemptsRule' => '',
'billingDay' => '',
'endsAt' => '',
'frequency' => '',
'remarks' => '',
'startsAt' => ''
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'merchantRiskIndicator' => [
'addressMatch' => null,
'deliveryAddressIndicator' => '',
'deliveryEmail' => '',
'deliveryEmailAddress' => '',
'deliveryTimeframe' => '',
'giftCardAmount' => [
],
'giftCardCount' => 0,
'giftCardCurr' => '',
'preOrderDate' => '',
'preOrderPurchase' => null,
'preOrderPurchaseInd' => '',
'reorderItems' => null,
'reorderItemsInd' => '',
'shipIndicator' => ''
],
'metadata' => [
],
'mpiData' => [
'authenticationResponse' => '',
'cavv' => '',
'cavvAlgorithm' => '',
'challengeCancel' => '',
'directoryResponse' => '',
'dsTransID' => '',
'eci' => '',
'riskScore' => '',
'threeDSVersion' => '',
'tokenAuthenticationVerificationValue' => '',
'transStatusReason' => '',
'xid' => ''
],
'order' => [
'orderData' => '',
'pspReference' => ''
],
'orderReference' => '',
'origin' => '',
'paymentMethod' => '',
'platformChargebackLogic' => [
'behavior' => '',
'costAllocationAccount' => '',
'targetAccount' => ''
],
'recurringExpiry' => '',
'recurringFrequency' => '',
'recurringProcessingModel' => '',
'redirectFromIssuerMethod' => '',
'redirectToIssuerMethod' => '',
'reference' => '',
'returnUrl' => '',
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'sessionValidity' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethod' => null,
'telephoneNumber' => '',
'threeDS2RequestData' => [
'acctInfo' => [
'chAccAgeInd' => '',
'chAccChange' => '',
'chAccChangeInd' => '',
'chAccPwChange' => '',
'chAccPwChangeInd' => '',
'chAccString' => '',
'nbPurchaseAccount' => '',
'paymentAccAge' => '',
'paymentAccInd' => '',
'provisionAttemptsDay' => '',
'shipAddressUsage' => '',
'shipAddressUsageInd' => '',
'shipNameIndicator' => '',
'suspiciousAccActivity' => '',
'txnActivityDay' => '',
'txnActivityYear' => ''
],
'acctType' => '',
'acquirerBIN' => '',
'acquirerMerchantID' => '',
'addrMatch' => '',
'authenticationOnly' => null,
'challengeIndicator' => '',
'deviceChannel' => '',
'deviceRenderOptions' => [
'sdkInterface' => '',
'sdkUiType' => [
]
],
'homePhone' => [
'cc' => '',
'subscriber' => ''
],
'mcc' => '',
'merchantName' => '',
'messageVersion' => '',
'mobilePhone' => [
],
'notificationURL' => '',
'payTokenInd' => null,
'paymentAuthenticationUseCase' => '',
'purchaseInstalData' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'sdkAppID' => '',
'sdkEncData' => '',
'sdkEphemPubKey' => [
'crv' => '',
'kty' => '',
'x' => '',
'y' => ''
],
'sdkMaxTimeout' => 0,
'sdkReferenceNumber' => '',
'sdkTransID' => '',
'sdkVersion' => '',
'threeDSCompInd' => '',
'threeDSRequestorAuthenticationInd' => '',
'threeDSRequestorAuthenticationInfo' => [
'threeDSReqAuthData' => '',
'threeDSReqAuthMethod' => '',
'threeDSReqAuthTimestamp' => ''
],
'threeDSRequestorChallengeInd' => '',
'threeDSRequestorID' => '',
'threeDSRequestorName' => '',
'threeDSRequestorPriorAuthenticationInfo' => [
'threeDSReqPriorAuthData' => '',
'threeDSReqPriorAuthMethod' => '',
'threeDSReqPriorAuthTimestamp' => '',
'threeDSReqPriorRef' => ''
],
'threeDSRequestorURL' => '',
'transType' => '',
'transactionType' => '',
'whiteListStatus' => '',
'workPhone' => [
]
],
'threeDSAuthenticationOnly' => null,
'trustedShopper' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payments', [
'body' => '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payments');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'accountInfo' => [
'accountAgeIndicator' => '',
'accountChangeDate' => '',
'accountChangeIndicator' => '',
'accountCreationDate' => '',
'accountType' => '',
'addCardAttemptsDay' => 0,
'deliveryAddressUsageDate' => '',
'deliveryAddressUsageIndicator' => '',
'homePhone' => '',
'mobilePhone' => '',
'passwordChangeDate' => '',
'passwordChangeIndicator' => '',
'pastTransactionsDay' => 0,
'pastTransactionsYear' => 0,
'paymentAccountAge' => '',
'paymentAccountIndicator' => '',
'purchasesLast6Months' => 0,
'suspiciousActivity' => null,
'workPhone' => ''
],
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'authenticationData' => [
'attemptAuthentication' => '',
'authenticationOnly' => null,
'threeDSRequestData' => [
'challengeWindowSize' => '',
'dataOnly' => '',
'nativeThreeDS' => '',
'threeDSVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'browserInfo' => [
'acceptHeader' => '',
'colorDepth' => 0,
'javaEnabled' => null,
'javaScriptEnabled' => null,
'language' => '',
'screenHeight' => 0,
'screenWidth' => 0,
'timeZoneOffset' => 0,
'userAgent' => ''
],
'captureDelayHours' => 0,
'channel' => '',
'checkoutAttemptId' => '',
'company' => [
'homepage' => '',
'name' => '',
'registrationNumber' => '',
'registryLocation' => '',
'taxId' => '',
'type' => ''
],
'conversionId' => '',
'countryCode' => '',
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'deviceFingerprint' => '',
'enableOneClick' => null,
'enablePayOut' => null,
'enableRecurring' => null,
'entityType' => '',
'fraudOffset' => 0,
'industryUsage' => '',
'installments' => [
'plan' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'localizedShopperStatement' => [
],
'mandate' => [
'amount' => '',
'amountRule' => '',
'billingAttemptsRule' => '',
'billingDay' => '',
'endsAt' => '',
'frequency' => '',
'remarks' => '',
'startsAt' => ''
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'merchantRiskIndicator' => [
'addressMatch' => null,
'deliveryAddressIndicator' => '',
'deliveryEmail' => '',
'deliveryEmailAddress' => '',
'deliveryTimeframe' => '',
'giftCardAmount' => [
],
'giftCardCount' => 0,
'giftCardCurr' => '',
'preOrderDate' => '',
'preOrderPurchase' => null,
'preOrderPurchaseInd' => '',
'reorderItems' => null,
'reorderItemsInd' => '',
'shipIndicator' => ''
],
'metadata' => [
],
'mpiData' => [
'authenticationResponse' => '',
'cavv' => '',
'cavvAlgorithm' => '',
'challengeCancel' => '',
'directoryResponse' => '',
'dsTransID' => '',
'eci' => '',
'riskScore' => '',
'threeDSVersion' => '',
'tokenAuthenticationVerificationValue' => '',
'transStatusReason' => '',
'xid' => ''
],
'order' => [
'orderData' => '',
'pspReference' => ''
],
'orderReference' => '',
'origin' => '',
'paymentMethod' => '',
'platformChargebackLogic' => [
'behavior' => '',
'costAllocationAccount' => '',
'targetAccount' => ''
],
'recurringExpiry' => '',
'recurringFrequency' => '',
'recurringProcessingModel' => '',
'redirectFromIssuerMethod' => '',
'redirectToIssuerMethod' => '',
'reference' => '',
'returnUrl' => '',
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'sessionValidity' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethod' => null,
'telephoneNumber' => '',
'threeDS2RequestData' => [
'acctInfo' => [
'chAccAgeInd' => '',
'chAccChange' => '',
'chAccChangeInd' => '',
'chAccPwChange' => '',
'chAccPwChangeInd' => '',
'chAccString' => '',
'nbPurchaseAccount' => '',
'paymentAccAge' => '',
'paymentAccInd' => '',
'provisionAttemptsDay' => '',
'shipAddressUsage' => '',
'shipAddressUsageInd' => '',
'shipNameIndicator' => '',
'suspiciousAccActivity' => '',
'txnActivityDay' => '',
'txnActivityYear' => ''
],
'acctType' => '',
'acquirerBIN' => '',
'acquirerMerchantID' => '',
'addrMatch' => '',
'authenticationOnly' => null,
'challengeIndicator' => '',
'deviceChannel' => '',
'deviceRenderOptions' => [
'sdkInterface' => '',
'sdkUiType' => [
]
],
'homePhone' => [
'cc' => '',
'subscriber' => ''
],
'mcc' => '',
'merchantName' => '',
'messageVersion' => '',
'mobilePhone' => [
],
'notificationURL' => '',
'payTokenInd' => null,
'paymentAuthenticationUseCase' => '',
'purchaseInstalData' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'sdkAppID' => '',
'sdkEncData' => '',
'sdkEphemPubKey' => [
'crv' => '',
'kty' => '',
'x' => '',
'y' => ''
],
'sdkMaxTimeout' => 0,
'sdkReferenceNumber' => '',
'sdkTransID' => '',
'sdkVersion' => '',
'threeDSCompInd' => '',
'threeDSRequestorAuthenticationInd' => '',
'threeDSRequestorAuthenticationInfo' => [
'threeDSReqAuthData' => '',
'threeDSReqAuthMethod' => '',
'threeDSReqAuthTimestamp' => ''
],
'threeDSRequestorChallengeInd' => '',
'threeDSRequestorID' => '',
'threeDSRequestorName' => '',
'threeDSRequestorPriorAuthenticationInfo' => [
'threeDSReqPriorAuthData' => '',
'threeDSReqPriorAuthMethod' => '',
'threeDSReqPriorAuthTimestamp' => '',
'threeDSReqPriorRef' => ''
],
'threeDSRequestorURL' => '',
'transType' => '',
'transactionType' => '',
'whiteListStatus' => '',
'workPhone' => [
]
],
'threeDSAuthenticationOnly' => null,
'trustedShopper' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'accountInfo' => [
'accountAgeIndicator' => '',
'accountChangeDate' => '',
'accountChangeIndicator' => '',
'accountCreationDate' => '',
'accountType' => '',
'addCardAttemptsDay' => 0,
'deliveryAddressUsageDate' => '',
'deliveryAddressUsageIndicator' => '',
'homePhone' => '',
'mobilePhone' => '',
'passwordChangeDate' => '',
'passwordChangeIndicator' => '',
'pastTransactionsDay' => 0,
'pastTransactionsYear' => 0,
'paymentAccountAge' => '',
'paymentAccountIndicator' => '',
'purchasesLast6Months' => 0,
'suspiciousActivity' => null,
'workPhone' => ''
],
'additionalAmount' => [
'currency' => '',
'value' => 0
],
'additionalData' => [
],
'amount' => [
],
'applicationInfo' => [
'adyenLibrary' => [
'name' => '',
'version' => ''
],
'adyenPaymentSource' => [
],
'externalPlatform' => [
'integrator' => '',
'name' => '',
'version' => ''
],
'merchantApplication' => [
],
'merchantDevice' => [
'os' => '',
'osVersion' => '',
'reference' => ''
],
'shopperInteractionDevice' => [
'locale' => '',
'os' => '',
'osVersion' => ''
]
],
'authenticationData' => [
'attemptAuthentication' => '',
'authenticationOnly' => null,
'threeDSRequestData' => [
'challengeWindowSize' => '',
'dataOnly' => '',
'nativeThreeDS' => '',
'threeDSVersion' => ''
]
],
'billingAddress' => [
'city' => '',
'country' => '',
'houseNumberOrName' => '',
'postalCode' => '',
'stateOrProvince' => '',
'street' => ''
],
'browserInfo' => [
'acceptHeader' => '',
'colorDepth' => 0,
'javaEnabled' => null,
'javaScriptEnabled' => null,
'language' => '',
'screenHeight' => 0,
'screenWidth' => 0,
'timeZoneOffset' => 0,
'userAgent' => ''
],
'captureDelayHours' => 0,
'channel' => '',
'checkoutAttemptId' => '',
'company' => [
'homepage' => '',
'name' => '',
'registrationNumber' => '',
'registryLocation' => '',
'taxId' => '',
'type' => ''
],
'conversionId' => '',
'countryCode' => '',
'dateOfBirth' => '',
'dccQuote' => [
'account' => '',
'accountType' => '',
'baseAmount' => [
],
'basePoints' => 0,
'buy' => [
],
'interbank' => [
],
'reference' => '',
'sell' => [
],
'signature' => '',
'source' => '',
'type' => '',
'validTill' => ''
],
'deliveryAddress' => [
],
'deliveryDate' => '',
'deviceFingerprint' => '',
'enableOneClick' => null,
'enablePayOut' => null,
'enableRecurring' => null,
'entityType' => '',
'fraudOffset' => 0,
'industryUsage' => '',
'installments' => [
'plan' => '',
'value' => 0
],
'lineItems' => [
[
'amountExcludingTax' => 0,
'amountIncludingTax' => 0,
'brand' => '',
'color' => '',
'description' => '',
'id' => '',
'imageUrl' => '',
'itemCategory' => '',
'manufacturer' => '',
'productUrl' => '',
'quantity' => 0,
'receiverEmail' => '',
'size' => '',
'sku' => '',
'taxAmount' => 0,
'taxPercentage' => 0,
'upc' => ''
]
],
'localizedShopperStatement' => [
],
'mandate' => [
'amount' => '',
'amountRule' => '',
'billingAttemptsRule' => '',
'billingDay' => '',
'endsAt' => '',
'frequency' => '',
'remarks' => '',
'startsAt' => ''
],
'mcc' => '',
'merchantAccount' => '',
'merchantOrderReference' => '',
'merchantRiskIndicator' => [
'addressMatch' => null,
'deliveryAddressIndicator' => '',
'deliveryEmail' => '',
'deliveryEmailAddress' => '',
'deliveryTimeframe' => '',
'giftCardAmount' => [
],
'giftCardCount' => 0,
'giftCardCurr' => '',
'preOrderDate' => '',
'preOrderPurchase' => null,
'preOrderPurchaseInd' => '',
'reorderItems' => null,
'reorderItemsInd' => '',
'shipIndicator' => ''
],
'metadata' => [
],
'mpiData' => [
'authenticationResponse' => '',
'cavv' => '',
'cavvAlgorithm' => '',
'challengeCancel' => '',
'directoryResponse' => '',
'dsTransID' => '',
'eci' => '',
'riskScore' => '',
'threeDSVersion' => '',
'tokenAuthenticationVerificationValue' => '',
'transStatusReason' => '',
'xid' => ''
],
'order' => [
'orderData' => '',
'pspReference' => ''
],
'orderReference' => '',
'origin' => '',
'paymentMethod' => '',
'platformChargebackLogic' => [
'behavior' => '',
'costAllocationAccount' => '',
'targetAccount' => ''
],
'recurringExpiry' => '',
'recurringFrequency' => '',
'recurringProcessingModel' => '',
'redirectFromIssuerMethod' => '',
'redirectToIssuerMethod' => '',
'reference' => '',
'returnUrl' => '',
'riskData' => [
'clientData' => '',
'customFields' => [
],
'fraudOffset' => 0,
'profileReference' => ''
],
'sessionValidity' => '',
'shopperEmail' => '',
'shopperIP' => '',
'shopperInteraction' => '',
'shopperLocale' => '',
'shopperName' => [
'firstName' => '',
'lastName' => ''
],
'shopperReference' => '',
'shopperStatement' => '',
'socialSecurityNumber' => '',
'splits' => [
[
'account' => '',
'amount' => [
'currency' => '',
'value' => 0
],
'description' => '',
'reference' => '',
'type' => ''
]
],
'store' => '',
'storePaymentMethod' => null,
'telephoneNumber' => '',
'threeDS2RequestData' => [
'acctInfo' => [
'chAccAgeInd' => '',
'chAccChange' => '',
'chAccChangeInd' => '',
'chAccPwChange' => '',
'chAccPwChangeInd' => '',
'chAccString' => '',
'nbPurchaseAccount' => '',
'paymentAccAge' => '',
'paymentAccInd' => '',
'provisionAttemptsDay' => '',
'shipAddressUsage' => '',
'shipAddressUsageInd' => '',
'shipNameIndicator' => '',
'suspiciousAccActivity' => '',
'txnActivityDay' => '',
'txnActivityYear' => ''
],
'acctType' => '',
'acquirerBIN' => '',
'acquirerMerchantID' => '',
'addrMatch' => '',
'authenticationOnly' => null,
'challengeIndicator' => '',
'deviceChannel' => '',
'deviceRenderOptions' => [
'sdkInterface' => '',
'sdkUiType' => [
]
],
'homePhone' => [
'cc' => '',
'subscriber' => ''
],
'mcc' => '',
'merchantName' => '',
'messageVersion' => '',
'mobilePhone' => [
],
'notificationURL' => '',
'payTokenInd' => null,
'paymentAuthenticationUseCase' => '',
'purchaseInstalData' => '',
'recurringExpiry' => '',
'recurringFrequency' => '',
'sdkAppID' => '',
'sdkEncData' => '',
'sdkEphemPubKey' => [
'crv' => '',
'kty' => '',
'x' => '',
'y' => ''
],
'sdkMaxTimeout' => 0,
'sdkReferenceNumber' => '',
'sdkTransID' => '',
'sdkVersion' => '',
'threeDSCompInd' => '',
'threeDSRequestorAuthenticationInd' => '',
'threeDSRequestorAuthenticationInfo' => [
'threeDSReqAuthData' => '',
'threeDSReqAuthMethod' => '',
'threeDSReqAuthTimestamp' => ''
],
'threeDSRequestorChallengeInd' => '',
'threeDSRequestorID' => '',
'threeDSRequestorName' => '',
'threeDSRequestorPriorAuthenticationInfo' => [
'threeDSReqPriorAuthData' => '',
'threeDSReqPriorAuthMethod' => '',
'threeDSReqPriorAuthTimestamp' => '',
'threeDSReqPriorRef' => ''
],
'threeDSRequestorURL' => '',
'transType' => '',
'transactionType' => '',
'whiteListStatus' => '',
'workPhone' => [
]
],
'threeDSAuthenticationOnly' => null,
'trustedShopper' => null
]));
$request->setRequestUrl('{{baseUrl}}/payments');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payments", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments"
payload = {
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": False,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": False,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": False,
"javaScriptEnabled": False,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": False,
"enablePayOut": False,
"enableRecurring": False,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": False,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": False,
"preOrderPurchaseInd": "",
"reorderItems": False,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": False,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": False,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": False,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": False,
"trustedShopper": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments"
payload <- "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payments') do |req|
req.body = "{\n \"accountInfo\": {\n \"accountAgeIndicator\": \"\",\n \"accountChangeDate\": \"\",\n \"accountChangeIndicator\": \"\",\n \"accountCreationDate\": \"\",\n \"accountType\": \"\",\n \"addCardAttemptsDay\": 0,\n \"deliveryAddressUsageDate\": \"\",\n \"deliveryAddressUsageIndicator\": \"\",\n \"homePhone\": \"\",\n \"mobilePhone\": \"\",\n \"passwordChangeDate\": \"\",\n \"passwordChangeIndicator\": \"\",\n \"pastTransactionsDay\": 0,\n \"pastTransactionsYear\": 0,\n \"paymentAccountAge\": \"\",\n \"paymentAccountIndicator\": \"\",\n \"purchasesLast6Months\": 0,\n \"suspiciousActivity\": false,\n \"workPhone\": \"\"\n },\n \"additionalAmount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"additionalData\": {},\n \"amount\": {},\n \"applicationInfo\": {\n \"adyenLibrary\": {\n \"name\": \"\",\n \"version\": \"\"\n },\n \"adyenPaymentSource\": {},\n \"externalPlatform\": {\n \"integrator\": \"\",\n \"name\": \"\",\n \"version\": \"\"\n },\n \"merchantApplication\": {},\n \"merchantDevice\": {\n \"os\": \"\",\n \"osVersion\": \"\",\n \"reference\": \"\"\n },\n \"shopperInteractionDevice\": {\n \"locale\": \"\",\n \"os\": \"\",\n \"osVersion\": \"\"\n }\n },\n \"authenticationData\": {\n \"attemptAuthentication\": \"\",\n \"authenticationOnly\": false,\n \"threeDSRequestData\": {\n \"challengeWindowSize\": \"\",\n \"dataOnly\": \"\",\n \"nativeThreeDS\": \"\",\n \"threeDSVersion\": \"\"\n }\n },\n \"billingAddress\": {\n \"city\": \"\",\n \"country\": \"\",\n \"houseNumberOrName\": \"\",\n \"postalCode\": \"\",\n \"stateOrProvince\": \"\",\n \"street\": \"\"\n },\n \"browserInfo\": {\n \"acceptHeader\": \"\",\n \"colorDepth\": 0,\n \"javaEnabled\": false,\n \"javaScriptEnabled\": false,\n \"language\": \"\",\n \"screenHeight\": 0,\n \"screenWidth\": 0,\n \"timeZoneOffset\": 0,\n \"userAgent\": \"\"\n },\n \"captureDelayHours\": 0,\n \"channel\": \"\",\n \"checkoutAttemptId\": \"\",\n \"company\": {\n \"homepage\": \"\",\n \"name\": \"\",\n \"registrationNumber\": \"\",\n \"registryLocation\": \"\",\n \"taxId\": \"\",\n \"type\": \"\"\n },\n \"conversionId\": \"\",\n \"countryCode\": \"\",\n \"dateOfBirth\": \"\",\n \"dccQuote\": {\n \"account\": \"\",\n \"accountType\": \"\",\n \"baseAmount\": {},\n \"basePoints\": 0,\n \"buy\": {},\n \"interbank\": {},\n \"reference\": \"\",\n \"sell\": {},\n \"signature\": \"\",\n \"source\": \"\",\n \"type\": \"\",\n \"validTill\": \"\"\n },\n \"deliveryAddress\": {},\n \"deliveryDate\": \"\",\n \"deviceFingerprint\": \"\",\n \"enableOneClick\": false,\n \"enablePayOut\": false,\n \"enableRecurring\": false,\n \"entityType\": \"\",\n \"fraudOffset\": 0,\n \"industryUsage\": \"\",\n \"installments\": {\n \"plan\": \"\",\n \"value\": 0\n },\n \"lineItems\": [\n {\n \"amountExcludingTax\": 0,\n \"amountIncludingTax\": 0,\n \"brand\": \"\",\n \"color\": \"\",\n \"description\": \"\",\n \"id\": \"\",\n \"imageUrl\": \"\",\n \"itemCategory\": \"\",\n \"manufacturer\": \"\",\n \"productUrl\": \"\",\n \"quantity\": 0,\n \"receiverEmail\": \"\",\n \"size\": \"\",\n \"sku\": \"\",\n \"taxAmount\": 0,\n \"taxPercentage\": 0,\n \"upc\": \"\"\n }\n ],\n \"localizedShopperStatement\": {},\n \"mandate\": {\n \"amount\": \"\",\n \"amountRule\": \"\",\n \"billingAttemptsRule\": \"\",\n \"billingDay\": \"\",\n \"endsAt\": \"\",\n \"frequency\": \"\",\n \"remarks\": \"\",\n \"startsAt\": \"\"\n },\n \"mcc\": \"\",\n \"merchantAccount\": \"\",\n \"merchantOrderReference\": \"\",\n \"merchantRiskIndicator\": {\n \"addressMatch\": false,\n \"deliveryAddressIndicator\": \"\",\n \"deliveryEmail\": \"\",\n \"deliveryEmailAddress\": \"\",\n \"deliveryTimeframe\": \"\",\n \"giftCardAmount\": {},\n \"giftCardCount\": 0,\n \"giftCardCurr\": \"\",\n \"preOrderDate\": \"\",\n \"preOrderPurchase\": false,\n \"preOrderPurchaseInd\": \"\",\n \"reorderItems\": false,\n \"reorderItemsInd\": \"\",\n \"shipIndicator\": \"\"\n },\n \"metadata\": {},\n \"mpiData\": {\n \"authenticationResponse\": \"\",\n \"cavv\": \"\",\n \"cavvAlgorithm\": \"\",\n \"challengeCancel\": \"\",\n \"directoryResponse\": \"\",\n \"dsTransID\": \"\",\n \"eci\": \"\",\n \"riskScore\": \"\",\n \"threeDSVersion\": \"\",\n \"tokenAuthenticationVerificationValue\": \"\",\n \"transStatusReason\": \"\",\n \"xid\": \"\"\n },\n \"order\": {\n \"orderData\": \"\",\n \"pspReference\": \"\"\n },\n \"orderReference\": \"\",\n \"origin\": \"\",\n \"paymentMethod\": \"\",\n \"platformChargebackLogic\": {\n \"behavior\": \"\",\n \"costAllocationAccount\": \"\",\n \"targetAccount\": \"\"\n },\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"recurringProcessingModel\": \"\",\n \"redirectFromIssuerMethod\": \"\",\n \"redirectToIssuerMethod\": \"\",\n \"reference\": \"\",\n \"returnUrl\": \"\",\n \"riskData\": {\n \"clientData\": \"\",\n \"customFields\": {},\n \"fraudOffset\": 0,\n \"profileReference\": \"\"\n },\n \"sessionValidity\": \"\",\n \"shopperEmail\": \"\",\n \"shopperIP\": \"\",\n \"shopperInteraction\": \"\",\n \"shopperLocale\": \"\",\n \"shopperName\": {\n \"firstName\": \"\",\n \"lastName\": \"\"\n },\n \"shopperReference\": \"\",\n \"shopperStatement\": \"\",\n \"socialSecurityNumber\": \"\",\n \"splits\": [\n {\n \"account\": \"\",\n \"amount\": {\n \"currency\": \"\",\n \"value\": 0\n },\n \"description\": \"\",\n \"reference\": \"\",\n \"type\": \"\"\n }\n ],\n \"store\": \"\",\n \"storePaymentMethod\": false,\n \"telephoneNumber\": \"\",\n \"threeDS2RequestData\": {\n \"acctInfo\": {\n \"chAccAgeInd\": \"\",\n \"chAccChange\": \"\",\n \"chAccChangeInd\": \"\",\n \"chAccPwChange\": \"\",\n \"chAccPwChangeInd\": \"\",\n \"chAccString\": \"\",\n \"nbPurchaseAccount\": \"\",\n \"paymentAccAge\": \"\",\n \"paymentAccInd\": \"\",\n \"provisionAttemptsDay\": \"\",\n \"shipAddressUsage\": \"\",\n \"shipAddressUsageInd\": \"\",\n \"shipNameIndicator\": \"\",\n \"suspiciousAccActivity\": \"\",\n \"txnActivityDay\": \"\",\n \"txnActivityYear\": \"\"\n },\n \"acctType\": \"\",\n \"acquirerBIN\": \"\",\n \"acquirerMerchantID\": \"\",\n \"addrMatch\": \"\",\n \"authenticationOnly\": false,\n \"challengeIndicator\": \"\",\n \"deviceChannel\": \"\",\n \"deviceRenderOptions\": {\n \"sdkInterface\": \"\",\n \"sdkUiType\": []\n },\n \"homePhone\": {\n \"cc\": \"\",\n \"subscriber\": \"\"\n },\n \"mcc\": \"\",\n \"merchantName\": \"\",\n \"messageVersion\": \"\",\n \"mobilePhone\": {},\n \"notificationURL\": \"\",\n \"payTokenInd\": false,\n \"paymentAuthenticationUseCase\": \"\",\n \"purchaseInstalData\": \"\",\n \"recurringExpiry\": \"\",\n \"recurringFrequency\": \"\",\n \"sdkAppID\": \"\",\n \"sdkEncData\": \"\",\n \"sdkEphemPubKey\": {\n \"crv\": \"\",\n \"kty\": \"\",\n \"x\": \"\",\n \"y\": \"\"\n },\n \"sdkMaxTimeout\": 0,\n \"sdkReferenceNumber\": \"\",\n \"sdkTransID\": \"\",\n \"sdkVersion\": \"\",\n \"threeDSCompInd\": \"\",\n \"threeDSRequestorAuthenticationInd\": \"\",\n \"threeDSRequestorAuthenticationInfo\": {\n \"threeDSReqAuthData\": \"\",\n \"threeDSReqAuthMethod\": \"\",\n \"threeDSReqAuthTimestamp\": \"\"\n },\n \"threeDSRequestorChallengeInd\": \"\",\n \"threeDSRequestorID\": \"\",\n \"threeDSRequestorName\": \"\",\n \"threeDSRequestorPriorAuthenticationInfo\": {\n \"threeDSReqPriorAuthData\": \"\",\n \"threeDSReqPriorAuthMethod\": \"\",\n \"threeDSReqPriorAuthTimestamp\": \"\",\n \"threeDSReqPriorRef\": \"\"\n },\n \"threeDSRequestorURL\": \"\",\n \"transType\": \"\",\n \"transactionType\": \"\",\n \"whiteListStatus\": \"\",\n \"workPhone\": {}\n },\n \"threeDSAuthenticationOnly\": false,\n \"trustedShopper\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments";
let payload = json!({
"accountInfo": json!({
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
}),
"additionalAmount": json!({
"currency": "",
"value": 0
}),
"additionalData": json!({}),
"amount": json!({}),
"applicationInfo": json!({
"adyenLibrary": json!({
"name": "",
"version": ""
}),
"adyenPaymentSource": json!({}),
"externalPlatform": json!({
"integrator": "",
"name": "",
"version": ""
}),
"merchantApplication": json!({}),
"merchantDevice": json!({
"os": "",
"osVersion": "",
"reference": ""
}),
"shopperInteractionDevice": json!({
"locale": "",
"os": "",
"osVersion": ""
})
}),
"authenticationData": json!({
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": json!({
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
})
}),
"billingAddress": json!({
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
}),
"browserInfo": json!({
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
}),
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": json!({
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
}),
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": json!({
"account": "",
"accountType": "",
"baseAmount": json!({}),
"basePoints": 0,
"buy": json!({}),
"interbank": json!({}),
"reference": "",
"sell": json!({}),
"signature": "",
"source": "",
"type": "",
"validTill": ""
}),
"deliveryAddress": json!({}),
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": json!({
"plan": "",
"value": 0
}),
"lineItems": (
json!({
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
})
),
"localizedShopperStatement": json!({}),
"mandate": json!({
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
}),
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": json!({
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": json!({}),
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
}),
"metadata": json!({}),
"mpiData": json!({
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
}),
"order": json!({
"orderData": "",
"pspReference": ""
}),
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": json!({
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
}),
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": json!({
"clientData": "",
"customFields": json!({}),
"fraudOffset": 0,
"profileReference": ""
}),
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": json!({
"firstName": "",
"lastName": ""
}),
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": (
json!({
"account": "",
"amount": json!({
"currency": "",
"value": 0
}),
"description": "",
"reference": "",
"type": ""
})
),
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": json!({
"acctInfo": json!({
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
}),
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": json!({
"sdkInterface": "",
"sdkUiType": ()
}),
"homePhone": json!({
"cc": "",
"subscriber": ""
}),
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": json!({}),
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": json!({
"crv": "",
"kty": "",
"x": "",
"y": ""
}),
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": json!({
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
}),
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": json!({
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
}),
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": json!({})
}),
"threeDSAuthenticationOnly": false,
"trustedShopper": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payments \
--header 'content-type: application/json' \
--data '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}'
echo '{
"accountInfo": {
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
},
"additionalAmount": {
"currency": "",
"value": 0
},
"additionalData": {},
"amount": {},
"applicationInfo": {
"adyenLibrary": {
"name": "",
"version": ""
},
"adyenPaymentSource": {},
"externalPlatform": {
"integrator": "",
"name": "",
"version": ""
},
"merchantApplication": {},
"merchantDevice": {
"os": "",
"osVersion": "",
"reference": ""
},
"shopperInteractionDevice": {
"locale": "",
"os": "",
"osVersion": ""
}
},
"authenticationData": {
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": {
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
}
},
"billingAddress": {
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
},
"browserInfo": {
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
},
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": {
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
},
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": {
"account": "",
"accountType": "",
"baseAmount": {},
"basePoints": 0,
"buy": {},
"interbank": {},
"reference": "",
"sell": {},
"signature": "",
"source": "",
"type": "",
"validTill": ""
},
"deliveryAddress": {},
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": {
"plan": "",
"value": 0
},
"lineItems": [
{
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
}
],
"localizedShopperStatement": {},
"mandate": {
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
},
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": {
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": {},
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
},
"metadata": {},
"mpiData": {
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
},
"order": {
"orderData": "",
"pspReference": ""
},
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": {
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
},
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": {
"clientData": "",
"customFields": {},
"fraudOffset": 0,
"profileReference": ""
},
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": {
"firstName": "",
"lastName": ""
},
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
{
"account": "",
"amount": {
"currency": "",
"value": 0
},
"description": "",
"reference": "",
"type": ""
}
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": {
"acctInfo": {
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
},
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": {
"sdkInterface": "",
"sdkUiType": []
},
"homePhone": {
"cc": "",
"subscriber": ""
},
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": {},
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": {
"crv": "",
"kty": "",
"x": "",
"y": ""
},
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": {
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
},
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": {
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
},
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": {}
},
"threeDSAuthenticationOnly": false,
"trustedShopper": false
}' | \
http POST {{baseUrl}}/payments \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "accountInfo": {\n "accountAgeIndicator": "",\n "accountChangeDate": "",\n "accountChangeIndicator": "",\n "accountCreationDate": "",\n "accountType": "",\n "addCardAttemptsDay": 0,\n "deliveryAddressUsageDate": "",\n "deliveryAddressUsageIndicator": "",\n "homePhone": "",\n "mobilePhone": "",\n "passwordChangeDate": "",\n "passwordChangeIndicator": "",\n "pastTransactionsDay": 0,\n "pastTransactionsYear": 0,\n "paymentAccountAge": "",\n "paymentAccountIndicator": "",\n "purchasesLast6Months": 0,\n "suspiciousActivity": false,\n "workPhone": ""\n },\n "additionalAmount": {\n "currency": "",\n "value": 0\n },\n "additionalData": {},\n "amount": {},\n "applicationInfo": {\n "adyenLibrary": {\n "name": "",\n "version": ""\n },\n "adyenPaymentSource": {},\n "externalPlatform": {\n "integrator": "",\n "name": "",\n "version": ""\n },\n "merchantApplication": {},\n "merchantDevice": {\n "os": "",\n "osVersion": "",\n "reference": ""\n },\n "shopperInteractionDevice": {\n "locale": "",\n "os": "",\n "osVersion": ""\n }\n },\n "authenticationData": {\n "attemptAuthentication": "",\n "authenticationOnly": false,\n "threeDSRequestData": {\n "challengeWindowSize": "",\n "dataOnly": "",\n "nativeThreeDS": "",\n "threeDSVersion": ""\n }\n },\n "billingAddress": {\n "city": "",\n "country": "",\n "houseNumberOrName": "",\n "postalCode": "",\n "stateOrProvince": "",\n "street": ""\n },\n "browserInfo": {\n "acceptHeader": "",\n "colorDepth": 0,\n "javaEnabled": false,\n "javaScriptEnabled": false,\n "language": "",\n "screenHeight": 0,\n "screenWidth": 0,\n "timeZoneOffset": 0,\n "userAgent": ""\n },\n "captureDelayHours": 0,\n "channel": "",\n "checkoutAttemptId": "",\n "company": {\n "homepage": "",\n "name": "",\n "registrationNumber": "",\n "registryLocation": "",\n "taxId": "",\n "type": ""\n },\n "conversionId": "",\n "countryCode": "",\n "dateOfBirth": "",\n "dccQuote": {\n "account": "",\n "accountType": "",\n "baseAmount": {},\n "basePoints": 0,\n "buy": {},\n "interbank": {},\n "reference": "",\n "sell": {},\n "signature": "",\n "source": "",\n "type": "",\n "validTill": ""\n },\n "deliveryAddress": {},\n "deliveryDate": "",\n "deviceFingerprint": "",\n "enableOneClick": false,\n "enablePayOut": false,\n "enableRecurring": false,\n "entityType": "",\n "fraudOffset": 0,\n "industryUsage": "",\n "installments": {\n "plan": "",\n "value": 0\n },\n "lineItems": [\n {\n "amountExcludingTax": 0,\n "amountIncludingTax": 0,\n "brand": "",\n "color": "",\n "description": "",\n "id": "",\n "imageUrl": "",\n "itemCategory": "",\n "manufacturer": "",\n "productUrl": "",\n "quantity": 0,\n "receiverEmail": "",\n "size": "",\n "sku": "",\n "taxAmount": 0,\n "taxPercentage": 0,\n "upc": ""\n }\n ],\n "localizedShopperStatement": {},\n "mandate": {\n "amount": "",\n "amountRule": "",\n "billingAttemptsRule": "",\n "billingDay": "",\n "endsAt": "",\n "frequency": "",\n "remarks": "",\n "startsAt": ""\n },\n "mcc": "",\n "merchantAccount": "",\n "merchantOrderReference": "",\n "merchantRiskIndicator": {\n "addressMatch": false,\n "deliveryAddressIndicator": "",\n "deliveryEmail": "",\n "deliveryEmailAddress": "",\n "deliveryTimeframe": "",\n "giftCardAmount": {},\n "giftCardCount": 0,\n "giftCardCurr": "",\n "preOrderDate": "",\n "preOrderPurchase": false,\n "preOrderPurchaseInd": "",\n "reorderItems": false,\n "reorderItemsInd": "",\n "shipIndicator": ""\n },\n "metadata": {},\n "mpiData": {\n "authenticationResponse": "",\n "cavv": "",\n "cavvAlgorithm": "",\n "challengeCancel": "",\n "directoryResponse": "",\n "dsTransID": "",\n "eci": "",\n "riskScore": "",\n "threeDSVersion": "",\n "tokenAuthenticationVerificationValue": "",\n "transStatusReason": "",\n "xid": ""\n },\n "order": {\n "orderData": "",\n "pspReference": ""\n },\n "orderReference": "",\n "origin": "",\n "paymentMethod": "",\n "platformChargebackLogic": {\n "behavior": "",\n "costAllocationAccount": "",\n "targetAccount": ""\n },\n "recurringExpiry": "",\n "recurringFrequency": "",\n "recurringProcessingModel": "",\n "redirectFromIssuerMethod": "",\n "redirectToIssuerMethod": "",\n "reference": "",\n "returnUrl": "",\n "riskData": {\n "clientData": "",\n "customFields": {},\n "fraudOffset": 0,\n "profileReference": ""\n },\n "sessionValidity": "",\n "shopperEmail": "",\n "shopperIP": "",\n "shopperInteraction": "",\n "shopperLocale": "",\n "shopperName": {\n "firstName": "",\n "lastName": ""\n },\n "shopperReference": "",\n "shopperStatement": "",\n "socialSecurityNumber": "",\n "splits": [\n {\n "account": "",\n "amount": {\n "currency": "",\n "value": 0\n },\n "description": "",\n "reference": "",\n "type": ""\n }\n ],\n "store": "",\n "storePaymentMethod": false,\n "telephoneNumber": "",\n "threeDS2RequestData": {\n "acctInfo": {\n "chAccAgeInd": "",\n "chAccChange": "",\n "chAccChangeInd": "",\n "chAccPwChange": "",\n "chAccPwChangeInd": "",\n "chAccString": "",\n "nbPurchaseAccount": "",\n "paymentAccAge": "",\n "paymentAccInd": "",\n "provisionAttemptsDay": "",\n "shipAddressUsage": "",\n "shipAddressUsageInd": "",\n "shipNameIndicator": "",\n "suspiciousAccActivity": "",\n "txnActivityDay": "",\n "txnActivityYear": ""\n },\n "acctType": "",\n "acquirerBIN": "",\n "acquirerMerchantID": "",\n "addrMatch": "",\n "authenticationOnly": false,\n "challengeIndicator": "",\n "deviceChannel": "",\n "deviceRenderOptions": {\n "sdkInterface": "",\n "sdkUiType": []\n },\n "homePhone": {\n "cc": "",\n "subscriber": ""\n },\n "mcc": "",\n "merchantName": "",\n "messageVersion": "",\n "mobilePhone": {},\n "notificationURL": "",\n "payTokenInd": false,\n "paymentAuthenticationUseCase": "",\n "purchaseInstalData": "",\n "recurringExpiry": "",\n "recurringFrequency": "",\n "sdkAppID": "",\n "sdkEncData": "",\n "sdkEphemPubKey": {\n "crv": "",\n "kty": "",\n "x": "",\n "y": ""\n },\n "sdkMaxTimeout": 0,\n "sdkReferenceNumber": "",\n "sdkTransID": "",\n "sdkVersion": "",\n "threeDSCompInd": "",\n "threeDSRequestorAuthenticationInd": "",\n "threeDSRequestorAuthenticationInfo": {\n "threeDSReqAuthData": "",\n "threeDSReqAuthMethod": "",\n "threeDSReqAuthTimestamp": ""\n },\n "threeDSRequestorChallengeInd": "",\n "threeDSRequestorID": "",\n "threeDSRequestorName": "",\n "threeDSRequestorPriorAuthenticationInfo": {\n "threeDSReqPriorAuthData": "",\n "threeDSReqPriorAuthMethod": "",\n "threeDSReqPriorAuthTimestamp": "",\n "threeDSReqPriorRef": ""\n },\n "threeDSRequestorURL": "",\n "transType": "",\n "transactionType": "",\n "whiteListStatus": "",\n "workPhone": {}\n },\n "threeDSAuthenticationOnly": false,\n "trustedShopper": false\n}' \
--output-document \
- {{baseUrl}}/payments
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"accountInfo": [
"accountAgeIndicator": "",
"accountChangeDate": "",
"accountChangeIndicator": "",
"accountCreationDate": "",
"accountType": "",
"addCardAttemptsDay": 0,
"deliveryAddressUsageDate": "",
"deliveryAddressUsageIndicator": "",
"homePhone": "",
"mobilePhone": "",
"passwordChangeDate": "",
"passwordChangeIndicator": "",
"pastTransactionsDay": 0,
"pastTransactionsYear": 0,
"paymentAccountAge": "",
"paymentAccountIndicator": "",
"purchasesLast6Months": 0,
"suspiciousActivity": false,
"workPhone": ""
],
"additionalAmount": [
"currency": "",
"value": 0
],
"additionalData": [],
"amount": [],
"applicationInfo": [
"adyenLibrary": [
"name": "",
"version": ""
],
"adyenPaymentSource": [],
"externalPlatform": [
"integrator": "",
"name": "",
"version": ""
],
"merchantApplication": [],
"merchantDevice": [
"os": "",
"osVersion": "",
"reference": ""
],
"shopperInteractionDevice": [
"locale": "",
"os": "",
"osVersion": ""
]
],
"authenticationData": [
"attemptAuthentication": "",
"authenticationOnly": false,
"threeDSRequestData": [
"challengeWindowSize": "",
"dataOnly": "",
"nativeThreeDS": "",
"threeDSVersion": ""
]
],
"billingAddress": [
"city": "",
"country": "",
"houseNumberOrName": "",
"postalCode": "",
"stateOrProvince": "",
"street": ""
],
"browserInfo": [
"acceptHeader": "",
"colorDepth": 0,
"javaEnabled": false,
"javaScriptEnabled": false,
"language": "",
"screenHeight": 0,
"screenWidth": 0,
"timeZoneOffset": 0,
"userAgent": ""
],
"captureDelayHours": 0,
"channel": "",
"checkoutAttemptId": "",
"company": [
"homepage": "",
"name": "",
"registrationNumber": "",
"registryLocation": "",
"taxId": "",
"type": ""
],
"conversionId": "",
"countryCode": "",
"dateOfBirth": "",
"dccQuote": [
"account": "",
"accountType": "",
"baseAmount": [],
"basePoints": 0,
"buy": [],
"interbank": [],
"reference": "",
"sell": [],
"signature": "",
"source": "",
"type": "",
"validTill": ""
],
"deliveryAddress": [],
"deliveryDate": "",
"deviceFingerprint": "",
"enableOneClick": false,
"enablePayOut": false,
"enableRecurring": false,
"entityType": "",
"fraudOffset": 0,
"industryUsage": "",
"installments": [
"plan": "",
"value": 0
],
"lineItems": [
[
"amountExcludingTax": 0,
"amountIncludingTax": 0,
"brand": "",
"color": "",
"description": "",
"id": "",
"imageUrl": "",
"itemCategory": "",
"manufacturer": "",
"productUrl": "",
"quantity": 0,
"receiverEmail": "",
"size": "",
"sku": "",
"taxAmount": 0,
"taxPercentage": 0,
"upc": ""
]
],
"localizedShopperStatement": [],
"mandate": [
"amount": "",
"amountRule": "",
"billingAttemptsRule": "",
"billingDay": "",
"endsAt": "",
"frequency": "",
"remarks": "",
"startsAt": ""
],
"mcc": "",
"merchantAccount": "",
"merchantOrderReference": "",
"merchantRiskIndicator": [
"addressMatch": false,
"deliveryAddressIndicator": "",
"deliveryEmail": "",
"deliveryEmailAddress": "",
"deliveryTimeframe": "",
"giftCardAmount": [],
"giftCardCount": 0,
"giftCardCurr": "",
"preOrderDate": "",
"preOrderPurchase": false,
"preOrderPurchaseInd": "",
"reorderItems": false,
"reorderItemsInd": "",
"shipIndicator": ""
],
"metadata": [],
"mpiData": [
"authenticationResponse": "",
"cavv": "",
"cavvAlgorithm": "",
"challengeCancel": "",
"directoryResponse": "",
"dsTransID": "",
"eci": "",
"riskScore": "",
"threeDSVersion": "",
"tokenAuthenticationVerificationValue": "",
"transStatusReason": "",
"xid": ""
],
"order": [
"orderData": "",
"pspReference": ""
],
"orderReference": "",
"origin": "",
"paymentMethod": "",
"platformChargebackLogic": [
"behavior": "",
"costAllocationAccount": "",
"targetAccount": ""
],
"recurringExpiry": "",
"recurringFrequency": "",
"recurringProcessingModel": "",
"redirectFromIssuerMethod": "",
"redirectToIssuerMethod": "",
"reference": "",
"returnUrl": "",
"riskData": [
"clientData": "",
"customFields": [],
"fraudOffset": 0,
"profileReference": ""
],
"sessionValidity": "",
"shopperEmail": "",
"shopperIP": "",
"shopperInteraction": "",
"shopperLocale": "",
"shopperName": [
"firstName": "",
"lastName": ""
],
"shopperReference": "",
"shopperStatement": "",
"socialSecurityNumber": "",
"splits": [
[
"account": "",
"amount": [
"currency": "",
"value": 0
],
"description": "",
"reference": "",
"type": ""
]
],
"store": "",
"storePaymentMethod": false,
"telephoneNumber": "",
"threeDS2RequestData": [
"acctInfo": [
"chAccAgeInd": "",
"chAccChange": "",
"chAccChangeInd": "",
"chAccPwChange": "",
"chAccPwChangeInd": "",
"chAccString": "",
"nbPurchaseAccount": "",
"paymentAccAge": "",
"paymentAccInd": "",
"provisionAttemptsDay": "",
"shipAddressUsage": "",
"shipAddressUsageInd": "",
"shipNameIndicator": "",
"suspiciousAccActivity": "",
"txnActivityDay": "",
"txnActivityYear": ""
],
"acctType": "",
"acquirerBIN": "",
"acquirerMerchantID": "",
"addrMatch": "",
"authenticationOnly": false,
"challengeIndicator": "",
"deviceChannel": "",
"deviceRenderOptions": [
"sdkInterface": "",
"sdkUiType": []
],
"homePhone": [
"cc": "",
"subscriber": ""
],
"mcc": "",
"merchantName": "",
"messageVersion": "",
"mobilePhone": [],
"notificationURL": "",
"payTokenInd": false,
"paymentAuthenticationUseCase": "",
"purchaseInstalData": "",
"recurringExpiry": "",
"recurringFrequency": "",
"sdkAppID": "",
"sdkEncData": "",
"sdkEphemPubKey": [
"crv": "",
"kty": "",
"x": "",
"y": ""
],
"sdkMaxTimeout": 0,
"sdkReferenceNumber": "",
"sdkTransID": "",
"sdkVersion": "",
"threeDSCompInd": "",
"threeDSRequestorAuthenticationInd": "",
"threeDSRequestorAuthenticationInfo": [
"threeDSReqAuthData": "",
"threeDSReqAuthMethod": "",
"threeDSReqAuthTimestamp": ""
],
"threeDSRequestorChallengeInd": "",
"threeDSRequestorID": "",
"threeDSRequestorName": "",
"threeDSRequestorPriorAuthenticationInfo": [
"threeDSReqPriorAuthData": "",
"threeDSReqPriorAuthMethod": "",
"threeDSReqPriorAuthTimestamp": "",
"threeDSReqPriorRef": ""
],
"threeDSRequestorURL": "",
"transType": "",
"transactionType": "",
"whiteListStatus": "",
"workPhone": []
],
"threeDSAuthenticationOnly": false,
"trustedShopper": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"additionalData": {
"acquirerCode": "TestPmmAcquirer",
"acquirerReference": "8PQMP9VEP3H",
"authCode": "044925",
"avsResult": "4 AVS not supported for this card type",
"avsResultRaw": "4",
"cvcResult": "1 Matches",
"cvcResultRaw": "M",
"refusalReasonRaw": "AUTHORISED"
},
"merchantReference": "string",
"pspReference": "993617895204576J",
"resultCode": "Authorised"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"additionalData": {
"acquirerCode": "TestPmmAcquirer",
"acquirerReference": "8PQMP9VIE9N",
"authCode": "065696",
"avsResult": "4 AVS not supported for this card type",
"avsResultRaw": "4",
"cvcResult": "1 Matches",
"cvcResultRaw": "M",
"refusalReasonRaw": "AUTHORISED"
},
"merchantReference": "string",
"pspReference": "993617895215577D",
"resultCode": "Authorised"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"additionalData": {
"acquirerCode": "TestPmmAcquirer",
"acquirerReference": "8PQMP9VC172",
"authCode": "082338",
"avsResult": "4 AVS not supported for this card type",
"avsResultRaw": "4",
"cvcResult": "1 Matches",
"cvcResultRaw": "M",
"recurring.recurringDetailReference": "9916178934434753",
"recurring.shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"recurringProcessingModel": "CardOnFile",
"refusalReasonRaw": "AUTHORISED"
},
"merchantReference": "string",
"pspReference": "993617895195570C",
"resultCode": "Authorised"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"additionalData": {
"acquirerCode": "TestPmmAcquirer",
"acquirerReference": "8PQMP9VCKO0",
"authCode": "003704",
"avsResult": "4 AVS not supported for this card type",
"avsResultRaw": "4",
"cvcResult": "1 Matches",
"cvcResultRaw": "M",
"recurring.recurringDetailReference": "9916178934434753",
"recurring.shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"recurringProcessingModel": "CardOnFile",
"refusalReasonRaw": "AUTHORISED"
},
"merchantReference": "string",
"pspReference": "993617895197573E",
"resultCode": "Authorised"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"action": {
"method": "GET",
"paymentMethodType": "giropay",
"type": "redirect",
"url": "https://test.adyen.com/hpp/checkout.shtml?u=skipDetails&p=eJxtUl1vozAQ-DXwFoT5zoMfIkpbmqRtSDhVfakcswUrxKa24UJ--Rku16tOJ1m71oy1O7ProyS8SkUFuGZSdGS0aS8lcDrOYFYW9hkkbQjXK0pFzzU*gNLbK-ZF5lxDLYlmgjt67ACn91m6fioPb3fZY1bk6X9fDiCVyThEX3QB7zD1B6y0ZLz*Ruhe8huiCV4uUYTiZBmiZRBH6G-tPatx*7CG-fFJtt1OslMx7P3oMd9dVq9pOyq9e6Z36*1LF6F689Pyb2xj*QzG3Hn2hlzXtSWostjgRuvO8leWd2tOKyhpG6G0QRI3cQ1EG6An0WvViK4DaRAFcmAUlLk*-y6bcyrOxkUBFZNAtWEG9Kfc9c0WdCMqy7-9Z9BG3fdRW14k5xEYbYaa1JlG4SQwnCSaMIpeLkzDjvDRMXkGHcexFahpzj9IyyqmR*y5Hlq4wcJNDigyjtDShDB4ta9eph1JQqcd4cwUmpSBrU6Mz7*i64-O4DnXNcRRHMco8QPnMx9e-MNDVCXDmHnN6vJGq6a5lG5efr4HH5uP7H6T1TBWlfgFnQraMA"
},
"details": [
{
"key": "payload",
"type": "text"
}
],
"paymentData": "Ab02b4c0!BQABAgAt9sA8lQOSEpwOpedJBZvOI6J4xAEGqCpPCfZkvEQPbXSQBP0O+HEElyemCjzTkp4G70QJLaMvq6IlQ5uPk8rlFoPbTb59E9vrOS4IXxlxQH2TQ6iAAGJvU/SIBHAqENNbg1MjG5HR04c6GgpmaO/9LISgGVlqyoY8FlyHvJQcPcMqkK1hYh0mGmbHLtXqyCAx6yRIOGpV3aaI3GMNkSwf3007BwxJBNd7o0o3XktxLuqU8T9OJquwqWoD2FtfUZ9ZEPk2m5/AbOvhoFYuWrKCW1xptWw04m3JyAJHB2F7gPMjwAi5rE0hlMu3d19WucrxsXakeA/noqubbvsHqqtWdRAn+2fMrpOacX5C4VDdE/xrED6iHM6VoqCztCH8mBtyPxPPU5DMnfxUmmeTrIrrf8j95S1FBman8UORs3jiFtCgCD6uS7y0cFSs6J2DWijpO0chjxNM4xR4q5gedL2idE6rRjZjm6cLhrM21XeroNvQYJtoW2q+gDxl9o/3M74jP+3sPafBZMkdHZ8vUdCueHDdw7bST5UCPHRnEfNHy5XaYf2kG0meaE3tpAAmoCNO2qPdcozHJZggVl9lqHQ394BLpLfYr3YROyWu+36HQRZoa2U2Yz/sFYhF81Iimx6FQWEtLZzT/kGJHsXawb68gqd7xf9jo4p6qokklGkzCRC3iOTKmbnmADUPLdy/qNw7AEp7ImtleSI6IkFGMEFBQTEwM0NBNTM3RUFFRDg3QzI0REQ1MzkwOUI4MEE3OEE5MjNFMzgyM0Q2OERBQ0M5NEI5RkY4MzA1REMifX48+5ZqamGvpSW2oKGEqf2KQdVyjcJrlnNiJKp613bt+5k9/OD8G/5T00dp7aNtQx9nGc+mWf17T7VZ6OmooTBV9bmL0ZcGccD+z4UvQbxjXYnMXKLfQmHKi58x6skXW0y3PhxfCLbm/BClmKuCIrACpLmqX/Mu9mJU4DpdOFMpf047WLI9T9yFQ/6ciUpi09DD89bOGQwvlVTkJhvPu31u7OZCd1r8sZ+NsyoEv5Pe3VPRh6R+OoGuY8cDOt9GhMfjGxp7whTcxtKzwnvETJrMrsRfCVIXv95DefR/YsVL8kchNmljNwwzvCGWACeNM7lY6/96+d27Cf2VBf5fS9EcSGtlZpYpNXsdOMLyJBYdiCujp6r1Sd68jsLJG8/XGw9MPODz8Bhqg5XSLuukhGlmVgSkp/TwHwl+p0bhnS0fz+VWDp90mrEY1B8vxFe4yZ1v0sWWaX5USb1/sEZVT3X/1X2qFCbpM6jr498Kk3w3dUGPmDlZ+XiFk0HUt2800jTYrTZYRMjQjnEOrL15aW5h2ynCtxAJXewfk+9NSYjqScbvHKjLGA8FUB6v5TVhsf+sNFSf/zVtNs+PczPZDZMLTiUnZih36iAu5f4HYjl1o4/K+V1JSKHjegDggW+RCUokGH6kKRnMcs2pU3KoG9kOdGDBOQYj94a+CPWfgE7j97v2bQxmbFHOWgJLzX0lPGM3RR5dDboH3k2BrDHb92K88i+2IHMO8WvrW2qhkB4lGpecupG0XEBOUTH4Lnc3TzUFgsDCvF8mnLweIbRyohzd4SAfn2W4wR7QK1S0",
"redirect": {
"method": "GET",
"url": "https://test.adyen.com/hpp/checkout.shtml?u=skipDetails&p=eJxtUl1vozAQ-DXwFoT5zoMfIkpbmqRtSDhVfakcswUrxKa24UJ--Rku16tOJ1m71oy1O7ProyS8SkUFuGZSdGS0aS8lcDrOYFYW9hkkbQjXK0pFzzU*gNLbK-ZF5lxDLYlmgjt67ACn91m6fioPb3fZY1bk6X9fDiCVyThEX3QB7zD1B6y0ZLz*Ruhe8huiCV4uUYTiZBmiZRBH6G-tPatx*7CG-fFJtt1OslMx7P3oMd9dVq9pOyq9e6Z36*1LF6F689Pyb2xj*QzG3Hn2hlzXtSWostjgRuvO8leWd2tOKyhpG6G0QRI3cQ1EG6An0WvViK4DaRAFcmAUlLk*-y6bcyrOxkUBFZNAtWEG9Kfc9c0WdCMqy7-9Z9BG3fdRW14k5xEYbYaa1JlG4SQwnCSaMIpeLkzDjvDRMXkGHcexFahpzj9IyyqmR*y5Hlq4wcJNDigyjtDShDB4ta9eph1JQqcd4cwUmpSBrU6Mz7*i64-O4DnXNcRRHMco8QPnMx9e-MNDVCXDmHnN6vJGq6a5lG5efr4HH5uP7H6T1TBWlfgFnQraMA"
},
"resultCode": "RedirectShopper"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"action": {
"method": "GET",
"paymentMethodType": "ideal",
"type": "redirect",
"url": "https://test.adyen.com/hpp/checkout.shtml?u=redirectIdeal&p=eJxtUl1zmzAQ-DXwZgaB*XrQg0Nwg2s3DTVtJy8ZRbqAYlsikmCMf30FddNMpzOak2bvZm-3Ts*KCJZLBpgzIEeX9kqBoOMMFXXlcq17UCXDCAXIPYGiLRFmRanshcF70GZ3xd6TpTDQKGK4FJ4ZO8D5XZF-vq-3T5*KL0VV5v*tHEBpe*Pob5cKXmBSA1gbxUXzIWF6JW6JITjLUIySNItQliVxsH6v*cYbnNSHZsMfcydYr8SrE9yY7HRjavMAlyyIjhuK*tzszj9ew-uHrN854a3bkfEE1uBp9od833cV6Lra4taYzglXlsueo6Tk2EptLJL6qW8h2gI9yN7oVnYdKItoUAOnoO3z62-aUlB5sk4qYFwBNTYzoD9015odmFYyJ1z-M2yr7uO4nSBW8xisNpua1NlG0SQwmiTaMMpeLWzDjojRs-cMep7natDTrL*TI2fcjDjwA7Twlws-3aPYOkKZDVH26F69THtShE57woUlmpSBqw9czP*k65*9IfCuq0jiJElQGi69Szn8DPebmKXDWATt6vxEWduea7*sLy-Lt*1bcbctGhgZk78A5S7dyQ"
},
"details": [
{
"key": "payload",
"type": "text"
}
],
"paymentData": "Ab02b4c0!BQABAgCINC3kOq5nsaj4k+VaArf6VIiTWkYALwijaS+VOvzTSf76Un3WYBgKJlEBqALZW3vlw+IDQGw5jqkVBO4axEJEFKu5fDL2RkeHbm+aHY7tlRVsjvNIcVTNbMtHJcclHakOVTrtTCQfspf11XGsmENUaL45bdeu07iDBtpnIvd39p6g8OVaLcSIGaA8Zosd93hs0h3lvIePt3QTekeOUH+zrMMfLyy/4QKBZtLjnWo3/4U0e2tsneOudynW0l5i+VyobWOZb7yZUj7v9GMVpAZ3YEqNZ1aWJlSmty9TJTpXp4PQQcNeELQAfTu4zaarMq5btRZpcmDRvSOQK0Qo/PvfWrv/si0c1NPr5EM43ebdkLiDEUSIGBDTellblheOaRsgD0JlrNLOHSpS6iCiyY5FQaWx7FpnYReP/un2f/2mMGxdehif1MqWWZzgAhjdA4kksQVb8eMIGLY2IveJ4iTmDAkFbhIATs2SuWhYBGqFnBGeH1jlJCJDDV8/XJ0IcX1/r0qC3wsUFecoElZ6gts+4tlfPUoeuSH/NFmyBEzrjZbgCqCH9YVXa/+W+dwQCOQ0G7K4SJepnlNcmpCtI29zMZgeRqmtzI0hImvQYt188MXK44ieh2wsmpVv6Y9EGIgJVR+t1IZKizm6Q2D5MCUC1uAVwu2iw7Xt5Re1XcWSaBC/nZt2iHaZF7kpgIXfrFshAEp7ImtleSI6IkFGMEFBQTEwM0NBNTM3RUFFRDg3QzI0REQ1MzkwOUI4MEE3OEE5MjNFMzgyM0Q2OERBQ0M5NEI5RkY4MzA1REMifVTgdc9kCwE5LJyeGFVSr+P70S1hwc62Ad03Oy1Ksxr823klh1hxYQDWBJETNf/YmYC9cHDGr6LxMQ8OOnwfg2xjsVU7ZUwWJbHid1vU/oJzHBXe54lHMNNre0HaQD6TSokVpazQsY3hRB84uevmeT7KVal98iqXd755VuiIxwHhhywaub1ogyQQEVxNGWx2+vL5Vh8NKmoghZQ+NLSZWRn77hJTGV+lKJdseGA9nV7DSlWodNmZ8RyRfQoqwtaK9woQ87PIN7XqSznZMS1HWMOE/aDLEXLJEfozHWrHuGVmn6Hupt/fBnm1GckSsMGeQNKS+4XmKGrJefrHDmdoZVBaZS9UjxfKjD2sCwu5vutgb6SLrECgCvu3q5/LTyFeTuPV1ZZrlpapC6umnWmSKmj/SdnhXJO00PNuFT2WY/GyH0cyA498zApE6VtLx2e9IvS01Oex6ZCRFDJ6sDCBzVN5g60vsm9tBut6trpQWyryqVM2cQ39xh9olCQ5Ml+2h4YFV5gA+1c0i+e6SeMtFJN788NW2EnQT/2pzM/rNAaSVwSf8vJcx3ZB9n8Pf8xi2buKZFEkyJpZJSg22JC/38D1E0tPRpQ7gZ1Z86meAGXnfKUtA+w2FllB2Y0dMrqi8jXnS/mqMPBmPVnIxUW96e40cB7W8E0VDf1IKx/wQphI8/vM3UOSqC81agmnyQ3nIDrAy8vqMOD+d1xcoElzRNy0OxU6v/90IKkhfAKr3Tur7Vb3FD6Pi/XrujJX95UlRd7fmaAI7Po1cIh1v7HEhsCNoh1z7WFNag==",
"redirect": {
"method": "GET",
"url": "https://test.adyen.com/hpp/checkout.shtml?u=redirectIdeal&p=eJxtUl1zmzAQ-DXwZgaB*XrQg0Nwg2s3DTVtJy8ZRbqAYlsikmCMf30FddNMpzOak2bvZm-3Ts*KCJZLBpgzIEeX9kqBoOMMFXXlcq17UCXDCAXIPYGiLRFmRanshcF70GZ3xd6TpTDQKGK4FJ4ZO8D5XZF-vq-3T5*KL0VV5v*tHEBpe*Pob5cKXmBSA1gbxUXzIWF6JW6JITjLUIySNItQliVxsH6v*cYbnNSHZsMfcydYr8SrE9yY7HRjavMAlyyIjhuK*tzszj9ew-uHrN854a3bkfEE1uBp9od833cV6Lra4taYzglXlsueo6Tk2EptLJL6qW8h2gI9yN7oVnYdKItoUAOnoO3z62-aUlB5sk4qYFwBNTYzoD9015odmFYyJ1z-M2yr7uO4nSBW8xisNpua1NlG0SQwmiTaMMpeLWzDjojRs-cMep7natDTrL*TI2fcjDjwA7Twlws-3aPYOkKZDVH26F69THtShE57woUlmpSBqw9czP*k65*9IfCuq0jiJElQGi69Szn8DPebmKXDWATt6vxEWduea7*sLy-Lt*1bcbctGhgZk78A5S7dyQ"
},
"resultCode": "RedirectShopper"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"action": {
"method": "GET",
"paymentMethodType": "directEbanking",
"type": "redirect",
"url": "https://test.adyen.com/hpp/checkout.shtml?u=skipDetails&p=eJxtUl1zmzAQ-DXmzYwE5sMPenAJjmmdtqHGTfuSkcUFaGyJSIKa-PoexHU7nc4wErN7c7e7p4PmskxUCaxsNAibHrh8bmTliE5rkGKYuLTInRNoUXNpV0KoTlq2A2PvLtiVzKSFSnPbKOnaoQWWbNLkw6di93ibfkzzLPlvZQ-a4M0CeqVzeIJxPjBj9ajnD2E7LW*45Wy5pCGN4mXg0SAKF**uNV*aitGvXrK3tw-forjdn5fdWp*LIg88UtzbtviRHVN1X9lNuJ15658z-8Zp*XACtHea3FFCiKPBFPmW1da2M3*FhfgdleDHWhmLSExigpCoQTyrzppatS1oRAzovhFg8PfzW9tMCnVCHzm85YxMT3*3u9Tcga1VOfPX-0SN6v4Oe*aFegoBtSE1qsNBwSgwGCXiMahOz3Fgy*Xg4j2Brus6BsyY9J4fm7KxA-OIR*dkMSfxjoboyCN40OC7c-EybklzMW6JpdhoVAaOwRcyvYu2O7i9514WEYVRFNHYX7ivWf-g796HZdwPqVevzo*irOtzQbLi9Wnxsn1JN9u0gqEs1S-zMtxA"
},
"details": [
{
"key": "payload",
"type": "text"
}
],
"paymentData": "Ab02b4c0!BQABAgB1H7lBY8Uxf1bWoNkA9C2/BuD1Fa2+f3+u8Q3sZLCf6/nmkhPEg1CleH0L6NnNoxwgiHBzmljYF6QFoshWsEZ4Hp1fyq9S/IGHFcl6GlQHlQf/RATlCw21Il1BDhcjSib3JpxXWk/NeZbk/ZEvNrWNQOmHo0/eYxCSLl7OgE+PVyKfWogK8awCPNcqV52wgy27P7MlKQaZVfMTTlMfA2tS+xnGgXCXK+BpdLGXagCyRkhmi4QQLVv/sgSv4Zycu829yhaorOkum7hKEW3Os/DaIZbZjKglVpfFk4N2Qsa8ReydNGI1EeX9CfntJMFOMIWJeyfTimHhxZvUnIJ1cgIBLA8rdSxf3xExRXnK8xphXX+Aah4BIgRmLfOsnwsf6lnYcvPKg/3rMV/gK/g9iOC32wMGbzB7J+nPbW+ht5LJOK9ax/63H1bLT2Zm5UxcbzZsm8BccCyGqkMq8vZAE262urS4rGLzDCZXyJ22bq9yzQ/wUDVMhbTn55Cxotx+FwIhQA2SF0yZ+wgi1ty9ovl251eYbRdWNasvCwPaXxdTCVVD7wrdQbC5wQTpQO64EnQvYfiRerVQ5mCAu82VL4dCesNHvpKv2hKENa3p9ZFRJrle6wIUYX5fyscZDvEoqHvuqF+SpTXANK9PKGl6aaTCpg497/2x3wSU9Sxf8lzsrxAymOZnLENryrDr0v9IrYfDAEp7ImtleSI6IkFGMEFBQTEwM0NBNTM3RUFFRDg3QzI0REQ1MzkwOUI4MEE3OEE5MjNFMzgyM0Q2OERBQ0M5NEI5RkY4MzA1REMifexJovSnPKAg5NtTcILGEFLB/SoybKa3lEbVdUI76QewA8VFXNI8Ulnwlriy07AS4NDbZSfSfNYijSBS1uVsfo9kiabnFe0CQ29377TnsI1Bliv/CM6lBFp9SWQcLgSQQZkD1j4daab9L33mkUhQ/6Q+ERVtx2g+MAYNjl4xyJrc2IOQQ+0IUVGUZgJ4xKNTbf4TN0+EZXPvqxQ3ejsdtE3UhGjlZGS4HND7nkdljh/AfN5+JLe0fnvEgdfPZFttHCvdoOwosLL4ACSD5HH5v3Dc6wXuHAILopU+P/JUWa04gKInYMc1ABOzR9kOwzOHvWey7vrjONxyvUgietuYsuXkyozuL+hCgaJ4uZAIIvKqR/uTAZm76T82ds8+OcWoVgywHJRp+Vgn9Q2N5zf36DI/OWkQuYgRITz0NlT9QTjFwuWi15igdBlfufW/Gzp3mUXfYwj5GfJQBALOIGMzr9VEH6iukqHnA6tpdDOqAo9l5gsjzbPIMGkz66memwj5ZkxSSN69mgi+VEhOebAxSDDbGX0ONGY4gu12UQiiCOYx29LH3D7ANQTOjuyMmFBnHzMMRf+RoSzfrPLqiGvEC7b4vHwdzqCYNsz/cFAEouXFrZ72zzoWgpx62j/yKacRSW/PjmnEK/BOzjcovKfE3+thEybC0sjvDQSrMxQ34BvZM/+pWLXK5dY2QlBlHzRVPxmcw0tqO7dIcklC9GtEBrcr6Oc4U9ry0USIRLphRlP2eC4DOudUhbJ9AjujilVAocGy/BXOufpLJuhbaprux++0RRpxQ3ZdpMP//TiWuw==",
"redirect": {
"method": "GET",
"url": "https://test.adyen.com/hpp/checkout.shtml?u=skipDetails&p=eJxtUl1zmzAQ-DXmzYwE5sMPenAJjmmdtqHGTfuSkcUFaGyJSIKa-PoexHU7nc4wErN7c7e7p4PmskxUCaxsNAibHrh8bmTliE5rkGKYuLTInRNoUXNpV0KoTlq2A2PvLtiVzKSFSnPbKOnaoQWWbNLkw6di93ibfkzzLPlvZQ-a4M0CeqVzeIJxPjBj9ajnD2E7LW*45Wy5pCGN4mXg0SAKF**uNV*aitGvXrK3tw-forjdn5fdWp*LIg88UtzbtviRHVN1X9lNuJ15658z-8Zp*XACtHea3FFCiKPBFPmW1da2M3*FhfgdleDHWhmLSExigpCoQTyrzppatS1oRAzovhFg8PfzW9tMCnVCHzm85YxMT3*3u9Tcga1VOfPX-0SN6v4Oe*aFegoBtSE1qsNBwSgwGCXiMahOz3Fgy*Xg4j2Brus6BsyY9J4fm7KxA-OIR*dkMSfxjoboyCN40OC7c-EybklzMW6JpdhoVAaOwRcyvYu2O7i9514WEYVRFNHYX7ivWf-g796HZdwPqVevzo*irOtzQbLi9Wnxsn1JN9u0gqEs1S-zMtxA"
},
"resultCode": "RedirectShopper"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"additionalData": {
"acquirerCode": "TestPmmAcquirer",
"acquirerReference": "8PQMP9VD896",
"authCode": "098871",
"avsResult": "4 AVS not supported for this card type",
"avsResultRaw": "4",
"cvcResult": "1 Matches",
"cvcResultRaw": "M",
"recurring.recurringDetailReference": "9916178934434753",
"recurring.shopperReference": "YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j",
"recurringProcessingModel": "Subscription",
"refusalReasonRaw": "AUTHORISED"
},
"merchantReference": "string",
"pspReference": "993617895199574A",
"resultCode": "Authorised"
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Submit details for a payment
{{baseUrl}}/payments/details
BODY json
{
"authenticationData": {
"authenticationOnly": false
},
"details": {
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
},
"paymentData": "",
"threeDSAuthenticationOnly": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/payments/details");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/payments/details" {:content-type :json
:form-params {:authenticationData {:authenticationOnly false}
:details {:MD ""
:PaReq ""
:PaRes ""
:billingToken ""
:cupsecureplus.smscode ""
:facilitatorAccessToken ""
:oneTimePasscode ""
:orderID ""
:payerID ""
:payload ""
:paymentID ""
:paymentStatus ""
:redirectResult ""
:resultCode ""
:threeDSResult ""
:threeds2.challengeResult ""
:threeds2.fingerprint ""}
:paymentData ""
:threeDSAuthenticationOnly false}})
require "http/client"
url = "{{baseUrl}}/payments/details"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/payments/details"),
Content = new StringContent("{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/payments/details");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/payments/details"
payload := strings.NewReader("{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/payments/details HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 553
{
"authenticationData": {
"authenticationOnly": false
},
"details": {
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
},
"paymentData": "",
"threeDSAuthenticationOnly": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/payments/details")
.setHeader("content-type", "application/json")
.setBody("{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/payments/details"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/payments/details")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/payments/details")
.header("content-type", "application/json")
.body("{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}")
.asString();
const data = JSON.stringify({
authenticationData: {
authenticationOnly: false
},
details: {
MD: '',
PaReq: '',
PaRes: '',
billingToken: '',
'cupsecureplus.smscode': '',
facilitatorAccessToken: '',
oneTimePasscode: '',
orderID: '',
payerID: '',
payload: '',
paymentID: '',
paymentStatus: '',
redirectResult: '',
resultCode: '',
threeDSResult: '',
'threeds2.challengeResult': '',
'threeds2.fingerprint': ''
},
paymentData: '',
threeDSAuthenticationOnly: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/payments/details');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/details',
headers: {'content-type': 'application/json'},
data: {
authenticationData: {authenticationOnly: false},
details: {
MD: '',
PaReq: '',
PaRes: '',
billingToken: '',
'cupsecureplus.smscode': '',
facilitatorAccessToken: '',
oneTimePasscode: '',
orderID: '',
payerID: '',
payload: '',
paymentID: '',
paymentStatus: '',
redirectResult: '',
resultCode: '',
threeDSResult: '',
'threeds2.challengeResult': '',
'threeds2.fingerprint': ''
},
paymentData: '',
threeDSAuthenticationOnly: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/payments/details';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"authenticationData":{"authenticationOnly":false},"details":{"MD":"","PaReq":"","PaRes":"","billingToken":"","cupsecureplus.smscode":"","facilitatorAccessToken":"","oneTimePasscode":"","orderID":"","payerID":"","payload":"","paymentID":"","paymentStatus":"","redirectResult":"","resultCode":"","threeDSResult":"","threeds2.challengeResult":"","threeds2.fingerprint":""},"paymentData":"","threeDSAuthenticationOnly":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/payments/details',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "authenticationData": {\n "authenticationOnly": false\n },\n "details": {\n "MD": "",\n "PaReq": "",\n "PaRes": "",\n "billingToken": "",\n "cupsecureplus.smscode": "",\n "facilitatorAccessToken": "",\n "oneTimePasscode": "",\n "orderID": "",\n "payerID": "",\n "payload": "",\n "paymentID": "",\n "paymentStatus": "",\n "redirectResult": "",\n "resultCode": "",\n "threeDSResult": "",\n "threeds2.challengeResult": "",\n "threeds2.fingerprint": ""\n },\n "paymentData": "",\n "threeDSAuthenticationOnly": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/payments/details")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/payments/details',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
authenticationData: {authenticationOnly: false},
details: {
MD: '',
PaReq: '',
PaRes: '',
billingToken: '',
'cupsecureplus.smscode': '',
facilitatorAccessToken: '',
oneTimePasscode: '',
orderID: '',
payerID: '',
payload: '',
paymentID: '',
paymentStatus: '',
redirectResult: '',
resultCode: '',
threeDSResult: '',
'threeds2.challengeResult': '',
'threeds2.fingerprint': ''
},
paymentData: '',
threeDSAuthenticationOnly: false
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/details',
headers: {'content-type': 'application/json'},
body: {
authenticationData: {authenticationOnly: false},
details: {
MD: '',
PaReq: '',
PaRes: '',
billingToken: '',
'cupsecureplus.smscode': '',
facilitatorAccessToken: '',
oneTimePasscode: '',
orderID: '',
payerID: '',
payload: '',
paymentID: '',
paymentStatus: '',
redirectResult: '',
resultCode: '',
threeDSResult: '',
'threeds2.challengeResult': '',
'threeds2.fingerprint': ''
},
paymentData: '',
threeDSAuthenticationOnly: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/payments/details');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
authenticationData: {
authenticationOnly: false
},
details: {
MD: '',
PaReq: '',
PaRes: '',
billingToken: '',
'cupsecureplus.smscode': '',
facilitatorAccessToken: '',
oneTimePasscode: '',
orderID: '',
payerID: '',
payload: '',
paymentID: '',
paymentStatus: '',
redirectResult: '',
resultCode: '',
threeDSResult: '',
'threeds2.challengeResult': '',
'threeds2.fingerprint': ''
},
paymentData: '',
threeDSAuthenticationOnly: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/payments/details',
headers: {'content-type': 'application/json'},
data: {
authenticationData: {authenticationOnly: false},
details: {
MD: '',
PaReq: '',
PaRes: '',
billingToken: '',
'cupsecureplus.smscode': '',
facilitatorAccessToken: '',
oneTimePasscode: '',
orderID: '',
payerID: '',
payload: '',
paymentID: '',
paymentStatus: '',
redirectResult: '',
resultCode: '',
threeDSResult: '',
'threeds2.challengeResult': '',
'threeds2.fingerprint': ''
},
paymentData: '',
threeDSAuthenticationOnly: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/payments/details';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"authenticationData":{"authenticationOnly":false},"details":{"MD":"","PaReq":"","PaRes":"","billingToken":"","cupsecureplus.smscode":"","facilitatorAccessToken":"","oneTimePasscode":"","orderID":"","payerID":"","payload":"","paymentID":"","paymentStatus":"","redirectResult":"","resultCode":"","threeDSResult":"","threeds2.challengeResult":"","threeds2.fingerprint":""},"paymentData":"","threeDSAuthenticationOnly":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"authenticationData": @{ @"authenticationOnly": @NO },
@"details": @{ @"MD": @"", @"PaReq": @"", @"PaRes": @"", @"billingToken": @"", @"cupsecureplus.smscode": @"", @"facilitatorAccessToken": @"", @"oneTimePasscode": @"", @"orderID": @"", @"payerID": @"", @"payload": @"", @"paymentID": @"", @"paymentStatus": @"", @"redirectResult": @"", @"resultCode": @"", @"threeDSResult": @"", @"threeds2.challengeResult": @"", @"threeds2.fingerprint": @"" },
@"paymentData": @"",
@"threeDSAuthenticationOnly": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/payments/details"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/payments/details" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/payments/details",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'authenticationData' => [
'authenticationOnly' => null
],
'details' => [
'MD' => '',
'PaReq' => '',
'PaRes' => '',
'billingToken' => '',
'cupsecureplus.smscode' => '',
'facilitatorAccessToken' => '',
'oneTimePasscode' => '',
'orderID' => '',
'payerID' => '',
'payload' => '',
'paymentID' => '',
'paymentStatus' => '',
'redirectResult' => '',
'resultCode' => '',
'threeDSResult' => '',
'threeds2.challengeResult' => '',
'threeds2.fingerprint' => ''
],
'paymentData' => '',
'threeDSAuthenticationOnly' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/payments/details', [
'body' => '{
"authenticationData": {
"authenticationOnly": false
},
"details": {
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
},
"paymentData": "",
"threeDSAuthenticationOnly": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/payments/details');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'authenticationData' => [
'authenticationOnly' => null
],
'details' => [
'MD' => '',
'PaReq' => '',
'PaRes' => '',
'billingToken' => '',
'cupsecureplus.smscode' => '',
'facilitatorAccessToken' => '',
'oneTimePasscode' => '',
'orderID' => '',
'payerID' => '',
'payload' => '',
'paymentID' => '',
'paymentStatus' => '',
'redirectResult' => '',
'resultCode' => '',
'threeDSResult' => '',
'threeds2.challengeResult' => '',
'threeds2.fingerprint' => ''
],
'paymentData' => '',
'threeDSAuthenticationOnly' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'authenticationData' => [
'authenticationOnly' => null
],
'details' => [
'MD' => '',
'PaReq' => '',
'PaRes' => '',
'billingToken' => '',
'cupsecureplus.smscode' => '',
'facilitatorAccessToken' => '',
'oneTimePasscode' => '',
'orderID' => '',
'payerID' => '',
'payload' => '',
'paymentID' => '',
'paymentStatus' => '',
'redirectResult' => '',
'resultCode' => '',
'threeDSResult' => '',
'threeds2.challengeResult' => '',
'threeds2.fingerprint' => ''
],
'paymentData' => '',
'threeDSAuthenticationOnly' => null
]));
$request->setRequestUrl('{{baseUrl}}/payments/details');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/payments/details' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"authenticationData": {
"authenticationOnly": false
},
"details": {
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
},
"paymentData": "",
"threeDSAuthenticationOnly": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/payments/details' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"authenticationData": {
"authenticationOnly": false
},
"details": {
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
},
"paymentData": "",
"threeDSAuthenticationOnly": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/payments/details", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/payments/details"
payload = {
"authenticationData": { "authenticationOnly": False },
"details": {
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
},
"paymentData": "",
"threeDSAuthenticationOnly": False
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/payments/details"
payload <- "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/payments/details")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/payments/details') do |req|
req.body = "{\n \"authenticationData\": {\n \"authenticationOnly\": false\n },\n \"details\": {\n \"MD\": \"\",\n \"PaReq\": \"\",\n \"PaRes\": \"\",\n \"billingToken\": \"\",\n \"cupsecureplus.smscode\": \"\",\n \"facilitatorAccessToken\": \"\",\n \"oneTimePasscode\": \"\",\n \"orderID\": \"\",\n \"payerID\": \"\",\n \"payload\": \"\",\n \"paymentID\": \"\",\n \"paymentStatus\": \"\",\n \"redirectResult\": \"\",\n \"resultCode\": \"\",\n \"threeDSResult\": \"\",\n \"threeds2.challengeResult\": \"\",\n \"threeds2.fingerprint\": \"\"\n },\n \"paymentData\": \"\",\n \"threeDSAuthenticationOnly\": false\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/payments/details";
let payload = json!({
"authenticationData": json!({"authenticationOnly": false}),
"details": json!({
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
}),
"paymentData": "",
"threeDSAuthenticationOnly": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/payments/details \
--header 'content-type: application/json' \
--data '{
"authenticationData": {
"authenticationOnly": false
},
"details": {
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
},
"paymentData": "",
"threeDSAuthenticationOnly": false
}'
echo '{
"authenticationData": {
"authenticationOnly": false
},
"details": {
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
},
"paymentData": "",
"threeDSAuthenticationOnly": false
}' | \
http POST {{baseUrl}}/payments/details \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "authenticationData": {\n "authenticationOnly": false\n },\n "details": {\n "MD": "",\n "PaReq": "",\n "PaRes": "",\n "billingToken": "",\n "cupsecureplus.smscode": "",\n "facilitatorAccessToken": "",\n "oneTimePasscode": "",\n "orderID": "",\n "payerID": "",\n "payload": "",\n "paymentID": "",\n "paymentStatus": "",\n "redirectResult": "",\n "resultCode": "",\n "threeDSResult": "",\n "threeds2.challengeResult": "",\n "threeds2.fingerprint": ""\n },\n "paymentData": "",\n "threeDSAuthenticationOnly": false\n}' \
--output-document \
- {{baseUrl}}/payments/details
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"authenticationData": ["authenticationOnly": false],
"details": [
"MD": "",
"PaReq": "",
"PaRes": "",
"billingToken": "",
"cupsecureplus.smscode": "",
"facilitatorAccessToken": "",
"oneTimePasscode": "",
"orderID": "",
"payerID": "",
"payload": "",
"paymentID": "",
"paymentStatus": "",
"redirectResult": "",
"resultCode": "",
"threeDSResult": "",
"threeds2.challengeResult": "",
"threeds2.fingerprint": ""
],
"paymentData": "",
"threeDSAuthenticationOnly": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/payments/details")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
DELETE
Delete a token for stored payment details
{{baseUrl}}/storedPaymentMethods/:recurringId
QUERY PARAMS
shopperReference
merchantAccount
recurringId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/storedPaymentMethods/:recurringId" {:query-params {:shopperReference ""
:merchantAccount ""}})
require "http/client"
url = "{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount="
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount="),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount="
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount= HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount="))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/storedPaymentMethods/:recurringId',
params: {shopperReference: '', merchantAccount: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/storedPaymentMethods/:recurringId',
qs: {shopperReference: '', merchantAccount: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/storedPaymentMethods/:recurringId');
req.query({
shopperReference: '',
merchantAccount: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/storedPaymentMethods/:recurringId',
params: {shopperReference: '', merchantAccount: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount="]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=');
echo $response->getBody();
setUrl('{{baseUrl}}/storedPaymentMethods/:recurringId');
$request->setMethod(HTTP_METH_DELETE);
$request->setQueryData([
'shopperReference' => '',
'merchantAccount' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/storedPaymentMethods/:recurringId');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
'shopperReference' => '',
'merchantAccount' => ''
]));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/storedPaymentMethods/:recurringId"
querystring = {"shopperReference":"","merchantAccount":""}
response = requests.delete(url, params=querystring)
print(response.json())
library(httr)
url <- "{{baseUrl}}/storedPaymentMethods/:recurringId"
queryString <- list(
shopperReference = "",
merchantAccount = ""
)
response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/storedPaymentMethods/:recurringId') do |req|
req.params['shopperReference'] = ''
req.params['merchantAccount'] = ''
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/storedPaymentMethods/:recurringId";
let querystring = [
("shopperReference", ""),
("merchantAccount", ""),
];
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.query(&querystring)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount='
http DELETE '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount='
wget --quiet \
--method DELETE \
--output-document \
- '{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount='
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/storedPaymentMethods/:recurringId?shopperReference=&merchantAccount=")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get tokens for stored payment details
{{baseUrl}}/storedPaymentMethods
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/storedPaymentMethods");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/storedPaymentMethods")
require "http/client"
url = "{{baseUrl}}/storedPaymentMethods"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/storedPaymentMethods"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/storedPaymentMethods");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/storedPaymentMethods"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/storedPaymentMethods HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/storedPaymentMethods")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/storedPaymentMethods"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/storedPaymentMethods")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/storedPaymentMethods")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/storedPaymentMethods');
xhr.send(data);
import axios from 'axios';
const options = {method: 'GET', url: '{{baseUrl}}/storedPaymentMethods'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/storedPaymentMethods';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/storedPaymentMethods',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/storedPaymentMethods")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/storedPaymentMethods',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {method: 'GET', url: '{{baseUrl}}/storedPaymentMethods'};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/storedPaymentMethods');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {method: 'GET', url: '{{baseUrl}}/storedPaymentMethods'};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/storedPaymentMethods';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/storedPaymentMethods"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/storedPaymentMethods" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/storedPaymentMethods",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/storedPaymentMethods');
echo $response->getBody();
setUrl('{{baseUrl}}/storedPaymentMethods');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/storedPaymentMethods');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/storedPaymentMethods' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/storedPaymentMethods' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/storedPaymentMethods")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/storedPaymentMethods"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/storedPaymentMethods"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/storedPaymentMethods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/storedPaymentMethods') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/storedPaymentMethods";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/storedPaymentMethods
http GET {{baseUrl}}/storedPaymentMethods
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/storedPaymentMethods
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/storedPaymentMethods")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Create originKey values for domains
{{baseUrl}}/originKeys
BODY json
{
"originDomains": []
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/originKeys");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"originDomains\": []\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/originKeys" {:content-type :json
:form-params {:originDomains []}})
require "http/client"
url = "{{baseUrl}}/originKeys"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"originDomains\": []\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/originKeys"),
Content = new StringContent("{\n \"originDomains\": []\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/originKeys");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"originDomains\": []\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/originKeys"
payload := strings.NewReader("{\n \"originDomains\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/originKeys HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 25
{
"originDomains": []
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/originKeys")
.setHeader("content-type", "application/json")
.setBody("{\n \"originDomains\": []\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/originKeys"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"originDomains\": []\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"originDomains\": []\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/originKeys")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/originKeys")
.header("content-type", "application/json")
.body("{\n \"originDomains\": []\n}")
.asString();
const data = JSON.stringify({
originDomains: []
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/originKeys');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/originKeys',
headers: {'content-type': 'application/json'},
data: {originDomains: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/originKeys';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"originDomains":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/originKeys',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "originDomains": []\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"originDomains\": []\n}")
val request = Request.Builder()
.url("{{baseUrl}}/originKeys")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/originKeys',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({originDomains: []}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/originKeys',
headers: {'content-type': 'application/json'},
body: {originDomains: []},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/originKeys');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
originDomains: []
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/originKeys',
headers: {'content-type': 'application/json'},
data: {originDomains: []}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/originKeys';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"originDomains":[]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"originDomains": @[ ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/originKeys"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/originKeys" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"originDomains\": []\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/originKeys",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'originDomains' => [
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/originKeys', [
'body' => '{
"originDomains": []
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/originKeys');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'originDomains' => [
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'originDomains' => [
]
]));
$request->setRequestUrl('{{baseUrl}}/originKeys');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/originKeys' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"originDomains": []
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/originKeys' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"originDomains": []
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"originDomains\": []\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/originKeys", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/originKeys"
payload = { "originDomains": [] }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/originKeys"
payload <- "{\n \"originDomains\": []\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/originKeys")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"originDomains\": []\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/originKeys') do |req|
req.body = "{\n \"originDomains\": []\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/originKeys";
let payload = json!({"originDomains": ()});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/originKeys \
--header 'content-type: application/json' \
--data '{
"originDomains": []
}'
echo '{
"originDomains": []
}' | \
http POST {{baseUrl}}/originKeys \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "originDomains": []\n}' \
--output-document \
- {{baseUrl}}/originKeys
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["originDomains": []] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/originKeys")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"originKeys": {
"https://www.your-domain1.com": "pub.v2.8116178901076090.aHR0cHM6Ly93d3cueW91ci1kb21haW4xLmNvbQ.pvbYlrXz0ICP4kwMJXDGDLVMqALhwXr1MSRjT-fkhvw",
"https://www.your-domain2.com": "pub.v2.8116178901076090.aHR0cHM6Ly93d3cueW91ci1kb21haW4yLmNvbQ.LdN9kvJ35fYFFiBSJA4idMnwwxJ5_yXpeNS__Ap5wkg",
"https://www.your-domain3.com": "pub.v2.8116178901076090.aHR0cHM6Ly93d3cueW91ci1kb21haW4zLmNvbQ.FrTpVz7_RzAywKasM0kXCRoMfoMkKIKaxjFymRGORIc"
}
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "702",
"errorType": "validation",
"message": "Unexpected input: \", expected: }",
"status": 400
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "000",
"errorType": "security",
"message": "HTTP Status Response - Unauthorized",
"status": 401
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "901",
"errorType": "security",
"message": "Invalid Merchant Account",
"pspReference": "881611827877203B",
"status": 403
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "14_030",
"errorType": "validation",
"message": "Return URL is missing.",
"pspReference": "8816118280275544",
"status": 422
}
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"errorCode": "905",
"errorType": "configuration",
"message": "Payment details are not supported",
"pspReference": "8516091485743033",
"status": 500
}
POST
Get an Apple Pay session
{{baseUrl}}/applePay/sessions
BODY json
{
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/applePay/sessions");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/applePay/sessions" {:content-type :json
:form-params {:displayName ""
:domainName ""
:merchantIdentifier ""}})
require "http/client"
url = "{{baseUrl}}/applePay/sessions"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/applePay/sessions"),
Content = new StringContent("{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/applePay/sessions");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/applePay/sessions"
payload := strings.NewReader("{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/applePay/sessions HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 71
{
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/applePay/sessions")
.setHeader("content-type", "application/json")
.setBody("{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/applePay/sessions"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/applePay/sessions")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/applePay/sessions")
.header("content-type", "application/json")
.body("{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}")
.asString();
const data = JSON.stringify({
displayName: '',
domainName: '',
merchantIdentifier: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/applePay/sessions');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/applePay/sessions',
headers: {'content-type': 'application/json'},
data: {displayName: '', domainName: '', merchantIdentifier: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/applePay/sessions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayName":"","domainName":"","merchantIdentifier":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/applePay/sessions',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "displayName": "",\n "domainName": "",\n "merchantIdentifier": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/applePay/sessions")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/applePay/sessions',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({displayName: '', domainName: '', merchantIdentifier: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/applePay/sessions',
headers: {'content-type': 'application/json'},
body: {displayName: '', domainName: '', merchantIdentifier: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/applePay/sessions');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
displayName: '',
domainName: '',
merchantIdentifier: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/applePay/sessions',
headers: {'content-type': 'application/json'},
data: {displayName: '', domainName: '', merchantIdentifier: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/applePay/sessions';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"displayName":"","domainName":"","merchantIdentifier":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"displayName": @"",
@"domainName": @"",
@"merchantIdentifier": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/applePay/sessions"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/applePay/sessions" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/applePay/sessions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'displayName' => '',
'domainName' => '',
'merchantIdentifier' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/applePay/sessions', [
'body' => '{
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/applePay/sessions');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'displayName' => '',
'domainName' => '',
'merchantIdentifier' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'displayName' => '',
'domainName' => '',
'merchantIdentifier' => ''
]));
$request->setRequestUrl('{{baseUrl}}/applePay/sessions');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/applePay/sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/applePay/sessions' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/applePay/sessions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/applePay/sessions"
payload = {
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/applePay/sessions"
payload <- "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/applePay/sessions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/applePay/sessions') do |req|
req.body = "{\n \"displayName\": \"\",\n \"domainName\": \"\",\n \"merchantIdentifier\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/applePay/sessions";
let payload = json!({
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/applePay/sessions \
--header 'content-type: application/json' \
--data '{
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
}'
echo '{
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
}' | \
http POST {{baseUrl}}/applePay/sessions \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "displayName": "",\n "domainName": "",\n "merchantIdentifier": ""\n}' \
--output-document \
- {{baseUrl}}/applePay/sessions
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"displayName": "",
"domainName": "",
"merchantIdentifier": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/applePay/sessions")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
RESPONSE HEADERS
Content-Type
application/json
RESPONSE BODY json
{
"data": "eyJ2Z..."
}