Skip to content

P2P

Request URL

POST /condor/financial/p2p (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 for peer-to-peer (p2p) money transfers between two participants: the source participant and the beneficiary participant. The source participant and the beneficiary participant should be different. Peer-to-peer transactions cannot be made, for example, between a card and itself. A Peer-to-Peer Transactions chart has been included below to illustrate valid and invalid p2p transaction examples. Request body properties are listed below as well.

Required Properties Description Schema Example Values
source The participant from whom the money is being transferred Object See Participant Object below
beneficiary The participant to whom the money is being transferred Object See Participant Object below
amount The requested transfer amount Number > 0 65.99
currency A three character ISO alphabetic code to identify the currency String, regex pattern: "^[A-Z]{3}$" "USD"
Optional Properties Description Schema Example Values
reference An external reference in your system (1-20 alphanumeric characters) String, regex pattern: "^[0-9a-zA-Z]+$" "externlCrdtId123"
additionalData An object containing any necessary additional key:value pair properties not listed elsewhere Object {"someProperty" : "Property Value"}

Participant Object

Required Properties Description Schema Example Values
type The type of participant String "CARD" or "CARDHOLDER"
id The participant ID String "csta_2Z8UujOAAEmaKdbiveb7hS"

Peer-to-Peer Transactions

Source Beneficiary Valid?
Cardholder1 Cardholder2 Yes, as long as Cardholder1's primary debit account is ACTIVE and Cardholder2's primary debit account status is either ACTIVE, NEW, or BLOCK
Cardholder1 Card2 (any card belonging to Cardholder2) Yes, as long as Cardholder1's primary debit account is ACTIVE and Card2 has ACTIVE, NEW, or BLOCK status
Card1 with ACTIVE status Cardholder2 Yes, as long as Cardholder2's primary debit account status is either ACTIVE, NEW, or BLOCK
Cardholder1 Card1 (any secondary debit card belonging to Cardholder1) Yes, as long as Cardholder1's primary debit account is ACTIVE and Cardholder1's secondary debit card has ACTIVE, NEW, or BLOCK status
Cardholder1 Card1 (primary debit card belonging to Cardholder1) No
Card1 with ACTIVE status Card2 with ACTIVE/NEW/BLOCK status Yes
Card1 with ACTIVE status Card2 with FRAUD_BLOCK/CLOSED status No
Card1 with NEW/BLOCK/FRAUD_BLOCK/CLOSED status Any No

A primary debit account is defined as the initial debit account created for the customer through the /condor/customer/create endpoint. Secondary debit accounts are defined as any additional debit accounts created for the customer through the /condor/card/add endpoint.

Request Body

HEADERS

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

REQUEST BODY

In this p2p example, both participants (source and beneficiary) are of type "CARD"

{
    "source" : {
        "type" : "CARD",
        "id" : "crda_YAJLWlQhVQLFDrcREki9i" //source card ID in connectFi
    },
    "beneficiary" : {
        "type" : "CARD",
        "id" : "crda_2QoNFEnRbJ1V6bS68Folja" //beneficiary card ID in connectFi
    },
    "amount": 10, //the amount to transfer
    "currency": "USD" //currency code
}

In this p2p example, the source participant is of type "CARDHOLDER" and the beneficiary participant is of type "CARD".

{
    "source" : {
        "type" : "CARDHOLDER",
        "id" : "csta_4KJQrxiRRrvyyxx9jT5fXq" //source customer ID in connectFi
    },
    "beneficiary" : {
        "type" : "CARD",
        "id" : "crda_2QoNFEnRbJ1V6bS68Folja" //beneficiary card ID in connectFi
    },
    "amount": 10, //the amount to transfer
    "currency": "USD" //currency code
}

In this p2p example, both participants (source and beneficiary) are of type "CARDHOLDER"

{
    "source" : {
        "type" : "CARDHOLDER",
        "id" : "csta_4KJQrxiRRrvyyxx9jT5fXq" //source customer ID in connectFi
    },
    "beneficiary" : {
        "type" : "CARDHOLDER",
        "id" : "csta_793KgLmuRlKXhTCO0TJJcA" //beneficiary customer ID in connectFi
    },
    "amount": 18.65, //the amount to transfer
    "currency": "USD" //currency code
}

Successful Response Example

200 (HTTP response status code) -- Success, funds transferred from source to beneficiary

{
    "code": "0", //Success
    "data": {
        "transaction": {
            "transaction_type": "DEBIT",
            "amount": 10, //amount that was transferred from the source card to the beneficiary card
            "currency_code": "USD", //currency code
            "state": "COMPLETE", //current status of the transaction
            "running_balance": 90, //amount available on the source card after the transaction occurs
            "international": false,
            "transaction_datetime": "2022-10-18T18:13:03.746Z",
            "additional_data": {
                "fee_amount": 0
            },
            "id": "cс_3UQKZVIUN3BnxOQxTO9fMQ", //transaction ID in connectFi 
            "cardId": "crda_YAJLWlQhVQLFDrcREki9i" //primary debit card ID for the source participant in connectFi
        }
    }
}

Errors

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

In this example, a p2p transaction was attempted on a card that has not yet been activated (either source participant card, beneficiary participant card, or both).

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

400 (HTTP response status code) -- Insufficient Funds

In this example, the source participant card does not have sufficient funds loaded to be able to complete the transaction.

{
    "code": "extCondor",
    "subCode": "T0007",
    "context": {
        "title": "p2pFundsTransfer"
    },
    "message": "Funds Transfer Decline (From Card) (Insufficient Funds [0.0])"
}

400 (HTTP response status code) -- FROM card and TO card should be different

In this example, a request was made to transfer funds from a customer (source participant) to the primary debit card issued to that same customer (beneficiary participant). When requesting a "CARDHOLDER" as a participant, the primary debit account of that cardholder is used for the transaction. So, if a request is made from a "CARDHOLDER" (as the source participant) to the same customer's primary debit card (as the beneficiary), then the source account and the beneficiary account are the exact same and the request will throw an error. Requesting a transfer from a "CARD" to the same "CARD" or a transfer from a "CARDHOLDER" to the same "CARDHOLDER" will throw a similar error.

{
    "code": "extCondor",
    "subCode": "T0007",
    "context": {
        "title": "p2pFundsTransfer"
    },
    "message": "Funds Transfer Decline (From Card) (FROM card and TO card should be different.)"
}

400 (HTTP response status code) -- Property must be object

In this example, the source and beneficiary values were given as card ID Strings instead of participant objects.

{
    "code": "requestValidateError",
    "context": [
        {
            "instancePath": "/source",
            "schemaPath": "financial#/definitions/participant/type",
            "keyword": "type",
            "params": {
                "type": "object"
            },
            "message": "must be object"
        }
    ]
}