Skip to content

Create a card rule

POST
/v1/merchants/{merchant_id}/projects/{project_id}/fraud-prevention/rules/pans/

Blocks payments with one card. Send the vault token of the card, from the payment method details of an earlier transaction. The response shows the card's brand and masked number.

Authorization

apiKey
headerAuthorizationBasic <token>

HTTP Basic authentication with your API key as the username and an empty password.

Path Parameters

merchant_id*string

The ID of the merchant, or self for the merchant of your API key.

project_id*string

The ID of the project.

Request Body

application/json
  1. body

Blocks a single card.

vault_token*string

The vault token of the card, from an earlier transaction.

Response Body

The rule is created.

application/json
  1. response

Blocks a single card.

rule_id?string

The ID of the rule.

vault_token*string

The vault token of the card, from an earlier transaction.

brand?string

The brand of the card.

masked_pan?string

The masked card number.

curl -X POST 'https://api.example.com/v1/merchants/b8a1c2d4-1234-4c5d-9e8f-0123456789ab/projects/c5078bef-f741-4f26-a13f-26e7916bb00c/fraud-prevention/rules/pans/' \  --user "$API_KEY:" \  -H 'Content-Type: application/json' \  -d '{  "vault_token": "a7af603c-edea-496d-9181-5e684caa92f9"}'
{  "rule_id": "string",  "vault_token": "string",  "brand": "string",  "masked_pan": "string"}