title: Retrieve Stripe charge status from used source token - Node + MongoDB
body: <p>Let's say my user submits a credit card token to my server to complete a purchase. Then I save this token in my user's cart, and in the sequence, I charge it.</p>
  
  <p>I receive a success response with the charge id and, suddenly, my server stops working just before I can store this charge id in my user's cart.</p>
  
  <p>The charge was definitely made, but I couldn't save it in my database to generate the user's order and make the products available, so I don't know if it succeeded or not.</p>
  
  <p>What I want to do is to mitigate any possibility of duplicate payments. I've looked into the entire Stripe's API but I just couldn't find any information about if it's possible to retrieve a charge using the card token that was used to create it.</p>
  
  <p>Every time when my server reboots, some processes are triggered to verify database integrity (I'm using MongoDB, by the way), and one of those processes tries to make charges for all user carts (with already generated card tokens) that were left in a "waiting payment" state. If a card token wasn't charged yet, everything works well, but if it was charged already, I just don't know if the charge succeeded or not, so I can't update my cart to a consistent state.</p>
  
  <p>I can retrieve the card token by using "stripe.tokens.retrieve(token).then(...", but I just know if it was used or not. I have to find a way to discover if it was charged and if it succeeded.</p>
  
  <p>I've tried to store the card token as a metadata of my charge, so I'd be able to retrieve charges that contain this card token as metadata, but it seems that this kind of query is not possible.</p>
  
  <p>Does anyone know how to overcome this issue or any better logic to grant payment consistency in a MongoDB payment implementation?</p>