Create plan

A comprehensive testing strategy is crucial to ensure the successful integration of SmartpayGenie into your application. Here are some key testing types:

Create a plan

'POST'

Request parameters

Parameters

Type

Description

Required

plan_id

String

Unique identifier of the plan

Yes

customer_id

String

Unique identifier of the customer

Yes

payment_method_id

Object

Unique identifier of the payment method

Yes

metadata

Object

Additional metadata (optional)

Yes

Request Payload

JSON

{
  "plan_id": "plan_id_1",
  "customer_id": "customer_id_1",
  "payment_method_id": "method_id_1"
}

Response

Success Icon

200 - OK successful response

[
  {
    "id": "subscription_id",
    "plan_id": "plan_id",
    "customer_id": "customer_id",
    "status": "active",
    "start_date": "2023-11-22T13:37:20Z",
    "next_billing_date": "2023-12-22T13:37:20Z",
    "metadata": {}
  }
]
Error Icon

Note:

  • You may need to implement pagination for large datasets.
  • Consider adding filtering and sorting options to the endpoint for better flexibility.
  • Implement appropriate security measures to protect transactions data.

Support

If you encounter any issues or have questions, please feel free to contact our dedicated

support team.

We are committed to providing you with the best possible experience and support.