Redirect on recurpay checkout along with the subscription products.

📘

Using the APIs in production?

While using the APIs in production, you just need to use your URL (example.recurpay.com) as an endpoint instead of staging.recurpay.com as shown in examples.

Request Params

Parameter

Type

Description

checkout

object

Contains cart data that needs to be passed for the checkout creation.

Checkout Object

Attribute

Type

Description

line_items

object

A list of line item objects, each containing information about an item in the checkout.

customer_id

string

If customer is logged in pass the customer id or pass it as "guest"

note_attributes

object

Attributes to pass additional information in checkout and order.

note

string

Additional note which can be passed as an order note.

Line Items

Attribute

Type

Description

variant_id

string

Variant id of the line item that needs to be added.

quantity

integer

Quantity of the line item.

properties

object

Additional information which needs to be passed along with the line item on checkout and order.

plan

object

Details of the plan selected by the customer only applicable for subscription line item.

📘

Plan Object

In the case of a mixed cart where both one-time purchase and subscription product is added on the cart. You don't have to pass any plan details for one-time purchase items while initiating the checkout

Plan

Attribute

Type

Description

id

string

Id of the plan selected by the customer.

Properties

You can capture line item properties to collect customization information for products, such as engraving text, color etc.

Eg: [{"name":"Custom Engraving","value":"Recurpay"}]

Attribute

Type

Description

name

string

Key name that needs to be passed as an additional info for specific line item.

value

string

Value of the additional key being passed on the line item.

Note Attributes

Extra information that is added to the order. Each array entry must contain a hash with name and value keys.

Eg: [{"name":"colour","value":"red"}]

Attribute

Type

Description

name

string

Key name that needs to be passed as an additional info in order.

value

string

Value of the additional key being passed in the order.

Language
Click Try It! to start a request and see the response here!