Receive payments in virtual currencies
This guide provides step-by-step instructions for receiving payments in a variety of virtual currencies.
1. Create a PaymentIntent
Use the Create PaymentIntent endpoint and send a payload with at least the required parameters.
This is a protected endpoint and the usage of your API Key is required.
By default, Coinify provides a BTC quote for the PaymentIntent. See how to preselect a different cryptocurrency.
2. Redirect your customer or Host your own Payment Window
Coinify Hosted Payment Window
Coinify provides a hosted checkout user interface which enables your customer to easily send the requested amount to the correct address and also choose from a variety of virtual currencies.
The URL to the Coinify hosted checkout user interface is returned in the successful response of the Create a PaymentIntent endpoint.
GETHTTP verb to redirect your customer.
Self-hosted Payment Window
The PaymentIntent resource provides you with all the necessary data to build your own Payment Window around it and provide the UX/UI that is aligned with your brand.
After a successful creation of a PaymentIntent, call the Read PaymentIntent endpoint to retrieve the PaymentIntent resource and fetch relevant payment information from the latest quote. All the created quotes can be found in the
3. Expect a webhook notification
Coinify sends a callback notification to a webhook URL you provided once a PaymentIntent has been completed or failed.
If you are building a self-hosted payment window, you need to inform the customer about a successful or failed payment. The
stateReason of a PaymentIntent are provided in the webhook events.
For more information on how to set up a webhook URL with Coinify and see the structure of the notifications read the Webhooks guide.
Validate the signature
Coinify includes a signature in the Header of each webhook notification request.
For more information on validating the signatures, read the Webhooks guide.
Never accept a payload before validating that the signature is correct.
Based on the
state received in a webhook notification you can determine whether the PaymentIntent was successful or not and provide or reject the service/product to your end-user accordingly.
Once you receive a
completed notification that contains the correct signature, the PaymentIntent was successful and your merchant account has been credited.
Once you receive a
failed notification that contains the correct signature, the PaymentIntent was not successful and your merchant account has not been credited.
Updated about 2 months ago