Link Search Menu Expand Document

Test Your Integration

Table of contents

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

Learn about the different methods to test your integration.

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 1111Visa (Credit)Any 3 digitsAny future date
4900 7700 0000 0001Visa (Debit)Any 3 digitsAny future date
5100 4000 0000 0000MastercardAny 3 digitsAny future date
6011 2345 6789 0123DiscoverAny 3 digitsAny future date
3701 234567 89017American ExpressAny 4 digitsAny future date

* See Simulating CVC Responses

Simulating Charge Declines

The following exact amounts will result in the associated error code on a payment intent. This is only accessible for card. Example: 777701 = $7777.01.

AmountsError Code
777701ChargeDeclineCode.INSUFFICIENT_FUNDS
777702ChargeDeclineCode.AVS_CHECK_FAILED
777703ChargeDeclineCode.GENERIC_DECLINE
777704ChargeDeclineCode.CALL_ISSUER
777705ChargeDeclineCode.EXPIRED_CARD
777706ChargeDeclineCode.PICKUP_CARD
777707ChargeDeclineCode.INVALID_NUMBER
777708ChargeDeclineCode.LIMIT_EXCEEDED
777709ChargeDeclineCode.NOT_PERMITTED
777710ChargeDeclineCode.INCORRECT_CVC
777711ChargeDeclineCode.SERVICE_NOT_ALLOWED
777712ChargeDeclineCode.INVALID_EXPIRY
777713ChargeDeclineCode.CARD_NOT_SUPPORTED
777714ChargeDeclineCode.RESTRICTED_CARD
777715ChargeDeclineCode.FRAUDULENT
777716ChargeDeclineCode.PROCESSING_ERROR

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