List payment policies
curl --request GET \
--url https://api.tagada.io/v1/payment-policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tagada.io/v1/payment-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tagada.io/v1/payment-policies', 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/payment-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.tagada.io/v1/payment-policies"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.tagada.io/v1/payment-policies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/v1/payment-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"active_version": {
"content": {
"abuse_detection": {
"block_for_hours": 1,
"declines": 1,
"enabled": true,
"within_minutes": 1
},
"authentication": {
"by_processor": {},
"if_not_completed": "stop",
"if_unavailable": "processor",
"mode": "auto",
"provider": "auto",
"rules": [
{
"id": "<string>",
"mode": "auto",
"when": [
{
"field": "purpose",
"op": "in",
"value": 1,
"values": [
"<string>"
]
}
]
}
]
},
"backups": {
"decline_groups": {
"never_retry": {
"move": true
},
"suspected_fraud": {
"move": true
},
"try_again": {
"move": true
}
},
"enabled": true,
"max_backups": 1,
"move_on": {
"bank_decline": true,
"cannot_take": true,
"processor_error": true
},
"processors": [
"<string>"
],
"strategy": "in_order"
},
"capture": {
"delay_days": 1,
"free_trial": {
"zero_amount_card_check": true
},
"one_time": "immediately",
"subscription": "immediately"
},
"customer_payments": {
"max_retries": 1
},
"methods": {
"afterpay": {
"enabled": true
},
"apple_pay": {
"enabled": true
},
"card": {
"enabled": true
},
"google_pay": {
"enabled": true
},
"ideal": {
"enabled": true
},
"klarna": {
"enabled": true
},
"link": {
"enabled": true
},
"paypal": {
"enabled": true
}
},
"processors": [
{
"accepts": {
"amount": {
"max": {
"amount": 123,
"currency": "AED"
},
"min": {
"amount": 123,
"currency": "AED"
}
},
"brands": [
"visa"
],
"card_regions": [
"us"
],
"currencies": [
"AED"
],
"funding": [
"credit"
]
},
"auto_pause": {
"after_declines_in_a_row": 1,
"enabled": true
},
"daily_cap": {
"amount": 123,
"currency": "AED"
},
"daily_count_cap": 1,
"descriptor": {
"template": "<string>"
},
"enabled": true,
"id": "<string>",
"keep_for_renewals": "renewals_due",
"monthly_cap": {
"amount": 123,
"currency": "AED"
},
"move_renewals_to": "<string>"
}
],
"renewals": {
"smart_retry": {
"branches": {
"do_not_honor": {
"enabled": true
},
"expired_card": {
"enabled": true
},
"insufficient_funds": {
"next_1st_or_15th": true
},
"processor_error": {
"enabled": true,
"retry_after_minutes": 1
},
"velocity": {
"enabled": true
}
},
"end": {
"action": "pause",
"on_day": 1,
"when_bank_says_never_retry": "pause"
},
"price_drop": {
"enabled": true,
"floor": {
"amount": 123,
"currency": "AED"
},
"from_retry": 1,
"keep_lower_price": true,
"percent_off": 50
},
"retries": true,
"retry_time": "<string>",
"skip_weekends": true,
"switch_processor": {
"enabled": true,
"from_retry": 1,
"to": "smart_routing"
},
"tries_on_days": [
1
]
}
},
"risk": {
"source": "tagada"
},
"routing": {
"everything_else": {
"pick": "smart_routing",
"processors": [
"<string>"
],
"even_past_cap": true,
"prefer": "initial_processor",
"shares": {}
},
"rules": [
{
"id": "<string>",
"then": {
"pick": "smart_routing",
"processors": [
"<string>"
],
"even_past_cap": true,
"prefer": "initial_processor",
"shares": {}
},
"when": [
{
"field": "purpose",
"op": "in",
"value": 1,
"values": [
"<string>"
]
}
]
}
]
},
"save_cards": "auto_detect",
"upsells": {
"initiator": "customer"
}
},
"content_hash": "<string>",
"id": "<string>",
"object": "payment_policy_version",
"policy": "<string>",
"published_at": "<string>",
"version": 123
},
"bindings": [
{
"checkout": "<string>",
"store": "<string>"
}
],
"created_at": "<string>",
"draft_editor_state": {},
"id": "<string>",
"name": "<string>",
"object": "payment_policy",
"problems": [
{
"message": "<string>",
"path": "<string>",
"kind": "positive_integer_required"
}
],
"warnings": [
{
"category": "flow_check",
"kind": "<string>",
"panel": "<string>",
"text": "<string>",
"params": {}
}
],
"draft": "<unknown>"
}
],
"has_more": true,
"next_cursor": "<string>",
"object": "list"
}{
"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": {}
}
}{
"error": {
"code": "account_daily_cap_exceeded",
"message": "<string>",
"param": "<string>",
"request_id": "<string>",
"type": "invalid_request_error",
"details": {}
}
}Payment policies
List payment policies
Newest first, with opaque cursor pagination. store keeps the policies bound to that store in the request mode.
GET
/
v1
/
payment-policies
List payment policies
curl --request GET \
--url https://api.tagada.io/v1/payment-policies \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tagada.io/v1/payment-policies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tagada.io/v1/payment-policies', 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/payment-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.tagada.io/v1/payment-policies"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.tagada.io/v1/payment-policies")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tagada.io/v1/payment-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"active_version": {
"content": {
"abuse_detection": {
"block_for_hours": 1,
"declines": 1,
"enabled": true,
"within_minutes": 1
},
"authentication": {
"by_processor": {},
"if_not_completed": "stop",
"if_unavailable": "processor",
"mode": "auto",
"provider": "auto",
"rules": [
{
"id": "<string>",
"mode": "auto",
"when": [
{
"field": "purpose",
"op": "in",
"value": 1,
"values": [
"<string>"
]
}
]
}
]
},
"backups": {
"decline_groups": {
"never_retry": {
"move": true
},
"suspected_fraud": {
"move": true
},
"try_again": {
"move": true
}
},
"enabled": true,
"max_backups": 1,
"move_on": {
"bank_decline": true,
"cannot_take": true,
"processor_error": true
},
"processors": [
"<string>"
],
"strategy": "in_order"
},
"capture": {
"delay_days": 1,
"free_trial": {
"zero_amount_card_check": true
},
"one_time": "immediately",
"subscription": "immediately"
},
"customer_payments": {
"max_retries": 1
},
"methods": {
"afterpay": {
"enabled": true
},
"apple_pay": {
"enabled": true
},
"card": {
"enabled": true
},
"google_pay": {
"enabled": true
},
"ideal": {
"enabled": true
},
"klarna": {
"enabled": true
},
"link": {
"enabled": true
},
"paypal": {
"enabled": true
}
},
"processors": [
{
"accepts": {
"amount": {
"max": {
"amount": 123,
"currency": "AED"
},
"min": {
"amount": 123,
"currency": "AED"
}
},
"brands": [
"visa"
],
"card_regions": [
"us"
],
"currencies": [
"AED"
],
"funding": [
"credit"
]
},
"auto_pause": {
"after_declines_in_a_row": 1,
"enabled": true
},
"daily_cap": {
"amount": 123,
"currency": "AED"
},
"daily_count_cap": 1,
"descriptor": {
"template": "<string>"
},
"enabled": true,
"id": "<string>",
"keep_for_renewals": "renewals_due",
"monthly_cap": {
"amount": 123,
"currency": "AED"
},
"move_renewals_to": "<string>"
}
],
"renewals": {
"smart_retry": {
"branches": {
"do_not_honor": {
"enabled": true
},
"expired_card": {
"enabled": true
},
"insufficient_funds": {
"next_1st_or_15th": true
},
"processor_error": {
"enabled": true,
"retry_after_minutes": 1
},
"velocity": {
"enabled": true
}
},
"end": {
"action": "pause",
"on_day": 1,
"when_bank_says_never_retry": "pause"
},
"price_drop": {
"enabled": true,
"floor": {
"amount": 123,
"currency": "AED"
},
"from_retry": 1,
"keep_lower_price": true,
"percent_off": 50
},
"retries": true,
"retry_time": "<string>",
"skip_weekends": true,
"switch_processor": {
"enabled": true,
"from_retry": 1,
"to": "smart_routing"
},
"tries_on_days": [
1
]
}
},
"risk": {
"source": "tagada"
},
"routing": {
"everything_else": {
"pick": "smart_routing",
"processors": [
"<string>"
],
"even_past_cap": true,
"prefer": "initial_processor",
"shares": {}
},
"rules": [
{
"id": "<string>",
"then": {
"pick": "smart_routing",
"processors": [
"<string>"
],
"even_past_cap": true,
"prefer": "initial_processor",
"shares": {}
},
"when": [
{
"field": "purpose",
"op": "in",
"value": 1,
"values": [
"<string>"
]
}
]
}
]
},
"save_cards": "auto_detect",
"upsells": {
"initiator": "customer"
}
},
"content_hash": "<string>",
"id": "<string>",
"object": "payment_policy_version",
"policy": "<string>",
"published_at": "<string>",
"version": 123
},
"bindings": [
{
"checkout": "<string>",
"store": "<string>"
}
],
"created_at": "<string>",
"draft_editor_state": {},
"id": "<string>",
"name": "<string>",
"object": "payment_policy",
"problems": [
{
"message": "<string>",
"path": "<string>",
"kind": "positive_integer_required"
}
],
"warnings": [
{
"category": "flow_check",
"kind": "<string>",
"panel": "<string>",
"text": "<string>",
"params": {}
}
],
"draft": "<unknown>"
}
],
"has_more": true,
"next_cursor": "<string>",
"object": "list"
}{
"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": {}
}
}{
"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.
Query Parameters
Pattern:
^store_[a-f0-9]{12}$Required range:
1 <= x <= 100