NowPayments Extension (Crypto Payment Gateway)

com.ali.nowpayments.aix (106.4 KB)

You can try It

Nowpayments

Extension component for NOWPayments crypto payment gateway. Accept 300+ cryptocurrencies in your app. Built with <3 and Rush.

Events

GotResponse

Event triggered when an API call succeeds

Parameters

Parameter Type
method text
response text

ErrorResponse

Event triggered when an API call fails

Parameters

Parameter Type
method text
errorMessage text

Methods

GetAPIStatus

Check the status of NOWPayments API

EstimatePrice

Estimate the amount of cryptocurrency for a given fiat amount

Parameters

Parameter Type
amount text
currencyFrom text
currencyTo text

GetCurrencies

Get list of supported currencies

GetMinimumPaymentAmount

Get minimum payment amount for a specific currency

Parameters

Parameter Type
currency text

CreatePayment

Create a new payment

Parameters

Parameter Type
priceAmount text
priceCurrency text
payCurrency text
orderId text
orderDescription text
ipnCallbackUrl text
successUrl text
cancelUrl text

GetPaymentStatus

Get status of a payment by its ID

Parameters

Parameter Type
paymentId text

Properties

ApiKey

Get your NOWPayments API key

SandboxMode

Check if sandbox mode is enabled

ApiKey

Set your NOWPayments API key

ApiKey

Get your NOWPayments API key

SandboxMode

Enable or disable sandbox mode for testing

SandboxMode

Check if sandbox mode is enabled

2 Likes

hi dear, can you share block images or a sample working aia

Are you there sir, kindly provide a aia how to setup.

Hi there, do you have any tutorial video or sample aia.?

I’m having trouble setting up this extension. Does anyone have an AIA file they can share?

Instead of waiting for the owner to respond, why did you create a new thread :thinking::thinking::thinking:

I contacted owner on whatsapp and he said he is very busy with other projects and can’t help. He told me to ask help from other developers, he also gave me java file of extension.
Nowpayments.java (17.7 KB)

Am trying to built using Fast CLI

@JEWEL project from rush can’t built in Fast?

:joy::joy:Have a look in that text log

it worked?

I released that i used wrong command fast built instead of fast build, i will recompile it again

1 Like

project for Fast
nowpayments.zip (49.4 KB)

any update ?

🧩 Nowpayments

An extension for MIT App Inventor 2.
Developed by ali using Fast.

:memo: Specifications


:package: Package: com.ali.nowpayments
:floppy_disk: Size: 14.37 KB
:gear: Version: 1.0
:mobile_phone: Minimum API Level: 14
:date: Updated On: 2025-10-25T07:00:00Z
:laptop: Built & documented using: FAST v5.2.0

Events:

Nowpayments has total 4 events.

1. GotResponse

Event triggered when an API call succeeds

Parameter Type
method text
response text

2. ErrorResponse

Event triggered when an API call fails

Parameter Type
method text
errorMessage text

3. PaymentCreated

Event triggered when payment is created successfully

Parameter Type
paymentId text
paymentUrl text

4. PaymentStatusChanged

Event triggered when payment status changes

Parameter Type
paymentId text
status text

Methods:

Nowpayments has total 15 methods.

1. GetAPIStatus

Check the status of NOWPayments API

2. EstimatePrice

Estimate the amount of cryptocurrency for a given fiat amount

Parameter Type
amount text
currencyFrom text
currencyTo text

3. GetCurrencies

Get list of supported currencies

4. GetMinimumPaymentAmount

Get minimum payment amount for specific currencies

Parameter Type
currencyFrom text
currencyTo text

5. CreatePayment

Create a new payment

Parameter Type
priceAmount text
priceCurrency text
payCurrency text
orderId text

6. GetPaymentStatus

Get status of a payment by its ID

Parameter Type
paymentId text

7. CreateInvoice

Create an invoice for payment

Parameter Type
priceAmount text
priceCurrency text
payCurrency text
orderId text

8. CreateOffSitePayment

Create payment with off-site checkout (redirect URL)

Parameter Type
priceAmount text
priceCurrency text
payCurrency text
orderId text

9. GetPaymentHistory

Get payment history with pagination

Parameter Type
limit text
offset text

10. GetBalance

Check account balance

11. GetPaymentMethods

Get list of available payment methods

12. GetExchangeRates

Get exchange rates for all supported currencies

13. IsCurrencySupported

Validate if a cryptocurrency is supported

Parameter Type
currencyCode text

14. CreateWithdrawal

Create a withdrawal request

Parameter Type
currency text
amount text
address text

15. GetWithdrawalHistory

Get withdrawal history

Setters:

Nowpayments has total 8 setter properties.

1. ApiKey

Set your NOWPayments API key

  • Input type: text

2. SandboxMode

Enable or disable sandbox mode for testing

  • Input type: boolean

