Validate
curl --request POST \
--url https://api.ecrypt.com/v1/transactions/validate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"payment": {
"token": "<string>",
"stored": {
"customer": "<string>",
"wallet": "<string>"
},
"terminal": {
"id": "<string>",
"prompt_tip": true,
"tip_amounts": [
123
],
"prompt_cvv": true,
"prompt_postal_code": true,
"prompt_amount_confirmation": true,
"prompt_signature": true,
"key_card": true
},
"check": {
"name": "<string>",
"account_number": "<string>",
"routing_number": "<string>",
"check_number": "<string>",
"verification": {
"dob": "<string>",
"ssn": "<string>",
"drivers_license": {
"number": "<string>",
"state": "<string>"
}
}
},
"cash": true
}
}
'import requests
url = "https://api.ecrypt.com/v1/transactions/validate"
payload = { "payment": {
"token": "<string>",
"stored": {
"customer": "<string>",
"wallet": "<string>"
},
"terminal": {
"id": "<string>",
"prompt_tip": True,
"tip_amounts": [123],
"prompt_cvv": True,
"prompt_postal_code": True,
"prompt_amount_confirmation": True,
"prompt_signature": True,
"key_card": True
},
"check": {
"name": "<string>",
"account_number": "<string>",
"routing_number": "<string>",
"check_number": "<string>",
"verification": {
"dob": "<string>",
"ssn": "<string>",
"drivers_license": {
"number": "<string>",
"state": "<string>"
}
}
},
"cash": True
} }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment: {
token: '<string>',
stored: {customer: '<string>', wallet: '<string>'},
terminal: {
id: '<string>',
prompt_tip: true,
tip_amounts: [123],
prompt_cvv: true,
prompt_postal_code: true,
prompt_amount_confirmation: true,
prompt_signature: true,
key_card: true
},
check: {
name: '<string>',
account_number: '<string>',
routing_number: '<string>',
check_number: '<string>',
verification: {
dob: '<string>',
ssn: '<string>',
drivers_license: {number: '<string>', state: '<string>'}
}
},
cash: true
}
})
};
fetch('https://api.ecrypt.com/v1/transactions/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ecrypt.com/v1/transactions/validate",
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([
'payment' => [
'token' => '<string>',
'stored' => [
'customer' => '<string>',
'wallet' => '<string>'
],
'terminal' => [
'id' => '<string>',
'prompt_tip' => true,
'tip_amounts' => [
123
],
'prompt_cvv' => true,
'prompt_postal_code' => true,
'prompt_amount_confirmation' => true,
'prompt_signature' => true,
'key_card' => true
],
'check' => [
'name' => '<string>',
'account_number' => '<string>',
'routing_number' => '<string>',
'check_number' => '<string>',
'verification' => [
'dob' => '<string>',
'ssn' => '<string>',
'drivers_license' => [
'number' => '<string>',
'state' => '<string>'
]
]
],
'cash' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ecrypt.com/v1/transactions/validate"
payload := strings.NewReader("{\n \"payment\": {\n \"token\": \"<string>\",\n \"stored\": {\n \"customer\": \"<string>\",\n \"wallet\": \"<string>\"\n },\n \"terminal\": {\n \"id\": \"<string>\",\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n },\n \"check\": {\n \"name\": \"<string>\",\n \"account_number\": \"<string>\",\n \"routing_number\": \"<string>\",\n \"check_number\": \"<string>\",\n \"verification\": {\n \"dob\": \"<string>\",\n \"ssn\": \"<string>\",\n \"drivers_license\": {\n \"number\": \"<string>\",\n \"state\": \"<string>\"\n }\n }\n },\n \"cash\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ecrypt.com/v1/transactions/validate")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payment\": {\n \"token\": \"<string>\",\n \"stored\": {\n \"customer\": \"<string>\",\n \"wallet\": \"<string>\"\n },\n \"terminal\": {\n \"id\": \"<string>\",\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n },\n \"check\": {\n \"name\": \"<string>\",\n \"account_number\": \"<string>\",\n \"routing_number\": \"<string>\",\n \"check_number\": \"<string>\",\n \"verification\": {\n \"dob\": \"<string>\",\n \"ssn\": \"<string>\",\n \"drivers_license\": {\n \"number\": \"<string>\",\n \"state\": \"<string>\"\n }\n }\n },\n \"cash\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ecrypt.com/v1/transactions/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment\": {\n \"token\": \"<string>\",\n \"stored\": {\n \"customer\": \"<string>\",\n \"wallet\": \"<string>\"\n },\n \"terminal\": {\n \"id\": \"<string>\",\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n },\n \"check\": {\n \"name\": \"<string>\",\n \"account_number\": \"<string>\",\n \"routing_number\": \"<string>\",\n \"check_number\": \"<string>\",\n \"verification\": {\n \"dob\": \"<string>\",\n \"ssn\": \"<string>\",\n \"drivers_license\": {\n \"number\": \"<string>\",\n \"state\": \"<string>\"\n }\n }\n },\n \"cash\": true\n }\n}"
response = http.request(request)
puts response.read_body{}{}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Transactions
Validate
Validate that a payment method is valid and supported. Supported Payment Methods
Credit CardTerminal/Cloud EMVCheck/ACHCustomerWallet
POST
/
v1
/
transactions
/
validate
Validate
curl --request POST \
--url https://api.ecrypt.com/v1/transactions/validate \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"payment": {
"token": "<string>",
"stored": {
"customer": "<string>",
"wallet": "<string>"
},
"terminal": {
"id": "<string>",
"prompt_tip": true,
"tip_amounts": [
123
],
"prompt_cvv": true,
"prompt_postal_code": true,
"prompt_amount_confirmation": true,
"prompt_signature": true,
"key_card": true
},
"check": {
"name": "<string>",
"account_number": "<string>",
"routing_number": "<string>",
"check_number": "<string>",
"verification": {
"dob": "<string>",
"ssn": "<string>",
"drivers_license": {
"number": "<string>",
"state": "<string>"
}
}
},
"cash": true
}
}
'import requests
url = "https://api.ecrypt.com/v1/transactions/validate"
payload = { "payment": {
"token": "<string>",
"stored": {
"customer": "<string>",
"wallet": "<string>"
},
"terminal": {
"id": "<string>",
"prompt_tip": True,
"tip_amounts": [123],
"prompt_cvv": True,
"prompt_postal_code": True,
"prompt_amount_confirmation": True,
"prompt_signature": True,
"key_card": True
},
"check": {
"name": "<string>",
"account_number": "<string>",
"routing_number": "<string>",
"check_number": "<string>",
"verification": {
"dob": "<string>",
"ssn": "<string>",
"drivers_license": {
"number": "<string>",
"state": "<string>"
}
}
},
"cash": True
} }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
payment: {
token: '<string>',
stored: {customer: '<string>', wallet: '<string>'},
terminal: {
id: '<string>',
prompt_tip: true,
tip_amounts: [123],
prompt_cvv: true,
prompt_postal_code: true,
prompt_amount_confirmation: true,
prompt_signature: true,
key_card: true
},
check: {
name: '<string>',
account_number: '<string>',
routing_number: '<string>',
check_number: '<string>',
verification: {
dob: '<string>',
ssn: '<string>',
drivers_license: {number: '<string>', state: '<string>'}
}
},
cash: true
}
})
};
fetch('https://api.ecrypt.com/v1/transactions/validate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ecrypt.com/v1/transactions/validate",
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([
'payment' => [
'token' => '<string>',
'stored' => [
'customer' => '<string>',
'wallet' => '<string>'
],
'terminal' => [
'id' => '<string>',
'prompt_tip' => true,
'tip_amounts' => [
123
],
'prompt_cvv' => true,
'prompt_postal_code' => true,
'prompt_amount_confirmation' => true,
'prompt_signature' => true,
'key_card' => true
],
'check' => [
'name' => '<string>',
'account_number' => '<string>',
'routing_number' => '<string>',
'check_number' => '<string>',
'verification' => [
'dob' => '<string>',
'ssn' => '<string>',
'drivers_license' => [
'number' => '<string>',
'state' => '<string>'
]
]
],
'cash' => true
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ecrypt.com/v1/transactions/validate"
payload := strings.NewReader("{\n \"payment\": {\n \"token\": \"<string>\",\n \"stored\": {\n \"customer\": \"<string>\",\n \"wallet\": \"<string>\"\n },\n \"terminal\": {\n \"id\": \"<string>\",\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n },\n \"check\": {\n \"name\": \"<string>\",\n \"account_number\": \"<string>\",\n \"routing_number\": \"<string>\",\n \"check_number\": \"<string>\",\n \"verification\": {\n \"dob\": \"<string>\",\n \"ssn\": \"<string>\",\n \"drivers_license\": {\n \"number\": \"<string>\",\n \"state\": \"<string>\"\n }\n }\n },\n \"cash\": true\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ecrypt.com/v1/transactions/validate")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payment\": {\n \"token\": \"<string>\",\n \"stored\": {\n \"customer\": \"<string>\",\n \"wallet\": \"<string>\"\n },\n \"terminal\": {\n \"id\": \"<string>\",\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n },\n \"check\": {\n \"name\": \"<string>\",\n \"account_number\": \"<string>\",\n \"routing_number\": \"<string>\",\n \"check_number\": \"<string>\",\n \"verification\": {\n \"dob\": \"<string>\",\n \"ssn\": \"<string>\",\n \"drivers_license\": {\n \"number\": \"<string>\",\n \"state\": \"<string>\"\n }\n }\n },\n \"cash\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ecrypt.com/v1/transactions/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment\": {\n \"token\": \"<string>\",\n \"stored\": {\n \"customer\": \"<string>\",\n \"wallet\": \"<string>\"\n },\n \"terminal\": {\n \"id\": \"<string>\",\n \"prompt_tip\": true,\n \"tip_amounts\": [\n 123\n ],\n \"prompt_cvv\": true,\n \"prompt_postal_code\": true,\n \"prompt_amount_confirmation\": true,\n \"prompt_signature\": true,\n \"key_card\": true\n },\n \"check\": {\n \"name\": \"<string>\",\n \"account_number\": \"<string>\",\n \"routing_number\": \"<string>\",\n \"check_number\": \"<string>\",\n \"verification\": {\n \"dob\": \"<string>\",\n \"ssn\": \"<string>\",\n \"drivers_license\": {\n \"number\": \"<string>\",\n \"state\": \"<string>\"\n }\n }\n },\n \"cash\": true\n }\n}"
response = http.request(request)
puts response.read_body{}{}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
Use this
Body
application/jsontext/jsonapplication/*+json
Payment requires that you submit only one of the below options:
TokenStoredTerminalCheckCash
Show child attributes
Show child attributes
Response
object | null
OK
The response is of type object | null.