Documentation · Integration Guides

E-commerce Certification

Reference implementation: order to certificate, including refunds and expiry.

Example
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

Correlationcommerce customer id → external_id
Order referenceStored on the assignment for refund handling
Access windowOrder date + 90 days (customer policy)

Implementation steps

  1. 01Subscribe to order.created / order.refunded / subscription.* events.
  2. 02Verify the platform signature.
  3. 03Upsert the candidate with the commerce customer id.
  4. 04Create one assignment per purchased certification line item.
  5. 05Expose a server-side launch route that mints a single-use launch token.
  6. 06Consume result and certificate events and render them in the account area.
  7. 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.