payment-instruments
Verify a registered card payment instrument
Proxies to Finix PUT /payment_instruments/{id} to return CVV, AVS, and name verification results for an existing card PI. Requires an Idempotency-Key header for API consistency; verification is re-runnable and is not deduped server-side in v1.
POST
/
payment-instruments
/
{paymentInstrumentId}
/
verify
Verify a registered card payment instrument
curl --request POST \
--url https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify', 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-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-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"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"paymentInstrumentId": "<string>",
"processorInstrumentId": "<string>",
"addressVerification": "postal_code_and_street_match",
"securityCodeVerification": "matched",
"nameVerification": {
"fullName": "match",
"firstName": "match",
"lastName": "match",
"middleName": "match"
},
"verifiedAt": "2023-11-07T05:31:56Z"
}Authorizations
Merchant API key bearer token.
Headers
Client-supplied unique key for safe retries of this mutating request. Scoped per merchant or resource as documented on each endpoint.
Example:
"idem-01"
Path Parameters
PayGood payment instrument TypeID (pi_…).
Example:
"pi_01hxy8m1nqk9g3x3y3p0azq2zz"
Response
Minimum string length:
1Available options:
postal_code_and_street_match, street_match, postal_code_match, no_address, no_match, not_supported, unknown Available options:
matched, unmatched, unknown Show child attributes
Show child attributes
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$⌘I
Verify a registered card payment instrument
curl --request POST \
--url https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify', 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-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-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"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.paygood.co/payment-instruments/{paymentInstrumentId}/verify")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"paymentInstrumentId": "<string>",
"processorInstrumentId": "<string>",
"addressVerification": "postal_code_and_street_match",
"securityCodeVerification": "matched",
"nameVerification": {
"fullName": "match",
"firstName": "match",
"lastName": "match",
"middleName": "match"
},
"verifiedAt": "2023-11-07T05:31:56Z"
}