Architecture
The sequence below shows how Shopify, your app, and Accelebit interact during a checkout.Prerequisites
Before you start, make sure you have:- An Accelebit account with API keys
- A Shopify Partner account
- A Shopify app configured as a Payments App
- An HTTPS server to host your app
Create the Shopify app and configure endpoints
Set up your Shopify app with the Payments App extension. Register the following endpoints in your app configuration:
| Endpoint | Purpose |
|---|---|
POST /payments/session | Receives payment sessions from Shopify |
POST /payments/session/resolve | Called by your background worker to resolve sessions |
POST /payments/refund | Handles refund requests from Shopify |
Handle payment sessions
When a customer checks out, Shopify sends a payment session to your app. Extract the card and billing details from the session and forward them to Accelebit. Resolve or reject the Shopify session based on the result.
Handle 3DS callbacks
When 3DS completes, Accelebit redirects the customer back to your
returnUrl. Look up the payment by merchant reference, then resolve or reject the Shopify session accordingly.Handle refunds
When a merchant issues a refund from the Shopify admin, Shopify sends a refund request to your app. Forward the refund to Accelebit using the stored transaction ID.
Configure webhooks in the Accelebit Dashboard
Set up an Accelebit webhook endpoint so your app receives real-time payment status updates. This keeps Shopify order statuses accurate even if the customer closes their browser during the 3DS challenge.In the Accelebit Dashboard, add a webhook URL pointing to your app:Subscribe to the following events:
payment.capturedpayment.failedrefund.created
Testing
Before going live, verify your integration end-to-end:- Use your Accelebit test secret key (
smtgw_sk_test_...). - Use a Shopify development store.
- Use card number
4111111111111111—this processes successfully in test mode. - Issue a refund from the Shopify admin and confirm it processes through Accelebit.