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

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

Checkout Object

AttributeTypeDescription
line_itemsobjectA list of line item objects, each containing information about an item in the checkout.
customer_idstringIf customer is logged in pass the customer id or pass it as "guest"
note_attributesobjectAttributes to pass additional information in checkout and order.
notestringAdditional note which can be passed as an order note.

Line Items

AttributeTypeDescription
variant_idstringVariant id of the line item that needs to be added.
quantityintegerQuantity of the line item.
propertiesobjectAdditional information which needs to be passed along with the line item on checkout and order.
planobjectDetails 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

AttributeTypeDescription
idstringId 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"}]

AttributeTypeDescription
namestringKey name that needs to be passed as an additional info for specific line item.
valuestringValue 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"}]

AttributeTypeDescription
namestringKey name that needs to be passed as an additional info in order.
valuestringValue of the additional key being passed in the orde

Prefill Email

To prefill email, pass an additional object with key named as "email" and value.

Here is a sample object for reference:

"email": "[email protected]"

Prefill Shipping Address

To prefill shipping address, pass an additional object with key named as "shipping_address" and object value with below fields

Here is a sample object for reference:

"shipping_address": { "first_name": "John", "last_name": "Doe", "phone": "1234567890", "address1": "8201 Huckleberry", "city": "Anchorage", "province": "Alaska", "country": "United States", "zip": "99502" }

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