Impact

The Impact endpoints are designed to quantitatively assess the potential environmental benefits of future payments, taking into account specific amounts. This evaluation offers key insights into the supplementary ecological advantages offered by various payment methods, thereby encouraging eco-friendly decision-making in payment processing and aligning business operations with environmental consciousness.

Discover the Impact resource using Postman:

TapTree Postman Collection

Endpoints

Check potential impact

POST/v1/impact

Retrieve environmental impact information for a specific payment amount.

The impact model

The Impact model provides insights into the environmental impact associated with different payment methods for a given transaction.

Core attributes

  • Name
    acceptor_id
    Type
    string
    Description

    The unique ID of the acceptor for which the impact is being calculated.

  • Name
    amount
    Type
    object
    Description

    The amount of the potential payment, containing a string encoded value and the currency.

  • Name
    highest_possible_impact
    Type
    object
    Description

    The highest possible environmental impact for the given payment amount.

  • Name
    available_payment_methods
    Type
    object
    Description

    This property lists the payment methods available when the payment status is in the 'open' state. Each key within this object represents a distinct payment method. A notable feature of each listed method is the inclusion of its environmental impact assessment. This is represented under the 'impact' object for each method, detailing both the quantified impact 'value' and its corresponding 'unit', typically measured in 'g CO2'.

    You can access the environmental impact information either by iterating through the entire available_payment_methods object to compare impacts across different methods or by directly referencing a specific payment method by its key to obtain its individual impact data.

    Note that the available methods might carry more properties in the future.

Impact object

{
  "object": "impact",
  "acceptor_id": "acceptor_Aa54Z3THuFj",
  "amount": {
    "value": "2962.00",
    "currency": "eur"
  },
  "highest_possible_impact": {
    "value": "83323",
    "unit": "g CO2",
    "payment_methods": ["visa", "master", "applepay", "googlepay"]
  },
  "available_payment_methods": {
    "card": {
      "impact": {
        "value": "83323",
        "unit": "g CO2"
      }
    },
    "paypal": {
      "impact": {
        "value": "0",
        "unit": "g CO2"
      }
    },
    "sofort": {
      "impact": {
        "value": "0",
        "unit": "g CO2"
      }
    },
    "applepay": {
      "impact": {
        "value": "83323",
        "unit": "g CO2"
      }
    },
    "googlepay": {
      "impact": {
        "value": "83323",
        "unit": "g CO2"
      }
    }
  }
}

POST/v1/impact

Create impact check

Use this endpoint to evaluate the potential environmental impact of a future payment. By default, the endpoint shows the highest possible impact, but it can also provide detailed impact information for each payment method.

Required attributes

  • Name
    amount
    Type
    object
    Description

    The payment amount for which the impact is being calculated.

Optional attributes

  • Name
    payment_methods
    Type
    array of strings
    |
    Optional
    optional
    Description

    Filter impact calculation to specific payment methods.

  • Name
    omit_payment_methods
    Type
    boolean
    |
    Optional
    optional
    Description

    When true, omit per-payment-method impact breakdown from the response.

Request

POST
/v1/impact
curl https://api.taptree.org/v1/impact \
  -H "Authorization: Bearer {token}" \
  -d '{
        // or "payment_methods": ["card"]
        "amount": {
            "value": "2962.00",
            "currency": "eur"
        }
      }'

Response

{
  "object": "impact",
  "acceptor_id": "acceptor_Aa54Z3THuFj",
  "amount": {
    "value": "2962.00",
    "currency": "eur"
  },
  "highest_possible_impact": {
    "value": "83323",
    "unit": "g CO2",
    "payment_methods": ["visa", "master", "applepay", "googlepay"]
  },
  "available_payment_methods": {
    "card": {
      "impact": {
        "value": "83323",
        "unit": "g CO2"
      }
    },
    "paypal": {
      "impact": {
        "value": "0",
        "unit": "g CO2"
      }
    },
    "sofort": {
      "impact": {
        "value": "0",
        "unit": "g CO2"
      }
    },
    "applepay": {
      "impact": {
        "value": "83323",
        "unit": "g CO2"
      }
    },
    "googlepay": {
      "impact": {
        "value": "83323",
        "unit": "g CO2"
      }
    }
  }
}

Was this page helpful?