- Purpose
- Ship the most common commerce certification integration without bespoke design work.
- Prerequisites
- Commerce platform webhooks
- Server-side integration service
- SKU→assessment map
- Architecture
- Commerce → integration layer → Integration Lab → proctoring → review → certificate → portal.
Configuration
| Correlation | commerce customer id → external_id |
| Order reference | Stored on the assignment for refund handling |
| Access window | Order date + 90 days (customer policy) |
Implementation steps
- 01Subscribe to order.created / order.refunded / subscription.* events.
- 02Verify the platform signature.
- 03Upsert the candidate with the commerce customer id.
- 04Create one assignment per purchased certification line item.
- 05Expose a server-side launch route that mints a single-use launch token.
- 06Consume result and certificate events and render them in the account area.
- 07Implement revocation for refund, cancellation and expiry.
Examples
SKU map
javascript
const SKU_TO_ASSESSMENT = { "PRO-CERT-001": "asm_pro_cert_001" };Testing procedure
- Purchase → launch → submit → approve → certificate, end to end in the sandbox
- Duplicate order webhook produces no duplicates
- Refund before launch revokes the entitlement
Troubleshooting
Candidate created but no assignment
SKU is not in the map, or the assignment call failed after the upsert. Make the pair transactional via idempotency keys and retry.
Buyer sees no certificate
Approval has not been recorded; certificates are gated on review.