How can I receive a payment notification when I receive Bitcoin in a wallet on Coinbase? - bitcoin

I am building a bitcoin payment processor based on Coinbase. I will receive Bitcoin from end users.
Coinbase lets wallet owners receive notifications of various events via a webhook.
Which event will be generated when a user sends Bitcoin to my Coinbase wallet addresses?
And how can I know from that notification webhook whether the transaction has been confirmed or not? If confirmed, how many times it has been confirmed?
I know there are transaction APIs, but I also need a response from the webhook, because this information is important.

I have got clear understanding after making payment.
I thought Coinbase will call my webhook each time when transaction get confirmed, But they call only once.
And the event responnsible for new payment is wallet:addresses:new-payment. Which is available in their post data
{"id":"5a6956f9-94bb-5c15-99f3-a90347674","type":"wallet:addresses:new-payment" ....

Related

Bitcoin transaction verification process

I am building and app which will offer payment in bitcoins. I know that when I send bitcoin from one address to another it can be tracked by blockain API to verify the transaction. After receiving some assets I want to send some assets back. The customer will have an input field where he will paste his deposit wallet address. I am subscribed to blockchain API to track received assets to my bitcoin address. How can I verify that the payment was made by certain customer? Checking his address doesn't seem to solve the problem because if customer uses wallets like Coinbase, Bitstamp etc. transaction is made from multiple addresses.
A few helpers here:
What you need to do is to generate a new address and give it to your customer. This way you can uniquely identify him
Wait for confirmation before making the decision. Just because you see a transaction, does not mean you have the money. You need to wait for a few blocks and several (>6) confirmations

BlueSnap Subscription Fail simulation

Is there any way to simulate bluesnap. what happens when a recurring payment fails, for example, if the user doesn't have money on the card in that moment?
Thank in advance :)
BlueSnap offers IPN (Instant Payment Notification) alerts for events such as declined CC charge for a subscription. This type of IPN is defined as "on demand" - which means you will need to register to receive it in the BlueSnap control panel.
https://support.bluesnap.com/docs/on-demand-ipns
Since the IPNs are messages sent over HTTP, you can choose to send them to your server, and configure a receiver for it there. Once the IPN reached your server it can be parsed by your receiver and you can choose what to do with it, for example:
send an automated email to your customer support or accounting department
send an email to the shopper
log the event in your system for later analysis.
IPNs can also be sent manually, thus simulating this event. For you specific case, the IPN for CC_CHARGE_FAILED can by opening a browser with a connection that can access your server, and putting the IPN in the address line. Your receiver will get the information and respond accordingly.
If you already received an IPN for an actual CC charge failure - use that IPN message as is. If you have not yet received such an IPN and in fact you're just starting out and building your own receiver, you should contact BlueSnap merchant support at merchants#bluesnap.com and they'll send you a sample.

Chargeback handling/cancelled payments in Omnipay

Can I confirm that with gateways like Paypal IPN which are plagued by disputed payments or chargebacks that there is no mechanism within Omnipay to react to these notifications from the Gateway and nullify the payment and then take the appropriate action on the website/database?
You are correct, Omnipay doesn't have support for out of band "notifications" such as PayPal IPN after the payment is processed.
It correctly handles notifications when a payment is first made, but right now there aren't any methods to handle a notification in the event of a chargeback etc down the line.

Does paypal send a notification when someone cancels their preapproved payment?

If a user approves a preapproval payment and then goes to paypal and cancels their preapproved payment, does paypal send any kind of notification to my application to let me know that it has been canceled?
Here is some documentation on the matter: Paypal Preapproval API Operation
PayPal sends an IPN message in response to a payment, a refund,
creation of a preapproval, and cancellation of a preapproval. Your IPN
message handler must be set up in the way described in the Instant
Payment Notification Guide.
Source

DNN Problem: Dynamic Registration, Paypal, and User Creation

I'm having a problem with the module Dynamic Registration for DNN.
The module is set up with form completion events in such a way that a user gets redirected to paypal and on completion of payment a user gets created and an email is sent out.
I also have it set up so that an email gets sent out on completion of payment, just to test that the module knows when payment has been completed.
I tried going through the process with the payment gateway (Paypal) enabled - the email gets sent out, but the user does not get created. When I disable the payment gateway, however, a user does get created as well as the email is sent out.
Is there something I'm missing here that is making the module not realize it needs to create the user?
The fact that the module sends out the email makes me think that it should also trigger the Uesr Creation event.
Any ideas/hints as to how Dynamic Registration works with Paypal or how I might be able to fix this?
When the user returns to your site from paypal you must have Friendly URL's turned on or the site can't read the data sent back from paypal.
I found the following information at http://www.datasprings.com/Products/ProductForums/tabid/727/forumid/3/tpage/1/view/topic/postid/4581/language/en-US/Default.aspx#4581
When PayPal integration is turned on:
The user is redirected to PayPal based on the information and settings within your PayPal Payment gateway. This includes the PayPal login, sandbox or standard gateway, and payment information/additional parameters.
Completion events do not get fire off initially
How do completed events get fired off?
When PayPal is enabled Dynamic Completion Events need to be ‘linked’ to PayPal IPN codes. In short, this means that you will specify within the PayPal payment gateway section which ‘completion events’ should be fired off basically conditionally upon which IPN code PayPal will send to your registration form.
For example: Maybe you want to setup a completion event to add the user to a security role, but you only want this to happen when the payment is completed. You would first create the completion event, and then you would ‘link it’ within the PayPal payment gateway section under ‘Form Completion Events / PayPal Payment Status’
For example: Maybe you want to setup a ‘Payment failed’ email to be sent to the administrator if a subscription payment fails. You would first create the completion event, and then you would ‘link it’ within the PayPal payment gateway section under ‘Form Completion Events / PayPal Payment Status’