<p>I ended up doing an intermediate solution.</p>

<p>I stored the serialized POST data in a record, with a unique identifier.</p>

<p>I passed the <code>unique_id</code> (a random md5 hash) to Stripe as metadata.</p>

<p>On the webhook, I used the <code>unique_id</code> to retrieve the POST data.</p>

CC BY-SA 4.0
2018-10-16T12:23:18.567Z
2018-10-16T12:23:18.567Z
Tim Coysh
<p>I'm not exactly sure how this plugin works, but in general the best way to do this is to rely on Webhooks.  You can listen for <code>charge.succeeded</code> events and send an email when those occur.  If you're not a programmer, you can always use something like Zapier or IFTTT to do this too.</p>

<p>:)  Hope that helps!</p>

CC BY-SA 4.0
2018-10-16T05:36:51.187Z
I’ve been doing that. The trouble is the custom fields, the webhook doesn’t send those details.
Tim Coysh
CC BY-SA 4.0
2018-10-15T20:58:58.987Z
2018-10-15T20:58:58.987Z
korben
<p>I'm using <code>craft-stripecheckout</code> to accept payments on my site, but want to email the user with the custom fields <strong>after</strong> they have been redirected.</p>

<p>Easiest way to describe this is below:</p>

<p>Page 1 - User is asked for payment amount and other custom inputs such as age.</p>

<p>Page 2 - Confirmation of details is shown, and Stripe payment button appears.</p>

<p>Page 3 - User is redirected here via the plugin after payment is completed. <em>this is when the email is sent with custom fields, such as age</em></p>

<p>What is the best way to store all of the POST data, and use it again on the confirmation page?</p>

<post><stripe>
Storing data for page in twig
# Storing data for page in twig

(Asked by: username_0 on 2018-10-15)

I'm using `craft-stripecheckout` to accept payments on my site, but want to email the user with the custom fields **after** they have been redirected.

Easiest way to describe this is below:

Page 1 - User is asked for payment amount and other custom inputs such as age.

Page 2 - Confirmation of details is shown, and Stripe payment button appears.

Page 3 - User is redirected here via the plugin after payment is completed. *this is when the email is sent with custom fields, such as age*

What is the best way to store all of the POST data, and use it again on the confirmation page?

**Tags:** post, stripe


---

## 2 answers

### Answer by username_0 on 2018-10-16. Score: 0 | Accepted answer

I ended up doing an intermediate solution.

I stored the serialized POST data in a record, with a unique identifier.

I passed the `unique_id` (a random md5 hash) to Stripe as metadata.

On the webhook, I used the `unique_id` to retrieve the POST data.


---

### Answer by username_1 on 2018-10-15. Score: 1

I'm not exactly sure how this plugin works, but in general the best way to do this is to rely on Webhooks. You can listen for `charge.succeeded` events and send an email when those occur. If you're not a programmer, you can always use something like Zapier or IFTTT to do this too.

:) Hope that helps!

> **Comments:**
> **username_0**: I’ve been doing that. The trouble is the custom fields, the webhook doesn’t send those details.  

---

