Developer Documentation
Connect your existing payment provider to RetainPay’s automated payment recovery.
Integration reference · 29 provider integrations · Reviewed 14 November 2026
Connections & Access
Merchants sign in and enter credentials directly in Settings. Partners can invite a merchant without collecting their keys. Separate test and live credentials; never submit secrets by email, in URLs, or in public examples.
Provider OAuth and a public Shopify app install are not currently available in RetainPay. The present connection path uses merchant-entered credentials. Provider permissions and sandbox validation are required before live collection.
| Provider | Current Credential Fields |
|---|---|
| Stripe | Restricted key · Webhook signing secret |
| GoCardless | Access token · Webhook secret |
| Adyen | API key · Merchant account · HMAC key · Live URL prefix (live only) |
| Worldpay | API username · API password · Merchant entity · Webhook secret |
| Shopify | Shop domain · Admin API token with subscription access · App webhook signing secret |
| WooCommerce | Store domain · Consumer key:consumer secret · Webhook secret |
| Chargebee | Site name · API key · Webhook Basic auth user:password |
| Recurly | Site reference · Private API key · Webhook signing secret |
| Paddle | Account reference · API key · Webhook secret |
| Zuora | Account reference · OAuth access token · Callout Basic auth password |
| Maxio | Subdomain · API key · Webhook HMAC secret |
| Stripe Billing | Account ID · Restricted API key · Webhook secret |
| Stripe Connect | Platform account ID · Platform API key · Connected-account webhook secret |
| Adyen for Platforms | Account reference · API key · HMAC key |
| Mercado Pago | Mercado Pago user ID · Access token · Webhook secret signature |
| Pix Automático | Bank/PSP Pix API host · client_id:client_secret · Webhook URL token |
| Mollie | Mollie profile ID · Live or test API key · Webhook URL token |
| Checkout.com | Processing channel ID · Secret key · Webhook signature key |
| Braintree (PayPal) | Merchant ID · public_key:private_key · public_key:private_key (verifies webhooks) |
| Worldline | PSPID · apiKeyId:secretApiKey · Webhook secret key |
| Paystack | Paystack integration ID · Secret key · Secret key (signs webhooks) |
| Flutterwave | Flutterwave account ID · Secret key · Secret hash |
| Yoco (reporting only) | Yoco business ID · Secret key · Webhook signing secret (whsec_) |
| Razorpay | Razorpay account ID · key_id:key_secret · Webhook secret |
| Xendit | Xendit business ID · Secret API key · Webhook verification token |
| PortOne | Store ID · V2 API secret · Webhook secret (whsec_) |
| PAY.JP | PAY.JP account ID · Secret key · Webhook token |
| Tap Payments | Tap merchant ID · Secret key · Secret key (signs webhooks) |
| dLocal | dLocal merchant ID · x_login:x_trans_key:secret_key · Secret key (signs notifications) |
Zuora currently expects an OAuth bearer access token rather than a client ID/secret exchange — paste the token your Zuora tenant issues. For Paddle and WooCommerce, RetainPay asks the provider to collect again through its own flow (Paddle’s renewal nudge, WooCommerce’s order-state update), so the final outcome depends on your store’s settings and the customer. Before going live, run one test recovery in your provider’s sandbox so you can see exactly how a recovered payment appears in your own records.
Webhook Setup
Copy the endpoint shown in your merchant Settings, configure it in your provider, and enter its verification secret. The account reference identifies the connection; it does not authenticate a message.
| Provider Family | Endpoint On retainpay.online |
|---|---|
| Adyen | /api/public/adyen-notifications |
| Stripe | /api/public/stripe-events |
| Worldpay | /api/public/worldpay-events |
| Direct Debit | Use the GoCardless endpoint shown in Settings. |
| Chargebee / Recurly / Paddle | /api/public/chargebee-events?site=YOUR_SITE /api/public/recurly-events?site=YOUR_SITE /api/public/paddle-events?site=YOUR_SITE |
| Other Billing / Platforms | /api/public/platform-events/PROVIDER?site=YOUR_ACCOUNT |
Platform identifiers: zuora, maxio, stripe_billing, stripe_connect, adyen_platforms, shopify, woocommerce, mercadopago, pix_automatico, mollie, checkout, braintree, worldline, paystack, flutterwave, yoco, razorpay, xendit, portone, payjp, tap, dlocal. Provider-specific payloads are required; there is no generic RetainPay event-ingestion API.
Events & Example
Shopify: subscription_billing_attempts/failure and subscription_billing_attempts/success. Billing invoices: failure and paid/success events. WooCommerce: failed, processing and completed order updates. Adyen: AUTHORISATION notifications.
{
"error_code": "INSUFFICIENT_FUNDS",
"error_message": "Payment declined",
"admin_graphql_api_subscription_contract_id": "gid://shopify/SubscriptionContract/123",
"idempotency_key": "provider-attempt-example"
}Illustrative Shopify failure body only. Headers include X-Shopify-Topic, X-Shopify-Shop-Domain, X-Shopify-Webhook-Id and a valid X-Shopify-Hmac-SHA256. This unsigned example cannot trigger recovery.
Card Failure Message
{
"notificationItems": [
{
"NotificationRequestItem": {
"eventCode": "AUTHORISATION",
"success": "false",
"pspReference": "EXAMPLE_CARD_001",
"merchantAccountCode": "YOUR_ACCOUNT",
"merchantReference": "EXAMPLE_ORDER",
"amount": {
"value": 4000,
"currency": "GBP"
},
"reason": "Not enough balance"
}
}
]
}Illustrative Adyen card failure. A valid provider signature is required; this unsigned example cannot trigger recovery.
Direct Debit Failure Message
{
"events": [
{
"id": "EXAMPLE_DD_EVENT",
"resource_type": "payments",
"action": "failed",
"links": {
"payment": "EXAMPLE_PAYMENT"
},
"details": {
"cause": "insufficient_funds",
"description": "The payer has insufficient funds"
}
}
]
}Illustrative GoCardless event. The bank payment reference supplies the payment details; a valid Webhook-Signature is required.
Verification
Shopify and WooCommerce verify Base64 HMAC-SHA256 against the raw body. Paddle verifies its timestamped signature with a five-minute tolerance. Other providers use their adapter-specific HMAC or configured Basic authentication. Do not change the body before signing it.
Retries & Duplicate Protection
Hard declines cannot be retried. Payment state, ownership, attempt limits and scheduling constraints take precedence over suggested timing. The standard card policy caps attempts at two and retry delay at 72 hours; it preserves the minimum gap and off-peak checks.
Direct Debit has its own policy: first re-presentation after three working days, then a final attempt five working days later, submitted before 09:00 UTC. The card 72-hour timing rule does not apply to that schedule.
Retry workers claim a payment before collection, and supported providers receive stable per-attempt duplicate-protection keys. An accepted collection request is not counted as recovered until the provider confirms it. Repeated webhook deliveries are recognised per provider, so the same event is never processed twice.
Local Payment Rules
Two markets add rules on top of the standard card policy. The retry engine checks both before a charge is attempted.
- India (Razorpay): the first retry waits at least 24 hours for the RBI pre-debit notice. Payments above ₹15,000 are not retried automatically.
- South Korea (PortOne): retries use the stored billing key only. No card details are handled.
Shopify API Usage & Busy Periods
Receiving a Shopify webhook makes zero Shopify Admin API calls. An eligible Shopify collection request makes one GraphQL mutation, subscriptionBillingAttemptCreate. No continuous Shopify polling is performed by this adapter.
Shopify applies GraphQL cost limits per app and store. A throttled response is deferred rather than counted as a failed payment attempt; the same attempt key is retained. Payment-policy checks still run before the later attempt. Requests are processed in sequence within each batch, respecting your store’s API allowance.
Before peak trading, run a test recovery using your store’s permissions and sandbox events. Capacity depends on Shopify’s limits for your store. Some Shopify failure messages do not include an amount or currency; check the payment in Shopify before using those records in financial reporting.
Shopify’s Official API LimitsSandbox & Local Payment Methods
Book a demonstration at retainpay.online/demo. Private Merchant and Partner sandboxes use one-time sign-in links and clearly labelled simulated payments; no real charge is made by a walkthrough.
Sandboxes are available in English, Spanish and Portuguese, with local number and date formatting.
Mercado Pago and Pix Automático are available. Mercado Pago card payments are retried with the saved card; Mercado Pago subscriptions are retried by Mercado Pago and monitored by RetainPay. Pix Automático retries are requested through the merchant’s Brazilian bank or PSP and only where the customer’s authorisation permits them. One-off Pix payments are not retried.
Technical Support
support@retainpay.online · partners@retainpay.online
Most queries are answered within one business day. Share provider, environment, event ID and timestamp, never API keys or customer payment details. Partner API tokens and private provisioning contracts remain behind sign-in; contact the team for the integration guide.