Skip to main content

This library provides convenient methods for interacting with the Greencryptopay API

Project description

Greencryptopay library for Python

The Greencryptopay library for Python allows you to easily integrate the Greencryptopay payment system into your Python projects. This library provides convenient methods for interacting with the Greencryptopay API.

Installation

You can install this package using pip:

pip install greencryptopay-py

Dependencies

This package depends on the "requests" library version ^2.31.0. If it's not already installed, it will be automatically installed when you install this library.

Standard API

Getting Started:

from greencryptopay_py import Api

# Standard API
standard_api = Api.standard()

# Standard API testnet
standard_api = Api.standard(True)

# Sign up
if not merchant_id or not secret_key:
    data = standard_api.merchant('percent', 'https://example.com/callback')
    merchant_id = data['merchant_id']
    secret_key = data['secret_key']

standard_api.set_merchant_id(merchant_id)
standard_api.set_secret_key(secret_key)

Sign up:

Name Parameters Validation Description
merchant
  • str fee_type
  • str callback_url
  • Enum: [percent, fix]
  • Max: 200
  • Fee type
  • URL to send notifications about payments

Operations:

Name Parameters Validation Description
payment_address
  • str currency
  • str callback_url
  • str orderId
  • str currencyFrom
  • str amountFrom
  • Enum: [btc]
  • Max: 200
  • Max: 50
  • Enum: [usd]
  • Currency
  • URL to send notifications about payments
  • Order identifier in your system
  • Currency to convert from
  • Amount to convert
