Try out APIs
Set up your merchant account
Sign up or sign in to Postman.
Open our Postman collection and switch to the "Variables" tab. Update the value under the "current value" column for the
baseUrl
variable to have the hostname and port of the locally running server (http://localhost:8080
by default).While on the "Variables" tab, add the admin API key you configured in the application configuration under the "current value" column for the
admin_api_key
variable.If you're running Docker Compose, you can find the configuration file at
config/docker_compose.toml
, search foradmin_api_key
to find the admin API key.If you set up the dependencies locally, you can find the configuration file at
config/development.toml
, search foradmin_api_key
to find the admin API key
Open the "Quick Start" folder in the collection.
Open the "Merchant Account - Create" request, switch to the "Body" tab and update any request parameters as required.
If you want to use a different connector for making payments with than the provided default, update the
data
field present in therouting_algorithm
field to your liking.
Click on the "Send" button to create a merchant account (You may need to "create a fork" to fork this collection to your own workspace to send a request). You should obtain a response containing most of the data included in the request, along with some additional fields. Store the merchant ID and publishable key returned in the response.
Create an API key
Open the "API Key - Create" request, switch to the "Body" tab and update any request parameters as required. Click on the "Send" button to create an API key. You should obtain a response containing the data included in the request, along with the plaintext API key. Store the API key returned in the response securely.
Set up a payment connector account
Sign up on the payment connector's (say Stripe, Adyen, etc.) dashboard and store your connector API key (and any other necessary secrets) securely.
Open the "Payment Connector - Create" request, switch to the "Body" tab and update any request parameters as required.
Pay special attention to the
connector_name
andconnector_account_details
fields and update them. You can find connector-specific details to be included in this spreadsheet.Open the "Variables" tab in the Postman collection and set the
connector_api_key
variable to your connector's API key.
Click on the "Send" button to create a payment connector account. You should obtain a response containing most of the data included in the request, along with some additional fields.
Follow the above steps if you'd like to add more payment connector accounts.
Create a Payment
Ensure that you have set up your merchant account and set up at least one payment connector account before trying to create a payment.
Open the "Payments - Create" request, switch to the "Body" tab and update any request parameters as required. Click on the "Send" button to create a payment. If all goes well and you had provided the correct connector credentials, the payment should be created successfully. You should see the
status
field of the response body having a value ofsucceeded
in this case.If the
status
of the payment created wasrequires_confirmation
, setconfirm
totrue
in the request body and send the request again.
Open the "Payments - Retrieve" request and click on the "Send" button (without modifying anything). This should return the payment object for the payment created in Step 2.
Create a Refund
Open the "Refunds - Create" request in the "Quick Start" folder folder and switch to the "Body" tab. Update the amount to be refunded, if required, and click on the "Send" button. This should create a refund against the last payment made for the specified amount. Check the
status
field of the response body to verify that the refund hasn't failed.Open the "Refunds - Retrieve" request and switch to the "Params" tab. Set the
id
path variable in the "Path Variables" table to therefund_id
value returned in the response during the previous step. This should return the refund object for the refund created in the previous step.
That's it! Hope you got a hang of our APIs. To explore more of our APIs, please check the remaining folders in the Postman collection.
Last updated
Was this helpful?