Getting Started

Sections

Create Subscription plan

Outcome: Create a subscription plan that defines the characteristics of periodic subscription deductions per user.


Download the Postman Collection from this link.

Authorization

You should send a valid auth token as a Bearer Token.

You can get a valid auth token by Authentication Request (Generate Auth Token)

Important Notes:

- Please make sure to use the Moto integration ID while creating a subscription plan.

- You need to set the parameter 'webhook_url' while creating the plan request, then you will start receiving the response on the webhook on any action (subscription level only).


Common errors

Wrong frequency

400 Bad Request

JSON
{ "frequency": [ "\"5\" is not a valid choice." ] }

Solution: Make sure to use a valid frequency value from (7, 15, 30, 60, 90, 180, 360).


Header Parameters

Authorizationstring Required

Bearer token authentication. Format: "Token YOUR_SECRET_KEY"

Body Parameters

frequencynumber Required

Specify the frequency of deduction (e.g., Weekly, Biweekly, Monthly, Two months, Quarterly, Half annual, Yearly). Values in numbers are (7, 15, 30, 60, 90, 180, 360).

namestring Required

Name the subscription plan for identification purposes. The maximum number of characters is 200.

webhook_urlstring

You need to enter the unique webhook URL in this parameter

reminder_daysstring

Specify the number of days before which you want to send a notification to the customer to pay (currently supporting email notifications).

retrial_daysstring

Define the days on which the subscription will be attempted again in case of a failure to collect the previous subscription amount.

plan_typestring

The type of subscription plan. It accepts the values (rent) and the default is “rent.”

number_of_deductionsstring

The number of deductions from this subscription. The default value is null.

amount_centsnumber

Specify the subscription amount that will be charged.

use_transaction_amountboolean

If this flag is enabled, the system will use the first transaction amount instead of the specified subscription amount. Otherwise, it will use the subscription amount from the “Amount Cents”. Default value is false

is_activeboolean

Indicates whether the plan will be created, will be active, or will be paused. The default value is true.

integrationnumber Required

MIGS Moto Integration ID, which will be used for upcoming transactions (recurring transactions).

feestring

Response

200
Object
Successful response

Response Attributes

idnumber

Unique identifier for the transaction

frequencynumber
created_atstring

Timestamp when the record was created

updated_atstring

Timestamp when the record was last updated

namestring

Name of the item

reminder_daysstring
retrial_daysstring
plan_typestring
number_of_deductionsstring
amount_centsnumber

Transaction amount in cents

use_transaction_amountboolean
is_activeboolean

Indicates if the subscription is active

webhook_urlstring
integrationnumber
feestring
Was this section helpful?

What made this section unhelpful for you?

Base URL

Production:

Sandbox:

Language Box

POST

/

Select
1

Response

Was this section helpful?

What made this section unhelpful for you?