Skip to main content

Introduction

Let's discover SwayCoin.io API in less than 5 minutes.

How It Works?

To create a payment, a GET request is made to https://api.swaycoin.io with specific parameters (token, action, and amount). The server will then respond a paymentID that identifies the payment request. Users can proceed with the payment by opening a link that includes the paymentID as a parameter. Once the payment is completed, a request from our server is automatically sent to your webhook endpoint, indicating the payment status (paid or canceled).

Short video demonstration

Incoming...

Parameters Explanations

  • token: Your account's identification token. It can be reset if compromised.
  • action: Specifies the action (e.g., createPayment, getPaymentStatus).
  • amount: The amount in USD.

API Token vs Webhook Token

The API Token is provided to the user for API interactions, while the Webhook Token is used by us to authenticate our webhooks to your endpoint.

  • API Token: Used to interact with our API and serves as your identification token for all requests.
  • Webhook Token: Included in HTTPS request parameters to secure your endpoint from identity theft.

What is a "paymentID"?

  • It is the unique identifier associated with your payment request.

    • For Real Payments it is composed of 10 digits (e.g, 0123456789).
    • For Test Payments it is composed of 10 letters (e.g, abcdefghij).
info

A Real Payment refers to a transaction involving actual cryptocurrency, while a Test Payment uses faucets Coins & Tokens on the Sepolia Test Network for simulation purposes.