Skip to main content
API Reference
Cards
Declined Transactions

Declined Transactions are refused additions and removals of money from your bank account. For example, Declined Transactions are caused when your Account has an insufficient balance or your Limits are triggered.

Events
Your application can listen to webhooks about this resource. All of the events about Declined Transactions will have the category "declined_transaction.created" .
The Declined Transaction object
{
  "account_id": "account_in71c4amph0vgo2qllky",
  "amount": 1750,
  "created_at": "2020-01-31T23:59:59Z",
  "currency": "USD",
  "description": "INVOICE 2468",
  "id": "declined_transaction_17jbn0yyhvkt4v4ooym8",
  "route_id": "account_number_v18nkfqm6afpsrvy82b2",
  "route_type": "account_number",
  "source": {
    "ach_decline": {
      "amount": 1750,
      "id": "ach_decline_72v1mcwxudctq56efipa",
      "inbound_ach_transfer_id": "inbound_ach_transfer_tdrwqr3fq9gnnq49odev",
      "originator_company_descriptive_date": null,
      "originator_company_discretionary_data": null,
      "originator_company_id": "0987654321",
      "originator_company_name": "BIG BANK",
      "reason": "insufficient_funds",
      "receiver_id_number": "12345678900",
      "receiver_name": "IAN CREASE",
      "trace_number": "021000038461022",
      "type": "ach_decline"
    },
    "category": "ach_decline"
  },
  "type": "declined_transaction"
}
Attributes
account_id
string

The identifier for the Account the Declined Transaction belongs to.

More about Accounts.
amount
integer

The Declined Transaction amount in the minor unit of its currency. For dollars, for example, this is cents.

created_at
string

The ISO 8601 date on which the Transaction occurred.

currency
enum

The ISO 4217 code for the Declined Transaction’s currency. This will match the currency on the Declined Transaction’s Account.

description
string

This is the description the vendor provides.

id
string

The Declined Transaction identifier.

route_id
string
Nullable

The identifier for the route this Declined Transaction came through. Routes are things like cards and ACH details.

route_type
enum
Nullable

The type of the route this Declined Transaction came through.

source
dictionary

This is an object giving more details on the network-level event that caused the Declined Transaction. For example, for a card transaction this lists the merchant’s industry and location. Note that for backwards compatibility reasons, additional undocumented keys may appear in this object. These should be treated as deprecated and will be removed in the future.

type
string

A constant representing the object’s type. For this resource it will always be declined_transaction.

List Declined Transactions
curl \
  --url "${INCREASE_URL}/declined_transactions" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
import Increase from 'increase';

const client = new Increase({
  apiKey: process.env['INCREASE_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const declinedTransaction of client.declinedTransactions.list()) {
  console.log(declinedTransaction.id);
}
import os
from increase import Increase

client = Increase(
    api_key=os.environ.get("INCREASE_API_KEY"),  # This is the default and can be omitted
)
page = client.declined_transactions.list()
page = page.data[0]
print(page.id)
require "increase"

increase = Increase::Client.new(
  api_key: ENV["INCREASE_API_KEY"] # This is the default and can be omitted
)

page = increase.declined_transactions.list

puts(page)
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/Increase/increase-go"
	"github.com/Increase/increase-go/option"
)

func main() {
	client := increase.NewClient(
		option.WithAPIKey(os.Getenv("INCREASE_API_KEY")), // This is the default and can be omitted
	)
	page, err := client.DeclinedTransactions.List(context.TODO(), increase.DeclinedTransactionListParams{})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", page)
}
package com.increase.api.example;

import com.increase.api.client.IncreaseClient;
import com.increase.api.client.okhttp.IncreaseOkHttpClient;
import com.increase.api.models.declinedtransactions.DeclinedTransactionListPage;
import com.increase.api.models.declinedtransactions.DeclinedTransactionListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        IncreaseClient client = IncreaseOkHttpClient.fromEnv();

        DeclinedTransactionListPage page = client.declinedTransactions().list();
    }
}
package com.increase.api.example

import com.increase.api.client.IncreaseClient
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.models.declinedtransactions.DeclinedTransactionListPage
import com.increase.api.models.declinedtransactions.DeclinedTransactionListParams

fun main() {
    val client: IncreaseClient = IncreaseOkHttpClient.fromEnv()

    val page: DeclinedTransactionListPage = client.declinedTransactions().list()
}
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Increase\Client;
use Increase\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('INCREASE_API_KEY'));

