Overview
Recurrent payments is a way to receive payments by merchant from a client on a regular basis via subscription.
This functionality allows you to create, manage and receive information about a subscription for your client.
For now we allow merchants and their clients to use recurrent payments functionality for ERC-20 (Ethereum, Binance Smart Chain, Polygon blockchains) tokens.
Merchant features:
- Add a subscription form on the site
- Customize your clients subscription: change duration, periodicity and free period options
- Monitor your client payments
- Receive funds directly to merchant’s wallet address
Client features:
- Subscribe for a product/service and pay for it in cryptocurrency
- Get a confirmation that subscription is active and money are received by a merchant
- Cancel the subscription any time you want
Payment by subscription
To regularly transfer funds for provided products/services to a merchant account, the subscription must be created.
To allow a client to subscribe to your service from the <%= config[:env] %> subscription form, there are the following steps to be performed:
- Send API request to create a subscription (POST https://public-gateway.calypso.finance/api/v1/pub/recurrent/create)
- Redirect a browser of a user to the link of the following format: https://public-gateway.calypso.finance/subscription?uuid={linkId}
Example of the create subscription request:
{
"nonce": 0,
"request": {
"amount": 1,
"currency": "USDT",
"depositAddress": "0x45aafbde1243ab39eccea1b4ba0174bc7bd130c7",
"description": "subscription for client 1",
"duration": 60,
"freePeriod": 3,
"name": "Subscription Extra",
"periodicity": 30,
"redirectUrl": "https://google.com/",
"supportUrl": "https://google.com/"
}
}
Further steps to complete payment are performed by a user in the subscription form.
Subscription statuses
Status | Description |
---|---|
CREATED | • A new subscription has been created. • The client has not yet subscribed for your product/service. |
PENDING_ACTIVATION | • The client has subscribed for your product/service and gave allowance for funds withdrawal. • The the incoming payment transaction has not yet been mined in the blockchain. |
ACTIVE | • The subscription is active. • The funds for the the billing period have been received on merchant’s wallet. |
PAUSED | • Not enough funds on the client blockchain address to pay for subscription. • he client has cancelled the allowance for funds permission. |
ARCHIVED | Subscription is deleted by merchant (manually) or the system (after the subscription has ended) |
Diagram nodes indicate subscription statuses, arrows indicate processes of a successful completion of subscription steps or occurring errors.