Question

I am using TEST marketplace to add a new account for a credit card. Even though a new uri is generated for my credit card every time which I use to create new account, I get this error...

Account creation Request failed with response code 409. Reason: {
  "status": "Conflict",
  "category_code": "card-already-funding-src",
  "additional": null,
  "status_code": 409,
  "category_type": "logical",
  "extras": {},
  "request_id": "OHMaae31e38b88d11e2b762026ba7d31e6f",
  "description": "Card has already been associated with an account. Your request id is OHMaae31e38b88d11e2b762026ba7d31e
6f."
}

Also on the dashboard I can see that a new account has been created in my TEST marketplace despite the error. This other question also mentions the same error but the given solution doesn't apply in my case. Deleting a card or reassigning to new account

Was it helpful?

Solution

After a lot of experimenting I have figured out the issue. The following sample request given in the Balanced Processing tutorial under "Creating An Account" does not work for some reason at least it doesn't work in TEST marketplace.

curl https://api.balancedpayments.com/v1/marketplaces/TEST-MPiuxfzhprKGoIc4yZ0OuNQ/accounts \
     -u 099e55e07f7311e2b923026ba7c1aba6: \
     -d "card_uri=/v1/marketplaces/TEST-MPiuxfzhprKGoIc4yZ0OuNQ/cards/CC4R7KXv0jiDTxo5W6Gg5PnM"

Solution: It works if you skip the "card_uri". And after creating the account you have to associate the account with the card in a separate PUT request.

OTHER TIPS

Based on your follow up I can tell you what's happening:

You're copy and pasting an example from the documentation and the example has already been run. Running it a second time gives you the 409 because the card has already been associated to the account.

What you need to do is tokenize the card again, and then add the new uri that is generated for the card to your account.

e.g.

   curl https://api.balancedpayments.com/v1/marketplaces/TEST-MP6E3EVlPOsagSdcBNUXWBDQ/cards \
     -u da3da6de7c9311e288c9026ba7f8ec28: \
     -d "expiration_month=12" \
     -d "security_code=123" \
     -d "card_number=5105105105105100" \
     -d "expiration_year=2020"

then take the uri that is created and do

   curl https://api.balancedpayments.com/v1/marketplaces/TEST-MP6E3EVlPOsagSdcBNUXWBDQ/accounts \
     -u da3da6de7c9311e288c9026ba7f8ec28: \
     -d card_uri="URI_OF_NEW_CARD"

replacing URI_OF_NEW_CARD with your actual new URI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top