Welcome to the Iniciador Elixir SDK! This tool is made for Elixir developers who want to easily integrate with our API.
If you have no idea what Iniciador is, check out our website
The Iniciador SDK is a Elixir library that provides a convenient way to interact with the Iniciador API.
The package can be installed by adding iniciador
to your list of dependencies in mix.exs
:
def deps do
[
{:iniciador, "~> 0.1.0"}
]
end
Set your credentials in your config/config.exs
:
import Config
config :iniciador,
client_id: "client_id",
client_secret: "client_secret",
env: :dev # it can be :dev | :stag | :sandbox | :prod
To authenticate with the Iniciador Whitelabel, use the Iniciador.Auth.auth_interface
method:
{:ok,%Iniciador.AccessToken{interface_url: interface_url, access_token: access_token, payment_id: payment_id}} = Iniciador.Auth.auth_interface(%{})
- Use
interface_url
to complete the payment flow
To use payments services with the Iniciador Whitelabel, use the Payment
module:
To get the payment details use get
method
{:ok, payment} = Iniciador.Payment.get(access_token)
to get the payment status details use status
method
{:ok, payment_status} = Iniciador.Payment.status(access_token)
To authenticate with the Iniciador API, use the auth
method:
{:ok,%Iniciador.AccessToken{access_token: access_token, payment_id: payment_id}} = Iniciador.Auth.auth()
To get participants with the Iniciador API, use the Participants
module:
{:ok, participants_response} = Iniciador.Participants.list(access_token, %{limit: 50})
To use payments services with the Iniciador API, use the Payment
module:
To send the payment for processing use send
method
{:ok, payment} = Iniciador.Payment.send(access_token)
To get the payment details use get
method
{:ok, payment} = Iniciador.Payment.get(access_token)
to get the payment status details use status
method
{:ok, payment_status} = Iniciador.Payment.status(access_token)
If you have any questions or need assistance regarding our SDK, please don't hesitate to reach out to us. Our dedicated support team is here to help you integrate with us as quickly as possible. We strive to provide prompt responses and excellent support.
We also highly appreciate any feedback you may have. Your thoughts and suggestions are valuable to us as we continuously improve our SDK and services. We welcome your input and encourage you to share your thoughts with us.
Feel free to contact us by sending an email to [email protected]. We look forward to hearing from you and assisting you with your integration.