curl -X POST "https://testapi.linksmerchantservices.com/api/payments/<identifier>/authorize" \
-H "Content-Type: application/json" \
-d '{
"paymentMethodIdentifier": "string",
"paymentMethodType": "Unknown",
"card": {
"cardNumber": "string",
"cardExpiryMonth": 0,
"cardExpiryYear": 0,
"cardHolderName": "string",
"cardCvv": "string"
},
"billingInformation": {
"firstLine": "string",
"secondLine": "string",
"city": "string",
"region": "string",
"zipCode": "string",
"countryAlpha3Code": "string"
},
"payment": {
"paymentType": "Unknown",
"paymentMode": "Unknown",
"paymentSource": "Unknown",
"previousTransactionId": "string"
},
"customer": {
"customerId": "string",
"customerPhoneCountryCode": "string",
"customerPhoneNumber": "string",
"customerMobileCountryCode": "string",
"customerMobileNumber": "string",
"customerEmail": "string",
"customerIpAddress": "string",
"merchantName": "string"
},
"device": {
"browserDeviceId": "string",
"mobileDeviceId": "string"
},
"autoCapture": true
}' const response = await fetch ( `https://testapi.linksmerchantservices.com/api/payments/${ identifier }/authorize` , {
method: 'POST' ,
headers: { 'Content-Type' : 'application/json' },
body: JSON . stringify ({
"paymentMethodIdentifier" : "string" ,
"paymentMethodType" : "Unknown" ,
"card" : {
"cardNumber" : "string" ,
"cardExpiryMonth" : 0 ,
"cardExpiryYear" : 0 ,
"cardHolderName" : "string" ,
"cardCvv" : "string"
},
"billingInformation" : {
"firstLine" : "string" ,
"secondLine" : "string" ,
"city" : "string" ,
"region" : "string" ,
"zipCode" : "string" ,
"countryAlpha3Code" : "string"
},
"payment" : {
"paymentType" : "Unknown" ,
"paymentMode" : "Unknown" ,
"paymentSource" : "Unknown" ,
"previousTransactionId" : "string"
},
"customer" : {
"customerId" : "string" ,
"customerPhoneCountryCode" : "string" ,
"customerPhoneNumber" : "string" ,
"customerMobileCountryCode" : "string" ,
"customerMobileNumber" : "string" ,
"customerEmail" : "string" ,
"customerIpAddress" : "string" ,
"merchantName" : "string"
},
"device" : {
"browserDeviceId" : "string" ,
"mobileDeviceId" : "string"
},
"autoCapture" : true
})
});
const data = await response. json (); import requests
response = requests.request(
"POST" ,
"https://testapi.linksmerchantservices.com/api/payments/ {identifier} /authorize" ,
json = {
"paymentMethodIdentifier" : "string" ,
"paymentMethodType" : "Unknown" ,
"card" : {
"cardNumber" : "string" ,
"cardExpiryMonth" : 0 ,
"cardExpiryYear" : 0 ,
"cardHolderName" : "string" ,
"cardCvv" : "string"
},
"billingInformation" : {
"firstLine" : "string" ,
"secondLine" : "string" ,
"city" : "string" ,
"region" : "string" ,
"zipCode" : "string" ,
"countryAlpha3Code" : "string"
},
"payment" : {
"paymentType" : "Unknown" ,
"paymentMode" : "Unknown" ,
"paymentSource" : "Unknown" ,
"previousTransactionId" : "string"
},
"customer" : {
"customerId" : "string" ,
"customerPhoneCountryCode" : "string" ,
"customerPhoneNumber" : "string" ,
"customerMobileCountryCode" : "string" ,
"customerMobileNumber" : "string" ,
"customerEmail" : "string" ,
"customerIpAddress" : "string" ,
"merchantName" : "string"
},
"device" : {
"browserDeviceId" : "string" ,
"mobileDeviceId" : "string"
},
"autoCapture" : True
},
)
data = response.json() <? php
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://testapi.linksmerchantservices.com/api/payments/<identifier>/authorize" );
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 , '{
"paymentMethodIdentifier": "string",
"paymentMethodType": "Unknown",
"card": {
"cardNumber": "string",
"cardExpiryMonth": 0,
"cardExpiryYear": 0,
"cardHolderName": "string",
"cardCvv": "string"
},
"billingInformation": {
"firstLine": "string",
"secondLine": "string",
"city": "string",
"region": "string",
"zipCode": "string",
"countryAlpha3Code": "string"
},
"payment": {
"paymentType": "Unknown",
"paymentMode": "Unknown",
"paymentSource": "Unknown",
"previousTransactionId": "string"
},
"customer": {
"customerId": "string",
"customerPhoneCountryCode": "string",
"customerPhoneNumber": "string",
"customerMobileCountryCode": "string",
"customerMobileNumber": "string",
"customerEmail": "string",
"customerIpAddress": "string",
"merchantName": "string"
},
"device": {
"browserDeviceId": "string",
"mobileDeviceId": "string"
},
"autoCapture": true
}' );
$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/payments/<identifier>/authorize" , strings. NewReader ( `{
"paymentMethodIdentifier": "string",
"paymentMethodType": "Unknown",
"card": {
"cardNumber": "string",
"cardExpiryMonth": 0,
"cardExpiryYear": 0,
"cardHolderName": "string",
"cardCvv": "string"
},
"billingInformation": {
"firstLine": "string",
"secondLine": "string",
"city": "string",
"region": "string",
"zipCode": "string",
"countryAlpha3Code": "string"
},
"payment": {
"paymentType": "Unknown",
"paymentMode": "Unknown",
"paymentSource": "Unknown",
"previousTransactionId": "string"
},
"customer": {
"customerId": "string",
"customerPhoneCountryCode": "string",
"customerPhoneNumber": "string",
"customerMobileCountryCode": "string",
"customerMobileNumber": "string",
"customerEmail": "string",
"customerIpAddress": "string",
"merchantName": "string"
},
"device": {
"browserDeviceId": "string",
"mobileDeviceId": "string"
},
"autoCapture": true
}` ))
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/payments/<identifier>/authorize" ))
. header ( "Content-Type" , "application/json" )
. method ( "POST" , HttpRequest.BodyPublishers. ofString ( "{ \n \" paymentMethodIdentifier \" : \" string \" , \n \" paymentMethodType \" : \" Unknown \" , \n \" card \" : { \n \" cardNumber \" : \" string \" , \n \" cardExpiryMonth \" : 0, \n \" cardExpiryYear \" : 0, \n \" cardHolderName \" : \" string \" , \n \" cardCvv \" : \" string \"\n }, \n \" billingInformation \" : { \n \" firstLine \" : \" string \" , \n \" secondLine \" : \" string \" , \n \" city \" : \" string \" , \n \" region \" : \" string \" , \n \" zipCode \" : \" string \" , \n \" countryAlpha3Code \" : \" string \"\n }, \n \" payment \" : { \n \" paymentType \" : \" Unknown \" , \n \" paymentMode \" : \" Unknown \" , \n \" paymentSource \" : \" Unknown \" , \n \" previousTransactionId \" : \" string \"\n }, \n \" customer \" : { \n \" customerId \" : \" string \" , \n \" customerPhoneCountryCode \" : \" string \" , \n \" customerPhoneNumber \" : \" string \" , \n \" customerMobileCountryCode \" : \" string \" , \n \" customerMobileNumber \" : \" string \" , \n \" customerEmail \" : \" string \" , \n \" customerIpAddress \" : \" string \" , \n \" merchantName \" : \" string \"\n }, \n \" device \" : { \n \" browserDeviceId \" : \" string \" , \n \" mobileDeviceId \" : \" string \"\n }, \n \" autoCapture \" : true \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/payments/<identifier>/authorize" )
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 \" paymentMethodIdentifier \" : \" string \" , \n \" paymentMethodType \" : \" Unknown \" , \n \" card \" : { \n \" cardNumber \" : \" string \" , \n \" cardExpiryMonth \" : 0, \n \" cardExpiryYear \" : 0, \n \" cardHolderName \" : \" string \" , \n \" cardCvv \" : \" string \"\n }, \n \" billingInformation \" : { \n \" firstLine \" : \" string \" , \n \" secondLine \" : \" string \" , \n \" city \" : \" string \" , \n \" region \" : \" string \" , \n \" zipCode \" : \" string \" , \n \" countryAlpha3Code \" : \" string \"\n }, \n \" payment \" : { \n \" paymentType \" : \" Unknown \" , \n \" paymentMode \" : \" Unknown \" , \n \" paymentSource \" : \" Unknown \" , \n \" previousTransactionId \" : \" string \"\n }, \n \" customer \" : { \n \" customerId \" : \" string \" , \n \" customerPhoneCountryCode \" : \" string \" , \n \" customerPhoneNumber \" : \" string \" , \n \" customerMobileCountryCode \" : \" string \" , \n \" customerMobileNumber \" : \" string \" , \n \" customerEmail \" : \" string \" , \n \" customerIpAddress \" : \" string \" , \n \" merchantName \" : \" string \"\n }, \n \" device \" : { \n \" browserDeviceId \" : \" string \" , \n \" mobileDeviceId \" : \" string \"\n }, \n \" autoCapture \" : true \n }"
response = http. request (request)
puts response. body ⧉