Integrating Cybersource
1. Contact Cybersource or reach out to Storeganise for an introduction.
2. Connect to your dashboard https://{sub}.cybersource.com/ebc2/ where {sub} is your Cybersource account provided by your Cybersource contact with your credentials
3. Go to Payment Configuration > Key Management
https://{sub}.cybersource.com/ebc2/app/PaymentConfiguration/KeyManagement
Create a REST - Shared secret key, click "+ Generate key", Choose REST - Shared Secret, Click "Generate key" button and note the 2 keys shown:
API KeyID
API SecretKey
4. Go to Payment Configuration > Secure Acceptance Settings
https://{sub}.cybersource.com/ebc2/app/PaymentConfiguration/SecureAcceptanceSettings
Create a Profile, click "+ New Profile"
- General settings:
- Interation methods: Hosted Checkout
- Added Value Services: Payment Tokenization Enabled
- Payment settings:
- Add card types, and for each make sure you select the currency of your business
- Security:
- Click "Create key", note keys Secure Acceptance AccessKey and Secure Acceptance SecretKey
- Customer response:
- Transaction Response Page: "Hosted By You" with URL https://{sg-code}.storeganise.com/api/v1/billing/cybersource/callback where {sg-code} is your Storeganise account
- Custom Redirect After Checkout: set URL https://{sg-code}.storeganise.com/account/billing (this is the default redirect URL and also the cancel URL)
Make sure to click "Promote profile"
5. Once you have the following information, please contact us and we will advise you on the next steps to integrate your Storeganise instance with your Cybersource merchant
MerchantID
Currency (currency code e.g. EUR)
Secure Acceptance ProfileID
Secure Acceptance AccessKey
Secure Acceptance SecretKey
API KeyID
API SecretKey
- GET /v1/billing/cybersource/sources - list available payment methods
- POST /v1/billing/cybersource/session - returns { action: String, data: Object }
to be used in a form for starting the checkout flow, as shown below:
const session = await fetch('https://spaceup.storeganise.com/api/v1/billing/cybersource/session?successUrl=' + encodeURIComponent(location.href), { method: 'POST', // credentials: 'include', // if using cookies headers: { authorization: `Bearer ${accessToken}` }, }).then(r => r.json()); const form = document.createElement('form'); form.action = session.action; form.method = 'POST'; form.append( ...Object.entries(session.data).map(([name, value]) => { const input = document.createElement('input'); return Object.assign(input, { type: 'hidden', name, value }); }) ); document.body.append(form); form.submit();
Note: You must first have created a user account before attaching Cybersource cards using the above endpoints