withdraw
  • str currency
  • array recipients
  • Enum: [btc]
  • Currency
  • Array structure: [['address' => 'Recipient address', 'amount' => 'Recipient's amount']]
withdraw_all
  • str currency
  • str recipientAddress
  • Enum: [btc]
  • Currency
  • Recipient address

Stats:

Name Parameters Validation Description
merchant_state
  • str currency
  • Enum: [btc]
  • Currency
merchant_payment_address
  • str currency
  • str / none from_timestamp
  • str / none to_timestamp
  • int / none limit
  • int / none page
  • str / none order
  • Enum: [btc]
  • Timestamp in UTC
  • Timestamp in UTC
  • Min:1, Max:200
  • Min:1
  • Enum: [asc, desc]
  • Currency
  • Address creation timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")
  • Address creation timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59")
  • Number of records in the response
  • Page number
  • Records order ascending or descending
merchant_incoming_payments
  • str currency
  • str / none payment_address
  • str / none txid
  • str / none from_timestamp
  • str / none to_timestamp
  • int / none limit
  • int / none page
  • str / none order
  • Enum: [btc]
  • Timestamp in UTC
  • Timestamp in UTC
  • Min:1, Max:200
  • Min:1
  • Enum: [asc, desc]
  • Currency
  • Show only payments to specific payment address
  • Show only payments with specific transaction
  • Payment timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")
  • Payment timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59")
  • Number of records in the response
  • Page number
  • Records order ascending or descending
merchant_withdrawals
  • str currency
  • str / none from_timestamp
  • str / none to_timestamp
  • int / none limit
  • int / none page
  • str / none order
  • Enum: [btc]
  • Timestamp in UTC
  • Timestamp in UTC
  • Min:1, Max:200
  • Min:1
  • Enum: [asc, desc]
  • Currency
  • Withdrawal timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")
  • Withdrawal timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59")
  • Number of records in the response
  • Page number
  • Records order ascending or descending
payment_address_callbacks
  • str currency
  • str payment_address
  • str / none txid
  • str / none from_timestamp
  • str / none to_timestamp
  • int / none limit
  • int / none page
  • str / none order
  • Enum: [btc]
  • Timestamp in UTC
  • Timestamp in UTC
  • Min:1, Max:200
  • Min:1
  • Enum: [asc, desc]
  • Currency
  • Payment address
  • Show only payment callbacks with specific transaction
  • Callback timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")
  • Callback timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59")
  • Number of records in the response
  • Page number
  • Records order ascending or descending
payment_address_state
  • str currency
  • str payment_address
  • Enum: [btc]
  • Currency
  • Payment address

Transfer API

Getting Started:

from greencryptopay_py import Api

# Transfer API
transfer_api = Api.transfer()

# Transfer API testnet
transfer_api = Api.transfer(True)

# Sign up
if not merchant_id or not secret_key:
    data = transfer_api.merchant('percent', 'https://example.com/callback')
    merchant_id = data['merchant_id']
    secret_key = data['secret_key']

transfer_api.set_merchant_id(merchant_id)
transfer_api.set_secret_key(secret_key)

Sign up:

Name Parameters Validation Description
merchant
  • str fee_type
  • str callback_url
  • Enum: [percent, fix]
  • Max: 200
  • Fee type
  • URL to send notifications about payments

Operations:

Name Parameters Validation Description
payment_address
  • str currency
  • str recipientAddress
  • str fee_type
  • str callback_url
  • str orderId
  • str currencyFrom
  • str amountFrom
  • Enum: [btc]
  • Enum: [percent, fix]
  • Max:200
  • Max:50
  • Enum: [usd, rub, try, eur, zar, gbp, uah, aud, brl, pln]
  • Currency
  • Recipient address
  • Fee type
  • URL to send notifications about payments
  • Order identifier in your system
  • Currency to convert from
  • Amount to convert

Stats:

Name Parameters Validation Description
payment_address_state
  • str currency
  • str payment_address
  • Enum: [btc]
  • Currency
  • Show only payments to specific payment address
payment_address_payments
  • str currency
  • str payment_address
  • str / none txid
  • str / none from_timestamp
  • str / none to_timestamp
  • int / none limit
  • int / none page
  • str / none order
  • Enum: [btc]
  • Timestamp in UTC
  • Timestamp in UTC
  • Min:1, Max:200
  • Min:1
  • Enum: [asc, desc]
  • Currency
  • Payment address
  • Show only specific transaction payments
  • Payment timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")
  • Payment timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59")
  • Number of records in the response
  • Page number
  • Records order ascending or descending
payment_address_callbacks
  • str currency
  • str payment_address
  • str / none txid
  • str / none from_timestamp
  • str / none to_timestamp
  • int / none limit
  • int / none page
  • str / none order
  • Enum: [btc]
  • Timestamp in UTC
  • Timestamp in UTC
  • Min:1, Max:200
  • Min:1
  • Enum: [asc, desc]
  • Currency
  • Payment address
  • Show only payment callbacks with specific transaction
  • Payment timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")
  • Payment timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59")
  • Number of records in the response
  • Page number
  • Records order ascending or descending
merchant_state
  • str currency
  • Enum: [btc]
  • Currency
merchant_payment_address
  • str currency
  • str / none from_timestamp
  • str / none to_timestamp
  • int / none limit
  • int / none page
  • str / none order
  • Enum: [btc]
  • Timestamp in UTC
  • Timestamp in UTC
  • Min:1, Max:200
  • Min:1
  • Enum: [asc, desc]
  • Currency
  • Address creation timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")
  • Address creation timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59")
  • Number of records in the response
  • Page number
  • Records order ascending or descending
merchant_payments
  • str currency
  • str / none txid
  • str / none from_timestamp
  • str / none to_timestamp
  • int / none limit
  • int / none page
  • str / none order
  • Enum: [btc]
  • Timestamp in UTC
  • Timestamp in UTC
  • Min:1, Max:200
  • Min:1
  • Enum: [asc, desc]
  • Currency
  • Show only specific transaction payments
  • Payment timestamp in UTC, from (inclusive, ex. "2035-12-31T15:30:59")
  • Payment timestamp in UTC, to (inclusive, ex. "2035-12-31T15:30:59")
  • Number of records in the response
  • Page number
  • Records order ascending or descending

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greencryptopay_py-1.0.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

greencryptopay_py-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file greencryptopay_py-1.0.0.tar.gz.

File metadata

  • Download URL: greencryptopay_py-1.0.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for greencryptopay_py-1.0.0.tar.gz
Algorithm Hash digest
SHA256 83b5b7b7bc3569fa5f3341bd535134668aba03a4e0cc185119c35a22ace41ee1
MD5 d10c2cf3b23cc6f617e0632be52253ea
BLAKE2b-256 36b5c03bff359235b8521e6183fa7524ce3c614c7f59c2011af439a41d6d852a

See more details on using hashes here.

File details

Details for the file greencryptopay_py-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for greencryptopay_py-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d8d256bc0d50ce3b4085af267c77270aa2447c616fd02aa165f8c90628d2be2
MD5 e611528ce8b94ac42a3f011899c0163d
BLAKE2b-256 34df3f40e4e24bc9333efa615c350286e4c998f61db0fa6cfcb501649261824b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page