Step 1: Create the Payment

Do a simple POST to our API like this:

curl https://cryptopay.ninja/api/createpayment \
-F amount='13.37' \
-F currency='USD' \
-F redirect_url='https://your.site/thankyou' \
-F notify_url='https://your.site/api/notify' \
-F order_id='1337' \
-F secret='your-secret-value' \
-F description='1 cup of awesomeness!'

You can use any currency, including BTC.

Step 2: Send the user to the Payment url

Send the user to the address in the field "url" in the JSON response.

Step 3: Receive the Payment Notification

We will POST three fields to your notify_url. Check that the field "status" has the value "paid","secret" matches your secret and "order_id" to identify the payment. If your server does not respond with a HTTP 200 response, we will re try later.

Step 4: Welcome back the user

The user will be sent to your redirect_url. This will always happen after the notification has been sent.

Copyright © 2024 Cryptopay.Ninja / All rights reserved.