Building a Public App

Build, connect, and extend your store’s capabilities in no time with Recurpay.

How public app integration works with Recurpay ?

Public app, as the name suggests, is a type of app integration available to all merchants publicly. Once the app is approved by Recurpay, merchants can activate/deactivate it immediately from their Recurpay dashboard.

Building a public app integration with Recurpay happens in a few easy steps:

  1. Register as a partner with Recurpay - Fill a simple form with basic details about your application.
  2. Recurpay will review your submission - Our team will analyze the integration's potential benefits for merchants.
  3. Receive partner credentials - Once approved, you'll receive your partner credentials(client_key and client_secret) via the email provided during registration.
  4. Create an app using the Partner App documentation - Follow the guide here - Partner Apps
  5. Install Recurpay on your Shopify development store - Reach out to us at [email protected] and share your store URL so we can activate the app for testing on your specific store.
  6. As soon as any store installs your app, Recurpay will send the store ID on the callback URL provided in Step 1. The format of the request body will be like this:

When a store activates your app:

{
  "store_id": 26000,
  "store_name": "Store name",
  "store_url": "https://their-store.recurpay.com",
  "scope": "read-subscriptions, write-subscriptions",
  "active": true,
  "associated_user": {
    "id": 15000,
    "first_name": "Tony",
    "last_name": "Stark",
    "email": "[email protected]",
    "email_verified": true,
    "account_owner": true
  }
}

When a store deactivates your app:

{
  "store_id": 26000,
  "store_name": "Store name",
  "store_url": "https://their-store.recurpay.com",
  "active": false,
  "associated_user": {
    "id": 15000,
    "first_name": "Tony",
    "last_name": "Stark",
    "email": "[email protected]",
    "email_verified": true,
    "account_owner": true
  }
}
  1. Recurpay sends the HMAC in the header to validate the origin of your callback URL to ensure it is coming from Recurpay.
  2. If you just want to validate, then you can make the call yourself. Callback includes a base64-encoded X-Recurpay-HMAC-Signature field in the payload header, which is generated using the app's client secret along with the data sent in the request.
  3. Use the store_id sent by Recurpay to fetch the access token for that store using our GET Access Token API. This token can be used to fetch data for a specific store restricted to the scopes added while creating the app.
  4. Register for webhooks of the store using Register webhook API if there is a use case on your app to fetch subscription events in real time.
  5. Once you are done with development, let us know by dropping a mail at [email protected] and we will review the app functioning.
  6. Recurpay will approve your app, and it will be available to all merchants on their Recurpay dashboard.
  7. Recurpay will send the store details (Store ID will be sent on the callback URL) as and when they activate your app on their store. Once received, repeat step 7.

📘

Feel free to reach out to us

Via Live chat or write us at [email protected] if you need any help anytime.