<blockquote>
  <p>How would I confirm the transaction has been received ?</p>
  
  <p>How would I confirm the value of the transaction is correct ?</p>
</blockquote>

<p>There are two ways:</p>

<ol>
<li>Set up and run your own full somecoin* node, and write a payment module for your site\store to interact with it. That module should provide a way to query info about a transaction, request an address for payments and so on. </li>
</ol>

<p><sub>
* somecoin - bitcoin or any altcoin
</sub></p>

<blockquote>
  <p>Are there any API's I could use to achieve what I'm looking for ?</p>
</blockquote>

<ol start="2">
<li>You can use third-party service. They're owning full-nodes and provides API. You can create payment module on top of that API.</li>
</ol>

<blockquote>
  <p>If I had to refund a user how would I do this ? </p>
</blockquote>

<p>It's depend on the payment module realization, you need a method to create a refund transaction to the user address.</p>

CC BY-SA 3.0
2018-01-23T07:52:04.340Z
2018-01-23T07:58:19.050Z
2018-01-23T07:58:19.050Z
Roman Kiselenko
<p>You can use the insticce.com api. There is no sign up required. Use it to generate unique addresses for your website. It will hit a callback url of your choice when payment is received. </p>

<p>It also forwards all payments immediately to a forwarding address of your choice. You have the option to wait for a confirmation before getting notified if you want. </p>

<p>If you accept zero conf you will not only be notified but also receive the payment at your forwarding address within seconds of the customer hitting "send". </p>

<p>It works on testnet, mainnet and uses cashaddr format.</p>

CC BY-SA 3.0
2018-02-12T07:00:51.133Z
2018-02-12T07:00:51.133Z
curtwphillips
<p>To check payment:
you can use blockchain api to do so:
<a href="https://blockchain.info/q" rel="nofollow noreferrer">https://blockchain.info/q</a></p>

<p>which is</p>

<p><code>https://blockchain.info/q/getreceivedbyaddress/[BITCOIN ADDRESS]?confirmations=6</code></p>

<p>confirmations can be any but minimum 6 is recommended</p>

<p>to accept bitcoin, I suggest u host a bitcoin core and use something like  <a href="https://github.com/aceat64/EasyBitcoin-PHP" rel="nofollow noreferrer">Easy Bitcoin PHP Library</a> to do so</p>

CC BY-SA 4.0
2018-03-15T20:24:54.303Z
2019-05-02T22:23:39.457Z
2019-05-02T22:23:39.457Z
zhiyan114
<p>I'd like to learn how to allow end users on my website to pay for goods using cryptocurrency.</p>

<p>Questions I have:</p>

<p>1 - How would I confirm the transaction has been received ? <br/>
2 - How would I confirm the value of the transaction is correct ? <br/>
3 - Are there any API's I could use to achieve what I'm looking for ? <br/>
4 - If I had to refund a user how would I do this ? <br/></p>

<nodes><website-integration><ecommerce><learning>
How to allow/setup crypto transfers/payments on my website?
Craig Mc Carthy
# How to allow/setup crypto transfers/payments on my website?

(Asked by: username_0 on 2018-01-23)

I'd like to learn how to allow end users on my website to pay for goods using cryptocurrency.

Questions I have:

1 - How would I confirm the transaction has been received ?   
2 - How would I confirm the value of the transaction is correct ?   
3 - Are there any API's I could use to achieve what I'm looking for ?   
4 - If I had to refund a user how would I do this ?

**Tags:** nodes, website-integration, ecommerce, learning


---

## 3 answers

### Answer by username_1 on 2018-01-23. Score: 0

> How would I confirm the transaction has been received ?
>
> How would I confirm the value of the transaction is correct ?

There are two ways:

1. Set up and run your own full somecoin\* node, and write a payment module for your site\store to interact with it. That module should provide a way to query info about a transaction, request an address for payments and so on.

\* somecoin - bitcoin or any altcoin

> Are there any API's I could use to achieve what I'm looking for ?

2. You can use third-party service. They're owning full-nodes and provides API. You can create payment module on top of that API.

> If I had to refund a user how would I do this ?

It's depend on the payment module realization, you need a method to create a refund transaction to the user address.


---

### Answer by username_2 on 2018-02-12. Score: 0

You can use the insticce.com api. There is no sign up required. Use it to generate unique addresses for your website. It will hit a callback url of your choice when payment is received.

It also forwards all payments immediately to a forwarding address of your choice. You have the option to wait for a confirmation before getting notified if you want.

If you accept zero conf you will not only be notified but also receive the payment at your forwarding address within seconds of the customer hitting "send".

It works on testnet, mainnet and uses cashaddr format.


---

### Answer by username_3 on 2018-03-15. Score: 0

To check payment:
you can use blockchain api to do so:
<https://blockchain.info/q>

which is

`https://blockchain.info/q/getreceivedbyaddress/[BITCOIN ADDRESS]?confirmations=6`

confirmations can be any but minimum 6 is recommended

to accept bitcoin, I suggest u host a bitcoin core and use something like [Easy Bitcoin PHP Library](https://github.com/aceat64/EasyBitcoin-PHP) to do so


---

