Instant Funding

Card to Card Transfers

What are Debit Cards?

A Debit Card is a type of payment card that deducts or debits funds directly from a User’s checking account. Debit Cards differ from Credit Cards in that the funds are immediately withdrawn from your checking account, while the funds from a Credit card transaction are charged to your line of credit to be paid back at a later date. Debit Cards can be physical (e.g. Visa, Mastercard) or virtual (e.g Apple Pay or Google Pay).

Astra Cards API

Astra is the first and only API to provide fintech developers with a PCI compliant and easy to implement solution for me-2-me transfers between any two debit cards owned by the same individual. With our debit card to debit card solution, settlements are instantaneous, secure, and reliable.

Basic Setup

Below is an outline of the basic steps for standing up me-2-me debit card transactions. In this example, we’ll describe how to connect an external debit card (Card A) and how to issue your own (Card B) to create a Routine of a debit payment type. To learn more about each Card endpoint, please reference our Cards chapter in our documentation.

Obtain an Active Authorization

Obtain an active authorization from the end-user through the Authorization step in our OAuth Module. This step will yield a temporary Authorization code that must be exchanged for an access_token for further API requests to Astra.

Card A: Externally Linked

For all Debit Cards not issued by your company, use our OAuth Module and guide the end–user to the cards/connect screen at https://app.astra.finance/cards/connect to collect their Debit Card information. Astra is PCI compliant and certified.

Card B: Company Issued

Request POST /v1/cards:

curl -X POST 'https://secure.api.astra.finance/v1/cards' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer your_access_token' \
  --data-raw '{
    "card_number": "4242424242424242",
    "card_security_code": "123",
    "expiration_date": "02/24",
    "first_name": "Sally",
    "last_name": "Smith",
    "street_line_1": "123 Astra Ave.",
    "street_line_2": "",
    "city": "Menlo Park",
    "state": "CA",
    "zip_code": "45678"
  }'

Response:

{
    "card_company": "Visa",
    "expiration_date": "02/24",
    "id": "0e241f30-b951-41e3-a89f-31c3a3ed5b2b",
    "last_four_digits": "4242"
}

For your company to issue an end-user a physical or virtual debit card, create the card by way of our POST v1/cards endpoint through our secure API URL. Note that POST requests for this endpoint require you prepend secure. to the api.astra.finance URL. It’s important to note that every OAuth Client (i.e your Company) will need to register at least one Banking Identification Number (BIN) with Astra. All card numbers issued via the POST v1/cards endpoint must match the BIN number that has been registered with Astra.

For Unit customers, please reference their technical documentation below to learn more about enabling card to card payments. Enabling Card to Card Payments with Unit & Astra

GET the IDs for Card A and Card B

Retrieve the ID of Card A and Card B through the GET /v1/cards endpoint.

POST a Routine:

Request POST/routines:

curl -X POST 'https://secure.api.astra.finance/v1/routines' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer your_access_token' \
  --data-raw '{
    "type": "one-time",
    "name": "My Instant Transfer",
    "source_id": "your_source_card_id",
    "destination_id": "your_destination_card_id",
    "amount": 100,
    "start_date": "2022-04-01",
    "payment_type": "debit"
  }'

Response:

{
  "id": "1",
  "type": "one-time",
  "name": "My Instant Transfer",
  "payment_type": "debit",
  "source_id": "source_account_id",
  "destination_id": "destination_account_id",
  "amount": 100,
  "client_correlation_id": "your_unique_id",
  "start_date": "2022-04-01",
  "active": true,
  "status": "active",
  "created": "2022-04-01T15:12:04.746260"
}

Set up routines and transfers between debit cards, just as you would with ACH Accounts. POST any Routine and specify the payment type as debit. Use the ID of Card A as the source_id and the ID of Card B as the destination_id. In the blink of an eye, funds from Card A will be withdrawn and be made immediately available via Card B. When transferring between debit cards, the payment_type parameter in the transfer object must be set to debit or else the request will fail. For example, if the payment_type between two debits is set to ach, the transfer will fail. Inversely, if the payment_type between two ACH accounts is set to debit, the transfer will also fail.

Please see the section on The Transfer Object to learn more.

Fees & Routine Preview

If you plan to apply fees through your Instant Funding program, we highly recommend using our Routine Preview endpoint which returns a fee structure payload as a response and provides a preview of what the fee structure will be upon submitting a Routine with the same parameters.

When applying fees, you must first determine if the fees are going to be additive or subtractive. Additive fees are added to the final amount that is pulled or debited from the source debit card, while subtractive fees are subtracted from the final amount that gets pushed or credited to the destination debit card. For example, let’s say a 1% fee is applied to a $100 transfer. With additive fees, the amount that will be pulled from the source destination card will be $101, and $100 will be pushed to the destination debit card. With subtractive fees, $100 will be pulled from the source debit card, and $99 will be pushed to the destination debit card.

This Routine Preview endpoint will take a percentage based fee as an input and calculate the dollar amount on the pull (debit) and push (credit) based on the fee type (additive or subtractive).

🚧

Whether a fee is a subtractive or additive, you must clearly display to the User the fees that will be applied and the total amount they’ll be sending or receiving depending on the fee structure.

If you plan to apply fees through your Instant Funding program, you must take the following steps:

  • Notify Astra that you plan to apply fees and the date with which you plan to go-live with fees. Also share the percentage fee amount(s) and any other relevant fee details (e.g. the first 3 transfers are free before fees are applied).
  • Provide Astra with a screenshot from your application's user interface, demonstrating how fees are displayed and communicated to the User.