Get Subscription
Retrieve detailed information about a specific subscription, including current status, billing information, and customer details.
subscriptions.read
scope.Authorizations
Bearer authentication header in the format `Bearer <token>`, where `<token>` is your authentication token.
Headers
Merchant account ID for this request.
""default""
Path Parameters
Unique identifier of the subscription to retrieve.
"sub_1234567890abcdef"
Response
Successful Response
Unique subscription identifier.
"sub_1234567890abcdef"
Object type, always "subscription".
"subscription"
Subscription creation time (ISO 8601).
"2024-01-15T10:30:00Z"
Last update time (ISO 8601).
"2024-01-20T14:22:00Z"
Subscription status.
"active"
"failed"
"past_due"
"cancelled"
Customer information with generated ID.
Subscription plan details.
Payment method details.
Current billing period start time.
"2024-01-15T10:30:00Z"
Current billing period end time.
"2024-02-15T10:30:00Z"
Next billing date (YYYY-MM-DD format).
"2024-02-15"
Trial period start time (if applicable).
"null"
Trial period end time (if applicable).
"null"
Billing information and payment history.
Subscription description.
"Premium Plan Subscription"
Custom metadata.
"{}"
Whether this is a production mode subscription.
"false"
curl --request GET \--url https://api.efundpay.com/v4/subscriptions/sub_1234567890abcdef \--header 'Authorization: Bearer <token>' \--header 'x-merchant-account-id: <x-merchant-account-id>'
{"id": "sub_1234567890abcdef","object": "subscription","created": "2024-01-15T10:30:00Z","updated": "2024-01-20T14:22:00Z","status": "active","customer": {"id": "cus_abc123","display_name": "John Doe","external_identifier": "customer-12345","first_name": "John","last_name": "Doe","email_address": "john@example.com","phone_number": "+1234567890","account_number": "123456789"},"plan": {"name": "Basic Monthly","currency": "USD","amount": 1000,"interval": "month","trial_period_days": 14,"billing_cycle_anchor": "immediate"},"payment_method": {"token_id": "tok_a1b2c3d4","type": "card","card": {"number": "4111111111111111","expiration_date": "12/27","security_code": "123"}},"current_period_start": "2024-01-15T10:30:00Z","current_period_end": "2024-02-15T10:30:00Z","next_billing_date": "2024-02-15","trial_start": null,"trial_end": null,"billing_details": {"payment_attempts": 0,"last_payment_date": "2024-01-15T10:30:00Z","last_payment_status": "succeeded","next_retry_date": null},"description": "Premium Plan Subscription","metadata": {"plan_name": "premium","user_tier": "gold"},"livemode": false}