GoCardless
The Zephr GoCardless extension synchronizes subscription changes from GoCardless with Zephr by implementing a webhook listener.
The extension currently expects users to have been imported to Zephr with a foreign key ID of
gocardless
and a foreign key value of the customer's GoCardless Customer ID.
Behavior
Upon being activated, the extension will register a HTTP listener at the following address:
/plugins/public/gocardless/webhooks
The extension will only respond to webhooks issued from GoCardless where the value of the
resource_type
key in the webhook body is
subscriptions
.
Webhooks from GoCardless also have an
action
attribute. Depending on the value of the
action
attribute, the extension will attempt the following:
createdandresumedactions: issue the user a grant for the corresponding Zephr product.paused,cancelledandfinishedactions: revoke any existing grant for the corresponding Zephr product.amended,customer_approval_granted,customer_approval_deniedandpayment_createdactions: there is currently no behavior implemented for these actions.
Configuration
To enable the GoCardless Extension within Zephr, navigate to . If you cannot see the GoCardless option in your list of Extensions, email support@zephr.com.
Once on the configuration screen, you’ll see two sections – API Configuration and GoCardless <> Zephr mapping.
API Configuration
Within the API Configuration section you’ll need to provide an Access Token and API Version. These details should be available in your GoCardless account.
If you would like to test the operation of the extension with webhooks from a GoCardless sandbox, please check the option for ‘Sandbox API mode’.
The ‘Webhook Endpoint Secret’ value is set when you create the webhook endpoint configuration in GoCardless.
Once these details have been added, click Done.
GoCardless <> Zephr mapping
Here is an example mapping:
{
"PL000019FCMP25":"bronze",
"PL000019FB3CMQ":"silver",
"PL000019FA94ZG":"gold"
}
Once added, click Done.
Activate Plugin
Once you’ve added the relevant details, confirm which of your Sites the extension should be active on. To do this, use the toggles for each site under the Activate Plugin section, or choose Select All Sites.
Once completed, click Save. Your extension is now enabled and will listen for subscription notifications from GoCardless.