Introduction
Transactions
Buyers
Checkout Sessions
Payment links
Payment options
Refunds
Instruments
- Card schemes
- Card details
- Digital wallets
- Gift cards
- Payment methods
- Payment method definitions
Vault
- Account updater
- Network tokens
- Payment service tokens
- Vault Forward
- Vault Forward endpoints
- Vault Forward authentication
Connections
- All services
- Payment services
- Digital wallets
- Anti-fraud services
Other
- Flow
- Reports
- Report executions
- Webhook subscriptions
New anti-fraud service
Adds an anti-fraud service, enabling merchants to determine risky transactions and prevent chargebacks.
POST
/
anti-fraud-services
Copy
Ask AI
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.{gr4vy_id}.gr4vy.app/anti-fraud-services"
payload := strings.NewReader("{\n \"anti_fraud_service_definition_id\": \"sift-anti-fraud\",\n \"display_name\": \"Sift Anti-Fraud Service.\",\n \"fields\": [\n {\n \"key\": \"api_key\",\n \"value\": \"sk_test_26PHem9AhJZvU623DfE1x4sd\"\n },\n {\n \"key\": \"account_id\",\n \"value\": \"26PHem9AhJZvU623DfE1x4sd\"\n }\n ]\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, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Copy
Ask AI
{
"type": "anti-fraud-service",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"merchant_account_id": "default",
"anti_fraud_service_definition_id": "sift-anti-fraud",
"display_name": "Sift Anti-Fraud Service.",
"active": true,
"reviews_enabled": false,
"fields": [
{
"key": "approve_decision",
"value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
}
],
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}
This endpoint requires the anti-fraud-services.write
scope.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
A request to create an anti-fraud service. A request to update an anti-fraud service.
Response
201
application/json
Returns the anti-fraud service that was added.
The response is of type object
.
Was this page helpful?
Copy
Ask AI
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.{gr4vy_id}.gr4vy.app/anti-fraud-services"
payload := strings.NewReader("{\n \"anti_fraud_service_definition_id\": \"sift-anti-fraud\",\n \"display_name\": \"Sift Anti-Fraud Service.\",\n \"fields\": [\n {\n \"key\": \"api_key\",\n \"value\": \"sk_test_26PHem9AhJZvU623DfE1x4sd\"\n },\n {\n \"key\": \"account_id\",\n \"value\": \"26PHem9AhJZvU623DfE1x4sd\"\n }\n ]\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, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
Copy
Ask AI
{
"type": "anti-fraud-service",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"merchant_account_id": "default",
"anti_fraud_service_definition_id": "sift-anti-fraud",
"display_name": "Sift Anti-Fraud Service.",
"active": true,
"reviews_enabled": false,
"fields": [
{
"key": "approve_decision",
"value": "sk_test_26PHem9AhJZvU623DfE1x4sd"
}
],
"created_at": "2013-07-16T19:23:00.000+00:00",
"updated_at": "2013-07-16T19:23:00.000+00:00"
}
Assistant
Responses are generated using AI and may contain mistakes.