customer/v1/fund
[POST] customer/v1/fund
Fund account via debit card
The fund endpoint allows customers to fund their account balance via transaction from an external debit card account. 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. As an example, 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 client's bank account the next business day.
Example [POST] Request
{{card_base_url}}/customer/v1/fund
{
"amount" : {{ryan-debit-amount}},
"currency" : "USD",
"memo" : "Debit card funding from Brittany for 28700",
"cardType" : "DEBIT",
"cardNumber" : "################",
"cardExp" : "1025",
"cardCvv" : "999",
"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 | Format | Required | Details |
---|---|---|---|
"amount" | Integer | Y | Funding amount in lowest currency e.g. cents. Cannot be 0. |
"currency" | String; Three-letter ISO currency code | Y | The transaction currency |
"memo" | String | N | The transaction memo |
"cardType" | enum | Y | Card type. See below |
"cardNumber" | String | Y | Credit card number |
"cardExp" | String | C; required for cardType of "DEBIT" | Card expiration date |
"cardCvv" | String | N | Card security code (CVV / CVC) |
"cardholderFirstname" | String | Y | Cardholder first name |
"cardholderLastname" | String | Y | Cardholder last name |
"cardholderCompany" | String | N | Cardholder's company |
"cardholderAddress1" | String | Y | Cardholder's billing address |
"cardholderAddress2" | String | N | Cardholder's billing address, line 2 |
"cardholderCity" | String | Y | Cardholder's billing city |
"cardholderState" | String; Format: CC | Y | Cardholder's billing state |
"cardholderZip" | String | Y | Cardholder's billing zip code |
"cardholderCountry" | String; Two-letter ISO 3166. Format: CC | N | Cardholder's billing country |
"cardholderPhone" | String | N | Cardholder's billing phone number |
"cardholderEmail" | String | N | Cardholder's billing email |
"saveCard" | Boolean | Y | Customer authorization to save card details |
Card Types
Code | description | Notes |
---|---|---|
DEBIT | Debit card | Requires cardExp |
Example Response
{
"fund": {
"amount": 28700,
"currency": "USD",
"memo": "Debit card funding from Brittany for 28700",
"cardType": "DEBIT",
"cardNumber": "################",
"cardExp": "1025",
"cardCvv": "999",
"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": "db99e7ad5644b5e8cf7bc2405f6655a8",
"status": "PENDING",
"dateCreated": null,
"dateUpdated": null
}
Response Elements
(In addition to elements found in the input parameters)
Element | Details |
---|---|
transactionId | UUID payment identifier |
cardToken | Avenu issued card token; set to blank currently |
status | Status of payment at end of transaction. See Payments Overview. |
dateCreated | Transaction processed date in format ISO 8601 YYYY-MM-DD. |
dateUpdated | Date of last status update in format ISO 8601 YYYY-MM-DD |
Error Codes
code | Message |
---|---|
1001 | "Missing required field" |
1002 | "Invalid data structure" |
1003 | "Invalid data" |
Updated about 1 month ago