Link Search Menu Expand Document

Test Your Integration

Table of contents

  1. Basic Test Card Numbers
  2. Simulating Address Verification Responses
  3. Simulating CVC Responses
  4. Webhooks

Learn about the different methods to test your integration before going live.

This page includes test card numbers and other information to make sure your integration works as planned. Use it to trigger different flows in your integration and ensure they are handled accordingly.

This information only applies to the sandbox environment (i.e. https://sandbox-api.tilled.com).

Basic Test Card Numbers

NUMBERBRANDCVC*DATE
4111 1111 1111 1111VisaAny 3 digitsAny future date
5100 4000 0000 0000MastercardAny 4 digitsAny future date
6011 2345 6789 0123DiscoverAny 3 digitsAny future date
3701 234567 89017American ExpressAny 4 digitsAny future date

* See Simulating CVC Responses

Simulating Address Verification Responses

By default, all card transactions with valid billing_details addresses will pass the address verification checks. To simulate a different response, add a single letter code from the table below as a prefix to the billing_details.street property. Example: billing_details.street='N 123 Main Street' will produce failed checks where no part of the address matches. These checks are available on the payment_method.card.checks property.

PREFIXCHECKSDESCRIPTION
Xaddress_line1_check=pass, address_postal_code_check=passBoth street and postal code match
Aaddress_line1_check=pass, address_postal_code_check=failStreet matches but postal code does not
Zaddress_line1_check=fail, address_postal_code_check=passPostal code matches but street does not
Naddress_line1_check=fail, address_postal_code_check=failNo part of the address matches
Uaddress_line1_check=unavailable, address_postal_code_check=unavailableAddress information is unavailable

Example:

billing_details.street is prefixed with N and therefore the card.checks.address_**=fail

{
  "id": "pm_7jzakGs4bVgTo82EDLZcS",
  "type": "card",
  "card": {
    "brand": "visa",
    "last4": "1111",
    "checks": {
      "cvc_check": "pass",
      "address_line1_check": "fail",
      "address_postal_code_check": "fail"
    },
    "exp_year": 2026,
    "exp_month": 8
  },
  "billing_details": {
    "name": "John Doe",
    "address": { 
      "zip": "80302",
      "street": "N 123 Main Street", // Note the 'N' prefix
      "country": "US"
    }
  },
  ...
}

Simulating CVC Responses

CVCCHECKSDESCRIPTION
222cvc_check=uncheckedUnchecked
555cvc_check=unavailableUnavailable
666cvc_check=failFail
###cvc_check=passAnything else passes (e.g. 123)

Webhooks

To test your integration, perform actions using the API (in test mode) to send legitimate events to your endpoint. For instance, creating a charge triggers the charge.succeeded event that contains the charge data. You can then use the API to verify the resulting event data.


Copyright © 2022 Tilled