Short answer. No. Civil Code Article 2017 applies the gambling rules to you even though you were not an active player. That means the winner has no legal obligation to pay you your winnings — the same rule that bars a winner from suing to collect applies to bettors on the sidelines just as it does to the players themselves.
What the law says
The provisions of article 2014 and 2016 apply when two or more persons bet in a game of chance, although they take no active part in the game itself.
Civil Code, Article 2017 — Bettors on a Game of Chance. Read the full provision →
Why the winner cannot be forced to pay you
Article 2017 extends the rules on gambling to bettors who watch from the sidelines — people who stake money on the outcome without sitting at the table themselves. By doing so, it pulls in Article 2014, which says: no action can be maintained by the winner for the collection of what he has won in a game of chance. Neither party to a gambling arrangement can use the courts to collect. If you won the bet, you have no legal remedy to force the other side to pay. The obligation is purely moral, not enforceable.
The rule if you lost the bet
Article 2017 also imports Article 2014's other side: any loser in a game of chance may recover his loss from the winner, with legal interest from the time he paid the amount lost, and subsidiarily from the operator or manager of the gambling house. This is an asymmetric rule. The loser can get back what they paid; the winner cannot sue to collect. If you placed a bet and lost, and then paid up, you could potentially reclaim what you paid from whoever received it.
The family's right to step in
Article 2016 is also incorporated through Article 2017, and it allows a loser's creditors, spouse, descendants, or other legally entitled persons to bring the action to recover gambling losses if the loser refuses or neglects to do so. The sum recovered is applied to the creditors' claims or to the support of the spouse or relatives. This provision recognizes that gambling losses hurt families and creditors, not just the losing bettor.
Practical reality
If you are sitting on the sideline of a card game and put money down on the outcome, you are in the same legal position as the players — no court will help you collect if you win. The only court access is for the loser who wants money back. This does not mean the social obligation disappears; it means the law simply declines to enforce gambling debts in either direction on the winning side. If the person you bet with pays willingly, that is their choice. If they do not, you have no legal recourse for collection.