New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defaults for card type and category #607

Closed
matin opened this Issue May 14, 2014 · 4 comments

Comments

Projects
None yet
3 participants
@matin
Member

matin commented May 14, 2014

curl https://api.balancedpayments.com/cards \
    -u ak-test-2qEM0Znvd8LIVbZ01LbFHvHgab4fkNr3c: \
    -d number=4111111111111111 \
    -d name="Johannes Bach" \
    -d expiration_month=05 \
    -d expiration_year=2017

returns the following for the card:

{
    "bank": "JPMORGAN CHASE BANK, N.A.",
    "brand": "Visa",
    "type": "",
    "category": null,
    "can_debit": true,
    "can_credit": false,
    ...
}

Even if we're not certain of the values

  • type should default to credit
  • category should default to other

/cc @cieplak

@matin matin added the push to card label May 14, 2014

@mjallday

This comment has been minimized.

Show comment
Hide comment
@mjallday

mjallday May 14, 2014

Contributor

@matin category should default to other or unknown? it's possible that we haven't backfilled the information so "other" feels less correct than "unknown".

Contributor

mjallday commented May 14, 2014

@matin category should default to other or unknown? it's possible that we haven't backfilled the information so "other" feels less correct than "unknown".

@matin

This comment has been minimized.

Show comment
Hide comment
@matin

matin May 14, 2014

Member

My reasoning:

  1. If we don't know that it's a prepaid card, then it's something else => other
  2. If we don't know it's a debit card, then there's only one other possibility => credit
Member

matin commented May 14, 2014

My reasoning:

  1. If we don't know that it's a prepaid card, then it's something else => other
  2. If we don't know it's a debit card, then there's only one other possibility => credit

@matin matin referenced this issue May 14, 2014

Merged

Push to card specs and scenarios #580

4 of 4 tasks complete
@matin

This comment has been minimized.

Show comment
Hide comment
@matin

matin May 14, 2014

Member

To explain in more detail, the main purpose of returning this information is to give marketplaces the ability to communicate to their customer that the card they've entered is not a debit card or is a prepaid card. Having an "unknown" or null option just makes their lives more difficult by requiring they check against more outcomes and provide an appropriate message to the cardholder.

If we were building a BIN lookup service, then it's more important to be accurate. Our goal is to just provide more detail as to why can_credit is true or false.

Member

matin commented May 14, 2014

To explain in more detail, the main purpose of returning this information is to give marketplaces the ability to communicate to their customer that the card they've entered is not a debit card or is a prepaid card. Having an "unknown" or null option just makes their lives more difficult by requiring they check against more outcomes and provide an appropriate message to the cardholder.

If we were building a BIN lookup service, then it's more important to be accurate. Our goal is to just provide more detail as to why can_credit is true or false.

@matin

This comment has been minimized.

Show comment
Hide comment
@matin

matin May 15, 2014

Member

Works now:

curl https://api.balancedpayments.com/cards \
     -u ak-test-2qEM0Znvd8LIVbZ01LbFHvHgab4fkNr3c: \
     -d number=4111111111111111 \
     -d name="Johannes Bach" \
     -d expiration_month=05 \
     -d expiration_year=2017
{
  "cards": [
      "number": "xxxxxxxxxxxx1111",
      "expiration_month": 5,
      "id": "CC2rgNyHu32kDeGubho6Fnv",
      "category": "other",
      "type": "credit",
      "bank_name": "JPMORGAN CHASE BANK, N.A.",
      "brand": "Visa",
      "can_debit": true,
      "name": "Johannes Bach",
      "expiration_year": 2017,
      "can_credit": false,
      "created_at": "2014-05-15T05:58:58.143693Z",
      ...
    }
  ]
}
Member

matin commented May 15, 2014

Works now:

curl https://api.balancedpayments.com/cards \
     -u ak-test-2qEM0Znvd8LIVbZ01LbFHvHgab4fkNr3c: \
     -d number=4111111111111111 \
     -d name="Johannes Bach" \
     -d expiration_month=05 \
     -d expiration_year=2017
{
  "cards": [
      "number": "xxxxxxxxxxxx1111",
      "expiration_month": 5,
      "id": "CC2rgNyHu32kDeGubho6Fnv",
      "category": "other",
      "type": "credit",
      "bank_name": "JPMORGAN CHASE BANK, N.A.",
      "brand": "Visa",
      "can_debit": true,
      "name": "Johannes Bach",
      "expiration_year": 2017,
      "can_credit": false,
      "created_at": "2014-05-15T05:58:58.143693Z",
      ...
    }
  ]
}

@matin matin closed this May 15, 2014

@matin matin referenced this issue May 16, 2014

Merged

tdd your api #104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment