Indacoin v1.0.2 Indacoin View Source
An Elixir interface to the Indacoin API.
List Of Requests Params
- cur_from :: string – Currency code which defines the currency in which customer wish to do the payment;
used to define price parameter. Possible values:
USD
,EURO
,RUB
. - cur_in :: string
^^^
- cur_to :: string – Cryptocurrency code which defines the currency in which customer wish to receive payouts. Currency conversions are done at Indacoin. Full list of supported cryptocurrencies
- cur_out :: string
^^^
- amount :: decimal – The price set by the customer. Example:
299.99
The minimum transaction limit is50 USD/EUR
. The maximum transaction limit is3000 USD/EUR
. - amount_in :: decimal
^^^
- address :: string – Wallet address for receiving payouts.
- target_address :: string
^^^
- partner :: string – Indacoin Affiliate Program member.
- user_id :: string – Customer custom ID. Using a unique value or email is strongly recommended.
Transaction Statuses
- NotFound
- Chargeback
- Declined
- Cancelled
- Failed
- Draft
- Paid
- Verification
- FundsSent
- Finished
Link to this section Summary
Functions
Fetches Indacoin API host from the application config
Retrieves a list of all available coins sorted by ticker
Generates a callback signature for incoming Indacoin requests
Drafts payment transaction and returns its ID
Generates a link that forwards a user directly to the payment form without creating transaction via API
Fetches Indacoin API key (a partner name) from the application config
Fetches Indacoin API secret key from the application config
Retrieves transaction info by its id
Generates a link that forwards a user to the payment form.
To create the request you need to get transaction ID via create_transaction/1
method
Gets value of amount that customer will get once payment transaction finished
Retrieves a list of transactions
Indacoin will send a callback to your application’s exposed URL when a customer makes a payment
Link to this section Functions
Fetches Indacoin API host from the application config.
Retrieves a list of all available coins sorted by ticker.
Generates a callback signature for incoming Indacoin requests.
params
Required params:
- indacoin_nonce :: integer
- user_id :: string
- tx_id :: integer
Drafts payment transaction and returns its ID.
Signed API request.
params
Required request params:
- user_id :: string
- cur_in :: string
- cur_out :: string
- target_address :: string
- amount_in :: decimal
Generates a link that forwards a user directly to the payment form without creating transaction via API.
params
Required request params:
- cur_from :: string
- cur_to :: string
- amount :: decimal
- address :: string
- partner :: string
Optional request params:
- user_id :: string
Fetches Indacoin API key (a partner name) from the application config.
Fetches Indacoin API secret key from the application config.
Retrieves transaction info by its id.
Signed API request.
Generates a link that forwards a user to the payment form.
To create the request you need to get transaction ID via create_transaction/1
method.
Signed API request.
params
Required request params:
- transaction_id :: integer
Gets value of amount that customer will get once payment transaction finished.
params
Required request params:
- cur_from :: string
- cur_to :: string
- amount :: decimal
Optional request params:
- partner :: string
- user_id :: string
false
Retrieves a list of transactions.
Signed API request.
Paging Through Results Using Offset and Limit
limit=10
-> Returns the first 10 records.offset=5&limit=5
-> Returns records 6..10.offset=10
-> Returns records 11..61 (the default number of the returned records is 50).
params
All params are optional:
- user_id :: string
- tx_id :: string
- status :: string
- created_at :: integer / timestamp
- hash :: string
- cur_in :: string
- cur_out :: string
- amount_in :: decimal
- amount_out :: decimal
- target_address :: string
- limit :: integer
- offset :: integer
Indacoin will send a callback to your application’s exposed URL when a customer makes a payment.
While testing, you can accept all incoming callbacks, but in production, you’ll need to verify the authenticity of incoming requests.
params
Required request params:
- indacoin_signature :: string
- indacoin_nonce :: integer
- user_id :: string
- tx_id :: integer