3. SuccessUrl

Payment success URL

  • Input type: text

4. CancelUrl

Payment cancel URL

  • Input type: text

5. IpnCallbackUrl

IPN callback URL

  • Input type: text

6. CustomerEmail

Customer email for payment

  • Input type: text

7. CustomerName

Customer name for payment

  • Input type: text

8. OrderDescription

Order description

  • Input type: text

Getters:

Nowpayments has total 8 getter properties.

1. ApiKey

Set your NOWPayments API key

  • Return type: text

2. SandboxMode

Enable or disable sandbox mode for testing

  • Return type: boolean

3. SuccessUrl

Payment success URL

  • Return type: text

4. CancelUrl

Payment cancel URL

  • Return type: text

5. IpnCallbackUrl

IPN callback URL

  • Return type: text

6. CustomerEmail

Customer email for payment

  • Return type: text

7. CustomerName

Customer name for payment

  • Return type: text

8. OrderDescription

Order description

  • Return type: text

Note

I just compiled this aix i don’t own it

For more info ask @Adnan_Ali1 as the owner of the code provided

DOWNLOAD BELOW

com.ali.nowpayments.aix (14.4 KB)

1 Like

** Thanks for the update. I understand the owner is busy. I’ll try to work with the Java file you shared and reach out to other developers if needed. Appreciate your help!

How to Use Nowpayments Extension

Add the Nowpayments extension to your project

  1. Import the Nowpayments extension aix file into your Kodular project

In Screen Initialization Blocks:

When Screen.Initialize:
    Set Nowpayments1.ApiKey to "YOUR_NOWPAYMENTS_API_KEY"
    Set Nowpayments1.SandboxMode to true  // Use false for production
    Set Nowpayments1.CustomerEmail to "customer@example.com"
    Set Nowpayments1.CustomerName to "Customer Name"
    Set Nowpayments1.OrderDescription to "Product Description"
    Set Nowpayments1.SuccessUrl to "https://yoursite.com/success"
    Set Nowpayments1.CancelUrl to "https://yoursite.com/cancel"
    Set Nowpayments1.IpnCallbackUrl to "https://yoursite.com/ipn"

Basic Payment Flow

  1. Check API Status:
When ButtonCheckAPI.Click:
    Call Nowpayments1.GetAPIStatus
  1. Create a Payment:
When ButtonPay.Click:
    Call Nowpayments1.CreatePayment with priceAmount "100", priceCurrency "USD", payCurrency "BTC", orderId "ORDER123"

Essential Blocks

Properties to Set

  • ApiKey: Your NOWPayments API key from the dashboard
  • SandboxMode: Enable/disable test mode
  • CustomerEmail: Customer’s email address
  • CustomerName: Customer’s name
  • OrderDescription: Description of the product/service
  • SuccessUrl: URL to redirect after successful payment
  • CancelUrl: URL to redirect if payment is cancelled
  • IpnCallbackUrl: Instant Payment Notification URL

Key Methods

  • GetAPIStatus: Check if NOWPayments API is working
  • CreatePayment: Create a new payment request
  • GetPaymentStatus: Check status of a payment
  • GetCurrencies: Get list of supported cryptocurrencies
  • EstimatePrice: Estimate crypto amount for a fiat value
  • GetBalance: Check your account balance

Important Events

  • GotResponse: Triggered when an API call succeeds
  • ErrorResponse: Triggered when an API call fails
  • PaymentCreated: Triggered when a payment is created successfully
  • PaymentStatusChanged: Triggered when payment status updates

Sample Implementation

Screen Initialization Blocks

When Screen.Initialize:
    Set Nowpayments1.ApiKey to "YOUR_NOWPAYMENTS_API_KEY"
    Set Nowpayments1.SandboxMode to true
    Set Nowpayments1.CustomerEmail to "customer@example.com"
    Set Nowpayments1.CustomerName to "Customer Name"
    Set Nowpayments1.OrderDescription to "Premium Subscription"
    Set Nowpayments1.SuccessUrl to "https://yoursite.com/payment-success"
    Set Nowpayments1.CancelUrl to "https://yoursite.com/payment-cancel"

Creating a Payment

When ButtonBuy.Click:
    Call Nowpayments1.CreatePayment with priceAmount "50", priceCurrency "USD", payCurrency "BTC", orderId "PREMIUM123"

When Nowpayments1.PaymentCreated(paymentId, paymentUrl):
    Open paymentUrl in Browser
    
When Nowpayments1.ErrorResponse(method, errorMessage):
    Show alert with message "Payment Error: " & errorMessage

Notes

  • This extension requires internet permission
  • For production use, disable SandboxMode
  • All API calls are asynchronous, handle responses in events
  • Make sure to set your API key before making any API calls
  • Sandbox mode uses test API endpoint for testing without real transactions
1 Like