Skip to content

Debit

Request URL

POST /condor/financial/debit (deprecated)

Description:

This endpoint is deprecated. Instead of using /condor endpoints, it is recommended to use /ibis endpoints. Ibis endpoints support credit-card issuing, debit-card issuing, and vAccount issuing.

This endpoint is used to request a debit from a specified card. The card must have sufficient funds loaded onto it in order for the request to succeed. A card must have a positive balance and an "ACTIVE" status in order to be debited. If the set maximum allowed withdrawal amount is exceeded within a certain time interval, the request will throw an error, even if the card has sufficient funds available.

Request Body

HEADERS

{
    "Content-Type": "application/json",
    "x-connectFi-token": "a long random string" //Authorization token received from /auth/get-token request
}

REQUEST BODY

This example request body has only the required properties.

{
    "cardId" : "crda_1EnrcK7QgBU2030pNCaygA", //card ID in connectFi
    "amount": 250, //amount to be debited from the card, must be greater than 0
    "currency": "USD" //currency code (represented by 3 characters)
}

This example request body contains all required properties, plus optional properties: "reference", "merchant" object, and "transactionType".

{
    "cardId" : "crda_1dNEursRaiIY2Kz4WNzvcw", //card ID in connectFi
    "amount": 15.62, //amount to be debited from the card, must be greater than 0
    "currency": "USD", //currency code (represented by 3 characters)
    "reference" : "externlCrdtId123", //external reference in your system
    "merchant" : {
        "mcc" : "5813", //Merchant Category Code
        "mccName" : "Restaurant", //Name of Merchant Category Code
        "mccGroup" : "F002-Restaurant-Eating and Drinking Places", //Merchant Category Code Group
        "name" : "Fantastic Fancy Dining", //Name of merchant
        "city" : "Chicago", //merchant city
        "region" : "Mid-West", //merchant region
        "countryCodeA3" : "USA" //merchant country code
    },
    "transactionType" : "DEBIT" //transaction type (even if a more specific type of debit is indicated here, the transaction_type property in the response will still be designated "DEBIT")
}

Successful Response Examples

200 (HTTP response status code) -- Success, debit was successful (only required properties present)

{
    "code": "0", //Success
    "data": {
        "transaction": {
            "transaction_type": "DEBIT",
            "amount": 250, //amount debited from the card, greater than 0
            "currency_code": "USD", //currency code (represented by 3 characters)
            "state": "COMPLETE", //internal status of transaction
            "running_balance": 1209.72, //card balance after the current transaction
            "international": false,
            "transaction_datetime": "2022-10-17T15:14:23.641Z",
            "additional_data": {
                "fee_amount": 0
            },
            "id": "cс_2RQkugaT85ITUToNCaaepm", //transaction ID in connectFi
            "cardId": "crda_1EnrcK7QgBU2030pNCaygA" //card ID in connectFi
        }
    }
}

200 (HTTP response status code) -- Success, debit was successful (optional properties "reference", "merchant" object, and "transactionType" present)

{
    "code": "0", //Success
    "data": {
        "transaction": {
            "transaction_type": "DEBIT",
            "amount": 15.62, //amount debited from the card, greater than 0
            "currency_code": "USD", //currency code (represented by 3 characters)
            "state": "COMPLETE", //internal status of transaction
            "merchant": { 
                "mcc": 5813,
                "mcc_name": "Restaurant",
                "mcc_group": "F002-Restaurant-Eating and Drinking Places",
                "merchant_name": "Fantastic Fancy Dining",
                "merchant_city": "Chicago",
                "merchant_region": "Mid-West",
                "merchant_country": "USA"
            },
            "running_balance": 334.39, //card balance after the current transaction
            "international": false,
            "transaction_datetime": "2022-10-17T17:36:23.816Z",
            "additional_data": {
                "fee_amount": 0
            },
            "id": "cс_1BML3aTIevV7fDbzGABtrm", //transaction ID in connectFi
            "cardId": "crda_1dNEursRaiIY2Kz4WNzvcw" //card ID in connectFi
        }
    }
}

Errors

400 (HTTP response status code) -- Transaction denied due to maximum cash withdrawal amount in given interval

In this example, the maximum amount of combined debit transactions was exceeded within a specified interval.

{
    "code": "extCondor",
    "subCode": "T0002",
    "context": {
        "title": "cardsDebitTransaction"
    },
    "message": "Manual Signature Based Cash Withdrawal Decline (Transaction Denied, due to Maximum Cash Withdrawal Amount in Given Interval (1000))"
}

400 (HTTP response status code) -- Transaction denied due to maximum cash withdrawal amount within last 1 day

In this example, a debit amount of 9000000000 was requested.

{
    "code": "extCondor",
    "subCode": "T0002",
    "context": {
        "title": "cardsDebitTransaction"
    },
    "message": "Manual Signature Based Cash Withdrawal Decline (Transaction Denied, due to Maximum Cash Withdrawal Amount (1000000) within last 1 Day / specific limits on {Service Id[MNL_CSH_SIG]})"
}

400 (HTTP response status code) -- Insufficient funds

In this example, the attempted debit exceeded the funds balance available.

{
    "code": "extCondor",
    "subCode": "T0002",
    "context": {
        "title": "cardsDebitTransaction"
    },
    "message": "Manual Signature Based Cash Withdrawal Decline (Insufficient Funds [1529.72])"
}

400 (HTTP response status code) -- Debit amount must be greater than 0

In this example, a debit amount of 0 was requested.

{
    "code": "requestValidateError",
    "context": [
        {
            "instancePath": "/amount",
            "schemaPath": "financial#/definitions/amount/exclusiveMinimum",
            "keyword": "exclusiveMinimum",
            "params": {
                "comparison": ">",
                "limit": 0
            },
            "message": "must be > 0"
        }
    ]
}

400 (HTTP response status code) -- Pre-Active Card

In this example, a debit transaction was attempted on a card that has not yet been activated.

{
    "code": "extCondor",
    "subCode": "C1016",
    "context": {
        "title": "cardsDebitTransaction"
    },
    "message": "Manual Signature Based Cash Withdrawal Decline (Pre-Active Card)"
}

400 (HTTP response status code) -- Blocked Card

In this example, a debit transaction was attempted on a card that has been blocked and is currently inactive. If a card has been blocked, you must make a request to the /condor/card/change-status endpoint to change the card status to "ACTIVE" before attempting a debit transaction from the card.

{
    "code": "extCondor",
    "subCode": "T0002",
    "context": {
        "title": "cardsDebitTransaction"
    },
    "message": "Manual Signature Based Cash Withdrawal Decline (Inactive Card)"
}