TUTO FOR SUMUP API || POSTMAN || FR

3 min read 4 hours ago
Published on Nov 27, 2024 This response is partially generated with the help of AI. It may contain inaccuracies.

Table of Contents

Introduction

This tutorial will guide you through using the SumUp API with Postman, ideal for both beginners and experienced developers. You will learn how to create an API key, set up Postman, and execute various API requests, including processing payments and handling refunds.

Step 1: Create an API Key

  1. Sign in to your SumUp account.
  2. Navigate to the API settings section.
  3. Generate a new API key.
  4. Save your API key securely, as you will need it for authentication in Postman.

Step 2: Install Postman

  1. Go to the Postman website and download the application for your operating system.
  2. Install Postman following the on-screen instructions.

Step 3: Initialize Postman

  1. Open Postman.
  2. Create a new workspace by clicking on "Workspaces" and selecting "Create Workspace."
  3. Name your workspace and set visibility settings (Private or Team).
  4. Click on "Create Workspace."

Step 4: Set Up the SumUp API in Postman

  1. Import the collection provided by the tutorial using this link.
  2. Go to the "Authorization" tab and select "Bearer Token."
  3. Enter your API key in the token field.
  4. Save the changes.

Step 5: Understanding API Requests

  1. Familiarize yourself with different types of requests (GET, POST, etc.).
  2. Review the API documentation for endpoints available for payments, refunds, and other functionalities.
  3. Prepare your payload, which contains necessary information for the requests.

Step 6: Execute a Payment Request

  1. Select the payment endpoint from the imported collection.
  2. Fill in the required fields in the request body, such as:
    • amount: The amount to be charged.
    • currency: The currency in which the charge is made.
    • redirect_url: The URL to redirect the user after authentication.
  3. Click on "Send" to execute the request.
  4. Check the response and ensure the payment is processed successfully.

Step 7: Handle Refunds

  1. Select the refund endpoint in your Postman collection.
  2. Input the necessary details for the refund request in the body.
    • Include the transaction ID for the payment you wish to refund.
  3. Click "Send" to process the refund.
  4. Verify the response to confirm the refund was successful.

Step 8: Explore the SumUp Widget

  1. Review the widget integration options provided by SumUp.
  2. Follow the documentation to implement the widget on your website or application.

Conclusion

You have now learned how to set up and use the SumUp API with Postman, including creating an API key, executing payment requests, and handling refunds. For further exploration, consider implementing the SumUp widget and diving deeper into the API documentation. Keep practicing, and don't hesitate to reach out for additional resources or support!