/api/affiliate/payvia‑type
get
Get payvia type information for an affiliate
Authorizations
api-keystringRequired
api-usernamestringRequired
Query parameters
loginidintegerRequired
payvia_type_idintegerRequired
allow_disabled_payviastringOptional
Responses
200
success
successbooleanOptionalExample:
trueget/api/affiliate/payvia-type
PHP (cURL)<?php
$headers = array( //set your username and API key here
'api-key: 44b5498dbcb481a0d00b404c0169af62',
'api-username: tmm1phrvezsbu'
);
$url = 'https://yourdomain.com'; //set your NATS URL here
$data = array(
'loginid' => '3',
'payvia_type_id' => 1
);
$request = array(
'method' => 'GET',
'path' => 'affiliate/payvia-type',
'data' => $data
);
/*code below is the same for (almost) every API call */
$curl = curl_init();
$url = $url.'/api/'.$request['path'];
$query = http_build_query($request['data']);
if($request['method'] == 'GET'){
//add query string parameters to the end of the url
$url = $url.'?'.$query;
}else{
//send parameters as POST fields
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $query);
if($request['method'] != 'POST'){
$headers[] ='X-HTTP-Method: '.$request['method']; //send custom request method
}
}
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($curl);
//dumps an associative array representation of the json
var_dump(json_decode($resp, true));
// Close request to clear up some resources
curl_close($curl);
?>200
success
{
"success": true,
"payvia_type": {
"payvia_type_id": "1",
"name": "Check",
"description": "Check By Mail",
"dumpid": "8",
"minimum": [
"50",
"100",
"250",
"500",
"1000",
"2500"
],
"enabled": "1",
"cost": "0",
"protection": "1",
"deleted": "0",
"dump_name": "Check Default",
"lang_name": "Check",
"cost_nice": "$0.00",
"cost_dec": "0.00",
"form": [
{
"payvia_field_id": "1",
"payvia_type_id": "1",
"name": "Pay To",
"type": "0",
"required": "1",
"min": "1",
"max": "64",
"orderid": "1",
"is_unique": "1",
"protection": "0",
"check_function": "",
"deleted": "0",
"payvia_hash": "1",
"value": ""
},
{
"payvia_field_id": "30",
"payvia_type_id": "1",
"name": "Address",
"type": "0",
"required": "0",
"min": "0",
"max": "255",
"orderid": "2",
"is_unique": "0",
"protection": "0",
"check_function": "",
"deleted": "0",
"payvia_hash": "0",
"value": ""
},
{
"payvia_field_id": "31",
"payvia_type_id": "1",
"name": "Address 2",
"type": "0",
"required": "0",
"min": "0",
"max": "255",
"orderid": "3",
"is_unique": "0",
"protection": "0",
"check_function": "",
"deleted": "0",
"payvia_hash": "0",
"value": ""
},
{
"payvia_field_id": "32",
"payvia_type_id": "1",
"name": "City",
"type": "0",
"required": "0",
"min": "0",
"max": "128",
"orderid": "4",
"is_unique": "0",
"protection": "0",
"check_function": "",
"deleted": "0",
"payvia_hash": "0",
"value": ""
},
{
"payvia_field_id": "33",
"payvia_type_id": "1",
"name": "State",
"type": "0",
"required": "0",
"min": "0",
"max": "128",
"orderid": "5",
"is_unique": "0",
"protection": "0",
"check_function": "",
"deleted": "0",
"payvia_hash": "0",
"value": ""
},
{
"payvia_field_id": "34",
"payvia_type_id": "1",
"name": "Zip Code",
"type": "0",
"required": "0",
"min": "0",
"max": "64",
"orderid": "6",
"is_unique": "0",
"protection": "0",
"check_function": "",
"deleted": "0",
"payvia_hash": "0",
"value": ""
},
{
"payvia_field_id": "35",
"payvia_type_id": "1",
"name": "Country",
"type": "0",
"required": "0",
"min": "0",
"max": "128",
"orderid": "7",
"is_unique": "0",
"protection": "0",
"check_function": "",
"deleted": "0",
"payvia_hash": "0",
"value": ""
}
]
}
}Last updated
Was this helpful?