Skip to main content

Get Subscription

Retrieve detailed information about a specific subscription, including current status, billing information, and customer details.

GEThttps://api.efundpay.com/v4/subscriptions/{subscription_id}
This endpoint requires the subscriptions.read scope.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header in the format `Bearer <token>`, where `<token>` is your authentication token.

Headers

x-merchant-account-idstringrequired

Merchant account ID for this request.

Examples:""default""

Path Parameters

subscription_idstringrequired

Unique identifier of the subscription to retrieve.

Examples:"sub_1234567890abcdef"

Response

application/json

Successful Response

idstringrequired

Unique subscription identifier.

Examples:"sub_1234567890abcdef"
objectstringrequired

Object type, always "subscription".

Examples:"subscription"
createdstringrequired

Subscription creation time (ISO 8601).

Examples:"2024-01-15T10:30:00Z"
updatedstringrequired

Last update time (ISO 8601).

Examples:"2024-01-20T14:22:00Z"
statusstringrequired

Subscription status.

Examples:"active""failed""past_due""cancelled"
customerobjectrequired

Customer information with generated ID.

planobjectrequired

Subscription plan details.

payment_methodobjectrequired

Payment method details.

current_period_startstringrequired

Current billing period start time.

Examples:"2024-01-15T10:30:00Z"
current_period_endstringrequired

Current billing period end time.

Examples:"2024-02-15T10:30:00Z"
next_billing_datestringrequired

Next billing date (YYYY-MM-DD format).

Examples:"2024-02-15"
trial_startstring | null

Trial period start time (if applicable).

Examples:"null"
trial_endstring | null

Trial period end time (if applicable).

Examples:"null"
billing_detailsobjectrequired

Billing information and payment history.

descriptionstring | null

Subscription description.

Examples:"Premium Plan Subscription"
metadataobject

Custom metadata.

Examples:"{}"
livemodebooleanrequired

Whether this is a production mode subscription.

Examples:"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
}
Powered by Docusaurus