API
  • Introduction
  • Authentication
  • Error Handling
  • API ENDPOINTS
    • Payment
    • Invoices
      • Create Invoice
      • Re-send Invoice
      • Get Invoice - customerEmail
      • Get Invoice - invoiceNo
      • Get Invoice - orderNo
    • Payment Link
      • Create Link
      • Get Link
      • Update Link
      • Delete Link
    • Charge Token
      • Create Token
      • Get Token
      • Charge Token
      • Bulk Charge
      • Query Bulk Charge with BacthId
    • Subscriptions
      • Create Subscription
      • Charge Subscription
      • Get Customer Subscription
      • Update Customer Subscription
      • Get Merchant Subscription
    • Virtual Account
      • Create Virtual Account
      • Get Virtual Account
      • Delete Virtual Account
      • Get Payment
    • Pay with Transfer
    • Pay with USSD
    • Mobile Money Payments
    • Bank Account Payments
    • Card Payment
      • Initializing a Card Payment
      • Scenario 1 (Verve Card Type)
      • Scenario 2 (Master Card and Visa Card Type)
      • Scenario 3
Powered by GitBook
On this page
  1. API ENDPOINTS
  2. Subscriptions

Create Subscription

You can create a plan by calling the Create Plan endpoint or you can do this directly from the SeerBit Merchant Dashboard

/recurrent/plan/create

POST https://merchants.seerbitapi.com/api/v1/recurrent/plan/create

Headers

Name
Type
Description

Authorization

String

Bearer Token

Request Body

Name
Type
Description

publicKey*

String

This is the merchant public key.

amount*

String

This is the amount to be paid.

email*

String

This is the email of the customer.

country*

String

This is the country from which the transaction is been carried out from

paymentReference*

String

This is the unique identifier for a transaction, to be generated by merchant.

planId

String

the planId represents a product of the merchant that the customer wants to pay for e.g DSTV bouqet.

CardNumber*

String

this is the name of the cardholder

expiryYear*

String

this is the card's expiry year

expiryMonth*

String

this is the card's expiry month

cvv*

String

this is the 3 digit code behind the debit card

productDescription*

String

this is the product description supplied by the merchant

billingCycle*

String

this is the rate of reoccurrence of the charge to the tokenized card

subscriptionAmount*

boolean

this is passed as true if the subscription amount is to be charged at the point of creating subscription. It is passed as false if the default amount of SeerBit is to be charged at the point of creating subscription.

mobileNumber*

String

customer's number

customerId

String

billingPeriod*

String

this is the number of times seerBit will do a recurrent billing

redirectUrl*

String

this is returned when the payment link service is called

curl --location 'https://merchants.seerbitapi.com/api/v1/recurrent/plan/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer Token\
--data '{
    "productId": "<Plan name>",
    "productDescription": "<Description of Plan>",
    "amount": "100",
    "billingCycle": "HOURLY",
    "limit": 5,
    "publicKey": "<public key>",
    "country": "NG",
    "currency": "NGN",
    "allowPartialDebit": false
}'
{
    "payload": {
        "country": "NG",
        "createdAt": 1715607343498,
        "amount": 100,
        "productId": "<Plan name>",
        "billingCycle": "HOURLY",
        "currency": "NGN",
        "payUrl": "https://pay.seerbitapi.com/db1ea861993689a57dac",
        "details": {
            "country": "NG",
            "amount": 100,
            "productId": "<Plan name>",
            "allowPartialDebit": false,
            "payLinkUrl": "https://pay.seerbitapi.com/db1ea861993689a57dac",
            "publicKey": "<public key>",
            "createdAt": 1715607343498,
            "trialDuration": 0,
            "trialPeriod": false,
            "billingCycle": "HOURLY",
            "limit": 5,
            "planId": "db1ea861993689a57dac",
            "currency": "NGN",
            "id": 20031,
            "productDescription": "<description of plan>",
            "updatedAt": null,
            "status": "ACTIVE"
        },
        "publicKey": "<public key>",
        "plan": "db1ea861993689a57dac",
        "productDescription": "<description of plan>"
    },
    "message": "Successful",
    "status": "SUCCESS",
    "responseCode": "00"
}
{
  "message": "Invalid Authentication Token",
  "error": "INPUT"
}
{
"message": "Bad Request",
"error": "There has been a problem with reading or understanding the request."
}
PreviousSubscriptionsNextCharge Subscription

Last updated 8 months ago