List the payment methods to show
curl --request POST \
--url https://api.tagada.io/v1/eligible-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"country": "<string>",
"customer": "<string>",
"device": "<string>",
"store": "<string>"
}
'import requests
url = "https://api.tagada.io/v1/eligible-methods"
payload = {
"amount": 1,
"country": "<string>",
"customer": "<string>",
"device": "<string>",
"store": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
country: '<string>',
customer: '<string>',
device: '<string>',
store: '<string>'
})
};
fetch('https://api.tagada.io/v1/eligible-methods', 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.tagada.io/v1/eligible-methods",
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([
'amount' => 1,
'country' => '<string>',
'customer' => '<string>',
'device' => '<string>',
'store' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.tagada.io/v1/eligible-methods"
payload := strings.NewReader("{\n \"amount\": 1,\n \"country\": \"<string>\",\n \"customer\": \"<string>\",\n \"device\": \"<string>\",\n \"store\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tagada.io/v1/eligible-methods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"country\": \"<string>\",\n \"customer\": \"<string>\",\n \"device\": \"<string>\",\n \"store\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/v1/eligible-methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1,\n \"country\": \"<string>\",\n \"customer\": \"<string>\",\n \"device\": \"<string>\",\n \"store\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"hidden": [
{
"method": "card",
"processors": [
{
"gaps": [
"<string>"
],
"processor": "<string>"
}
],
"reason": "payment_method_not_eligible"
}
],
"object": "eligible_methods",
"shown": [
{
"method": "card",
"placement": "wallet",
"requires": {
"redirect": true,
"three_ds_likely": true,
"wallet_domain": true
}
}
]
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}Browser
List the payment methods to show
The methods the policy offers and a processor can take now, in order, each with its placement and what it needs; the others with their reason. A publishable key gets no processor gaps.
POST
/
v1
/
eligible-methods
List the payment methods to show
curl --request POST \
--url https://api.tagada.io/v1/eligible-methods \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"country": "<string>",
"customer": "<string>",
"device": "<string>",
"store": "<string>"
}
'import requests
url = "https://api.tagada.io/v1/eligible-methods"
payload = {
"amount": 1,
"country": "<string>",
"customer": "<string>",
"device": "<string>",
"store": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
country: '<string>',
customer: '<string>',
device: '<string>',
store: '<string>'
})
};
fetch('https://api.tagada.io/v1/eligible-methods', 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.tagada.io/v1/eligible-methods",
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([
'amount' => 1,
'country' => '<string>',
'customer' => '<string>',
'device' => '<string>',
'store' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.tagada.io/v1/eligible-methods"
payload := strings.NewReader("{\n \"amount\": 1,\n \"country\": \"<string>\",\n \"customer\": \"<string>\",\n \"device\": \"<string>\",\n \"store\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.tagada.io/v1/eligible-methods")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"country\": \"<string>\",\n \"customer\": \"<string>\",\n \"device\": \"<string>\",\n \"store\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/v1/eligible-methods")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1,\n \"country\": \"<string>\",\n \"customer\": \"<string>\",\n \"device\": \"<string>\",\n \"store\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"hidden": [
{
"method": "card",
"processors": [
{
"gaps": [
"<string>"
],
"processor": "<string>"
}
],
"reason": "payment_method_not_eligible"
}
],
"object": "eligible_methods",
"shown": [
{
"method": "card",
"placement": "wallet",
"requires": {
"redirect": true,
"three_ds_likely": true,
"wallet_domain": true
}
}
]
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}Authorizations
Secret, platform or publishable API key. Platform keys require Payments-Account.
Body
application/json
Integer amount in the currency minor unit.
Required range:
x >= 0Available options:
AED, AFN, ALL, AMD, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SOS, SRD, SSP, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, UYI, UYU, UYW, UZS, VED, VES, VND, VUV, WST, XAD, XAF, XCD, XCG, XOF, XPF, YER, ZAR, ZMW, ZWG Pattern:
^[A-Z]{2}$Pattern:
^cus_[a-f0-9]{12}$Required string length:
1 - 40Pattern:
^store_[a-f0-9]{12}$