curl -X POST "https://testapi.linksmerchantservices.com/api/paymentmethod/update" \
-H "Content-Type: application/json" \
-d '{
"paymentMethodType": "string",
"card": {
"cardNumber": "string",
"expiryMonth": 0,
"expiryYear": 0,
"cardHolderName": "string",
"cvv": "string",
"creditCardBrand": "Unknown"
},
"billingInformation": {
"firstLine": "string",
"secondLine": "string",
"city": "string",
"region": "string",
"zipCode": "string",
"countryAlpha3Code": "string",
"countryId": 0
},
"merchantIdentifier": "string",
"paymentMethodIdentifier": "string"
}' const response = await fetch ( `https://testapi.linksmerchantservices.com/api/paymentmethod/update` , {
method: 'POST' ,
headers: { 'Content-Type' : 'application/json' },
body: JSON . stringify ({
"paymentMethodType" : "string" ,
"card" : {
"cardNumber" : "string" ,
"expiryMonth" : 0 ,
"expiryYear" : 0 ,
"cardHolderName" : "string" ,
"cvv" : "string" ,
"creditCardBrand" : "Unknown"
},
"billingInformation" : {
"firstLine" : "string" ,
"secondLine" : "string" ,
"city" : "string" ,
"region" : "string" ,
"zipCode" : "string" ,
"countryAlpha3Code" : "string" ,
"countryId" : 0
},
"merchantIdentifier" : "string" ,
"paymentMethodIdentifier" : "string"
})
});
const data = await response. json (); import requests
response = requests.request(
"POST" ,
"https://testapi.linksmerchantservices.com/api/paymentmethod/update" ,
json = {
"paymentMethodType" : "string" ,
"card" : {
"cardNumber" : "string" ,
"expiryMonth" : 0 ,
"expiryYear" : 0 ,
"cardHolderName" : "string" ,
"cvv" : "string" ,
"creditCardBrand" : "Unknown"
},
"billingInformation" : {
"firstLine" : "string" ,
"secondLine" : "string" ,
"city" : "string" ,
"region" : "string" ,
"zipCode" : "string" ,
"countryAlpha3Code" : "string" ,
"countryId" : 0
},
"merchantIdentifier" : "string" ,
"paymentMethodIdentifier" : "string"
},
)
data = response.json() <? php
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://testapi.linksmerchantservices.com/api/paymentmethod/update" );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST , "POST" );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [ "Content-Type: application/json" ]);
curl_setopt ($ch, CURLOPT_POSTFIELDS , '{
"paymentMethodType": "string",
"card": {
"cardNumber": "string",
"expiryMonth": 0,
"expiryYear": 0,
"cardHolderName": "string",
"cvv": "string",
"creditCardBrand": "Unknown"
},
"billingInformation": {
"firstLine": "string",
"secondLine": "string",
"city": "string",
"region": "string",
"zipCode": "string",
"countryAlpha3Code": "string",
"countryId": 0
},
"merchantIdentifier": "string",
"paymentMethodIdentifier": "string"
}' );
$response = curl_exec ($ch);
curl_close ($ch); package main
import (
" fmt "
" io "
" net/http "
" strings "
)
func main () {
req, _ := http. NewRequest ( "POST" , "https://testapi.linksmerchantservices.com/api/paymentmethod/update" , strings. NewReader ( `{
"paymentMethodType": "string",
"card": {
"cardNumber": "string",
"expiryMonth": 0,
"expiryYear": 0,
"cardHolderName": "string",
"cvv": "string",
"creditCardBrand": "Unknown"
},
"billingInformation": {
"firstLine": "string",
"secondLine": "string",
"city": "string",
"region": "string",
"zipCode": "string",
"countryAlpha3Code": "string",
"countryId": 0
},
"merchantIdentifier": "string",
"paymentMethodIdentifier": "string"
}` ))
req.Header. Set ( "Content-Type" , "application/json" )
resp, err := http.DefaultClient. Do (req)
if err != nil {
panic (err)
}
defer resp.Body. Close ()
data, _ := io. ReadAll (resp.Body)
fmt. Println ( string (data))
} HttpClient client = HttpClient. newHttpClient ();
HttpRequest request = HttpRequest. newBuilder ()
. uri (URI. create ( "https://testapi.linksmerchantservices.com/api/paymentmethod/update" ))
. header ( "Content-Type" , "application/json" )
. method ( "POST" , HttpRequest.BodyPublishers. ofString ( "{ \n \" paymentMethodType \" : \" string \" , \n \" card \" : { \n \" cardNumber \" : \" string \" , \n \" expiryMonth \" : 0, \n \" expiryYear \" : 0, \n \" cardHolderName \" : \" string \" , \n \" cvv \" : \" string \" , \n \" creditCardBrand \" : \" Unknown \"\n }, \n \" billingInformation \" : { \n \" firstLine \" : \" string \" , \n \" secondLine \" : \" string \" , \n \" city \" : \" string \" , \n \" region \" : \" string \" , \n \" zipCode \" : \" string \" , \n \" countryAlpha3Code \" : \" string \" , \n \" countryId \" : 0 \n }, \n \" merchantIdentifier \" : \" string \" , \n \" paymentMethodIdentifier \" : \" string \"\n }" ))
. build ();
HttpResponse< String > response = client. send (request, HttpResponse.BodyHandlers. ofString ());
System.out. println (response. body ()); require "net/http"
require "uri"
uri = URI ( "https://testapi.linksmerchantservices.com/api/paymentmethod/update" )
http = Net :: HTTP . new (uri. host , uri. port )
http. use_ssl = uri. scheme == "https"
request = Net :: HTTP :: Post . new (uri)
request[ "Content-Type" ] = "application/json"
request. body = "{ \n \" paymentMethodType \" : \" string \" , \n \" card \" : { \n \" cardNumber \" : \" string \" , \n \" expiryMonth \" : 0, \n \" expiryYear \" : 0, \n \" cardHolderName \" : \" string \" , \n \" cvv \" : \" string \" , \n \" creditCardBrand \" : \" Unknown \"\n }, \n \" billingInformation \" : { \n \" firstLine \" : \" string \" , \n \" secondLine \" : \" string \" , \n \" city \" : \" string \" , \n \" region \" : \" string \" , \n \" zipCode \" : \" string \" , \n \" countryAlpha3Code \" : \" string \" , \n \" countryId \" : 0 \n }, \n \" merchantIdentifier \" : \" string \" , \n \" paymentMethodIdentifier \" : \" string \"\n }"
response = http. request (request)
puts response. body ⧉