Closed jbrowning closed 10 years ago
@jbrowning sorry for taking so long to look into this further, however this appears to be an issue with the documentation not the api.
The address info is suppose to be passed as an address object, not top level attributes like in the old version of the api.
https://docs.balancedpayments.com/1.1/api/cards/#create-a-card-direct https://github.com/balanced/balanced-api/blob/master/fixtures/_models/card.json#L90-L92 https://github.com/balanced/balanced-api/blob/master/fixtures/_models/address.json#L34-L40
[0 14:14:42 matthew]% curl https://api.balancedpayments.com/cards \ ~
-H "Accept: application/vnd.api+json;revision=1.1" \
-u ak-test-XWwrkAngK60JtzWSvvKq4pjtm5ecCdjq: \
-d "expiration_month=12" \
-d "cvv=123" \
-d "number=5105105105105100" \
-d "expiration_year=2020" \
-d "address[postal_code]=90211"
{
"cards": [
{
"cvv_match": "yes",
"links": {
"customer": null
},
"name": null,
"expiration_year": 2020,
"avs_street_match": "yes",
"is_verified": true,
"created_at": "2014-04-10T21:14:46.105523Z",
"cvv_result": "Match",
"brand": "MasterCard",
"number": "xxxxxxxxxxxx5100",
"updated_at": "2014-04-10T21:14:46.105525Z",
"id": "CCXUj8pebw2RwBSmw9mrFdj",
"expiration_month": 12,
"cvv": "xxx",
"meta": {},
"href": "/cards/CCXUj8pebw2RwBSmw9mrFdj",
"address": {
"city": "Balo Alto",
"line2": null,
"line1": null,
"state": "CA",
"postal_code": "90211",
"country_code": null
},
"fingerprint": "fc4ccd5de54f42a5e75f76fbfde60948440c7a382ee7d21b2bc509ab9cfed788",
"avs_postal_match": "unsupported",
"avs_result": "Address not verified."
}
],
"links": {
"cards.card_holds": "/cards/{cards.id}/card_holds",
"cards.customer": "/customers/{cards.customer}",
"cards.debits": "/cards/{cards.id}/debits"
}
}%
[0 14:16:00 matthew]%
@remear master of the docs, fyi ^
Thanks @matthewfl. Looks like the AVS docs were updated recently to clarify this: https://github.com/balanced/balanced-docs/commit/e751a0c2939d896ba1a4ceb5cf8428e78da604af.
API Version: 1.1
According to the documentation, an address verification check for postal codes can be simulated by supplying one of the following during tokenization:
Supplying any of these postal codes does not change the value of the
avs_postal_match
attribute in the response. Furthermore, the documentation incorrectly states that the card will have apostal_code_check
attribute containing the result.Expecting Success
Expecting Failure