Prerequisites:
- API access credentials (contact [email protected])
- A test merchant account
- Basic understanding of REST APIs
Complete Subscription Flow
This guide walks you through creating a complete subscription from scratch, including customer creation, payment method setup, and subscription activation.1
Create a Customer
First, create a customer account:Response:
2
Add Payment Method
Create a Straumur checkout session to add a payment card:Response:Redirect your customer to the
checkoutUrl to complete card verification.3
Create Subscription
After the payment method is added, create a subscription:Response:
4
Add Items to Subscription
Add products to the subscription cart:Response:
5
Verify Subscription
Retrieve the subscription to confirm everything is set up correctly:
What Happens Next?
Once your subscription is active, Journey automatically:- Generates Deliveries - Creates delivery records based on your subscription frequency
- Processes Payments - Charges the customer’s payment method before each delivery
- Handles Failures - Automatically retries failed payments using dunning logic
- Sends Notifications - Triggers email/SMS events for payment confirmations and delivery updates
Next Steps
Authentication
Learn about customer login flows
Subscriptions Guide
Deep dive into subscription management
Dunning & Payment Recovery
Understand automatic payment retries
API Reference
Explore all API endpoints