Skip to content

Latest commit

 

History

History
78 lines (65 loc) · 3.9 KB

try_sandbox.md

File metadata and controls

78 lines (65 loc) · 3.9 KB

Try out hyperswitch sandbox environment

Table Of Contents:

Set up your accounts

  1. Sign up on the payment connector's (say Stripe, Adyen, etc.) dashboard and store your connector API key (and any other necessary secrets) securely.
  2. Sign up on our dashboard.
  3. Create a merchant account on our dashboard and generate your API keys. Ensure to save the merchant ID, API key and publishable key displayed on the dashboard securely.
  4. Configure the merchant return URL and the webhooks URL, which will be used on completion of payments and for sending webhooks, respectively.
  5. Create a payments connector account by selecting a payment connector among the options displayed and fill in the connector credentials you obtained in Step 1.
  6. Sign up or sign in to Postman.
  7. Open our Postman collection and switch to the "Variables" tab. Add the API key received in Step 3 under the "current value" column for the api_key variable.

Try out our APIs

Create a payment

  1. Open the "Quick Start" folder in the collection.

  2. 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 of succeeded in this case.

    • If the status of the payment created was requires_confirmation, set confirm to true in the request body and send the request again.
  3. 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

  1. 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.
  2. Open the "Refunds - Retrieve" request and switch to the "Params" tab. Set the id path variable in the "Path Variables" table to the refund_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.