try {
  $page = $client->declinedTransactions->list(
    accountID: 'account_id',
    category: ['in' => ['ach_decline']],
    createdAt: [
      'after' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
      'before' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
      'onOrAfter' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
      'onOrBefore' => new \DateTimeImmutable('2019-12-27T18:11:19.117Z'),
    ],
    cursor: 'cursor',
    limit: 1,
    routeID: 'route_id',
  );

  var_dump($page);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using Increase.Api;
using Increase.Api.Models.DeclinedTransactions;

IncreaseClient client = new();

DeclinedTransactionListParams parameters = new();

var page = await client.DeclinedTransactions.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
Returns a list response :
{
  "data": [
    { /* Declined Transaction object */ },
    { /* Declined Transaction object */ }
    /* ... */
  ],
  "next_cursor": "v57w5d",
}
Parameters
account_id
string

Filter Declined Transactions to ones belonging to the specified Account.

More about Accounts.
route_id
string

Filter Declined Transactions to those belonging to the specified route.

category.in
array of strings

Return results whose value is in the provided list. For GET requests, this should be encoded as a comma-delimited string, such as ?in=one,two,three.

More
cursor
string
limit
integer
created_at.after
string
created_at.before
string
created_at.on_or_after
string
created_at.on_or_before
string
Retrieve a Declined Transaction
curl \
  --url "${INCREASE_URL}/declined_transactions/declined_transaction_17jbn0yyhvkt4v4ooym8" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
import Increase from 'increase';

const client = new Increase({
  apiKey: process.env['INCREASE_API_KEY'], // This is the default and can be omitted
});

const declinedTransaction = await client.declinedTransactions.retrieve(
  'declined_transaction_17jbn0yyhvkt4v4ooym8',
);

console.log(declinedTransaction.id);
import os
from increase import Increase

client = Increase(
    api_key=os.environ.get("INCREASE_API_KEY"),  # This is the default and can be omitted
)
declined_transaction = client.declined_transactions.retrieve(
    "declined_transaction_17jbn0yyhvkt4v4ooym8",
)
print(declined_transaction.id)
require "increase"

increase = Increase::Client.new(
  api_key: ENV["INCREASE_API_KEY"] # This is the default and can be omitted
)

declined_transaction = increase.declined_transactions.retrieve("declined_transaction_17jbn0yyhvkt4v4ooym8")

puts(declined_transaction)
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/Increase/increase-go"
	"github.com/Increase/increase-go/option"
)

func main() {
	client := increase.NewClient(
		option.WithAPIKey(os.Getenv("INCREASE_API_KEY")), // This is the default and can be omitted
	)
	declinedTransaction, err := client.DeclinedTransactions.Get(context.TODO(), "declined_transaction_17jbn0yyhvkt4v4ooym8")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", declinedTransaction.ID)
}
package com.increase.api.example;

import com.increase.api.client.IncreaseClient;
import com.increase.api.client.okhttp.IncreaseOkHttpClient;
import com.increase.api.models.declinedtransactions.DeclinedTransaction;
import com.increase.api.models.declinedtransactions.DeclinedTransactionRetrieveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        IncreaseClient client = IncreaseOkHttpClient.fromEnv();

        DeclinedTransaction declinedTransaction = client.declinedTransactions().retrieve("declined_transaction_17jbn0yyhvkt4v4ooym8");
    }
}
package com.increase.api.example

import com.increase.api.client.IncreaseClient
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.models.declinedtransactions.DeclinedTransaction
import com.increase.api.models.declinedtransactions.DeclinedTransactionRetrieveParams

fun main() {
    val client: IncreaseClient = IncreaseOkHttpClient.fromEnv()

    val declinedTransaction: DeclinedTransaction = client.declinedTransactions().retrieve("declined_transaction_17jbn0yyhvkt4v4ooym8")
}
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Increase\Client;
use Increase\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('INCREASE_API_KEY'));

try {
  $declinedTransaction = $client->declinedTransactions->retrieve(
    'declined_transaction_17jbn0yyhvkt4v4ooym8'
  );

  var_dump($declinedTransaction);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using Increase.Api;
using Increase.Api.Models.DeclinedTransactions;

IncreaseClient client = new();

DeclinedTransactionRetrieveParams parameters = new()
{
    DeclinedTransactionID = "declined_transaction_17jbn0yyhvkt4v4ooym8"
};

var declinedTransaction = await client.DeclinedTransactions.Retrieve(parameters);

Console.WriteLine(declinedTransaction);
Parameters
declined_transaction_id
string
Required

The identifier of the Declined Transaction.