There is no clear definition of what you need to do to "overcome" a trap in Pathfinder rules, but surviving is probably enough.
A search is the SRD brings no useful information: I may be missing something but it seems like Pathfinder just never clearly states this point.
However Pathfinder is built from DD3.5 where it is stated (DMG, p39) that:
Overcoming the challenge of a trap involves encountering the trap, either by disarming it, avoiding it, or simply surviving the damage it deals. A trap never discovered or never bypassed was not encountered (and hence provides no XP award).
So in 3.5 there was no ambiguity: surviving the damage was enough.
In Pathfinder, the best we have is a quote from James Jacobs in Paizo forums:
ALL XP awards in the game are handed out when the thing they're attached to is defeated. Be that a monster or a trap or a haunt or a tense political standoff. Be "defeated" akin to "killed" or "driven away" or "disabled" or "endured.
AKA: You get full XP for a trap if you detect it/disable it, if you trigger it and survive its effects, or if you detect it and avoid it. You don't get the XP more than once (so if you detect and avoid it then come back later and disable it or endure its effects, you don't get to double dip).
James Jacobs don't make authority on Pathfinder's rules, but at least his position is clear.
If you want to convince yourself about the validity of this approach you can think the following: how is disarming the trap a better solution that triggering it? Triggering it will cause penalties like hp losses, but disarming it costs time. If the PC group is one barbarian, one cleric of Sarenrae, one oracle of life and one paladin it makes complete sense for them to send the barbarian running into a probably trapped corridor and heal him rather than trying desperately to find a trap they anyway have no chance to be able to disable. In that case to me making the PC gain no XP would be the same as making them gain no XP on an encounter against kobolds because the wizard chose to use his only fireball to kill all of them in one round.