How to check that transaction is success or not?

I am using java api for payment transaction.

First I am creating vault with credit card and expiry date information.

When I am making trancation,It decline due to invalid card or some other reason and i got response.

From response how can i check that trancation is fail or success.

Which field I have to use?is there any response code available for that?