customer/v1/token/fund

[POST] customer/v1/token/fund

Fund account via tokenized debit card

The tokenized fund endpoint allows customers to fund their account balance via transaction from an external debit card account. The card details are tokenized first, before being passed in the POST call as "paymentToken". The "cardType" for this transaction must be "TOKEN". Funds are not available immediately, they will display in the customer's current balance, but they require settlement before they display in the customer's available balance. All funding requests are made in the lowest possible denomination of a currency; eg a funding request for $1.00 USD will be sent as 100.

Avenu runs a chronjob every 15 minutes on normal banking days to check for debit funding requests in CAPTURED state. Transactions in CAPTURED state will be marked as SETTLED, allowing the customer to use those funds at that time. The funding transaction will be settled on the bank side on the next business day. Transactions made over the weekend or on bank holidays will be settled on the next business day. E.g., a debit fund transaction created on Saturday will stay in PENDING status until the chronjob runs on the next business day at midnight. If that transaction moves to a CAPTURED state at that time, the funds will be made immediately available to the customer and will settled in the clients' bank account the next business day.

Example [POST] Request

{{card_base_url}}/customer/v1/token/fund
{
    "amount" : 28700,
    "currency" : "USD",
    "memo" : "Debit card funding from Brittany for 28700",
    "cardType" : "TOKEN",
    "paymentToken" : "00000000-000000-000000-000000000000",
    "cardholderFirstname": "Brittany",
    "cardholderLastname": "Sanders",
    "cardholderCompany": "Amazon Inc.",
    "cardholderAddress1": "5 Oakwood Court",
    "cardholderAddress2": null,
    "cardholderCity": "Erlanger",
    "cardholderState": "KY",
    "cardholderZip": "41018",
    "cardholderCountry": "US",
    "cardholderPhone": "202-360-8494",
    "cardholderEmail": "[email protected]",
    "saveCard": false
}

Input Parameters

Parameter

Size/Absolute Value Restrictions

Format Restrictions

Required

Type

amount

>=100 and <= 100000

Funding amount in the lowest currency (cents)

Y

Numeric

currency

3

ISO 4217

Y

String

memo

200

None

N

Alphanumeric

cardType

50

Should accept "TOKEN" only

Y

Alpha

cardholderFirstName

50

No special characters (" !"#$%'\*+.:;\<=>?@\[\]^\_\{|}~")`

Y

Alpha

cardholderLastName

50

No special characters (" !"#$%'\*+.:;\<=>?@\[\]^\_\{|}~")`

Y

Alpha

cardholderCompany

100

No special characters " !"#$%'\*+.:;\<=>?@\[\]^\_\{|}~"`

Except: ()'-&,/

N

Alphanumeric

cardholderAddress1

128

None

Y

Alphanumeric

cardholderAddress2

128

None

N

Alphanumeric

cardholderCity

100

No special characters (" !"#$%'\*+.:;\<=>?@\[\]^\_\{|}~")`

Y

Alpha

cardholderState

2

ISO 3166-2:US

Y

Alpha

cardholderZip

9

No dashes

Has to be minimum of 5 digits or 9 digits if more than 5.

Y

Numeric

cardholderCountry

2

ISO 3166 - alpha 2

N

Alpha

cardholderPhone

10

No special characters (" !"#$%'\*+:;\<=>?\[\]^\_\{|}~")`

No dashes or hyphens

N

Numeric

cardholderEmail

320

No special characters (" !"#$%'\*+:;\<=>?\[\]^\_\{|}~")`

Exception: “At” sign - “@” allowed directly preceding the domain name.

Alphanumeric prefix with the @ symbol followed by most common Top Level Domains (TLDs) .com/.co/.net/.org/.edu/.gov/.us

N

Alphanumeric

Card Types

CodedescriptionNotes
TOKENTokenized debit card informationRequires paymentToken

Example Response

{
    "fund": {
        "amount": 28700,
        "currency": "USD",
        "memo": "Debit card funding from Brittany for 28700",
        "cardType": "TOKEN",
        "paymentToken": "00000000-000000-000000-000000000000",
        "cardholderFirstname": "Brittany",
        "cardholderLastname": "Sanders",
        "cardholderCompany": "Amazon Inc.",
        "cardholderAddress1": "5 Oakwood Court",
        "cardholderAddress2": null,
        "cardholderCity": "Erlanger",
        "cardholderState": "KY",
        "cardholderZip": "41018",
        "cardholderCountry": "US",
        "cardholderPhone": "202-360-8494",
        "cardholderEmail": "[email protected]",
        "saveCard": false
    },
    "transactionId": "cf.73220a80-b5e0-4dfb-b724-7cfd1f2e7430",
    "cardToken": "00000000-000000-000000-000000000000",
    "status": "PENDING",
    "dateCreated": "2024-07-19",
    "dateUpdated": "2024-07-19"
}

Response Elements

(In addition to elements found in the input parameters)

ElementDetails
transactionIdUUID payment identifier
cardTokenTokenized debit card information
statusStatus of payment at end of transaction. See Payments Overview.
dateCreatedTransaction processed date in format ISO 8601 YYYY-MM-DD.
dateUpdatedDate of last status update in format ISO 8601 YYYY-MM-DD

Error Codes

Category

Response Code

Response Error Message

Format

AB3006

<Field Name> : Invalid Format

Size (S)

AB3010

<Field Name> : Invalid Length

Required (R)

AB3013

<Field Name> : Missing Required Field