getCustomerMembership
Use the SDK for application integration. This read-only reference covers Commerce, Customer Auth, Membership and Events.
All HTTP operationsGET
publishableKeycustomerBearerAuthheader
X-Publishable-Key<token>Tenant publishable key for authentication (sent via X-Publishable-Key header)
header
AuthorizationBearer <JWT>Customer JWT for same-tenant authenticated customer actions
Successful operation
application/json- response
id*stringLength
1 <= lengthplan*stringLength
1 <= lengthprice*stringLength
1 <= lengthstatus*stringValue in
"incomplete""trialing""active""past_due""cancelled""expired"currentPeriodEnd*stringMatch
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Format
date-timenextBillingAt*|Match
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Format
date-timecancelAtPeriodEnd*booleanamount*integerRange
0 <= value <= 9007199254740991currency*stringLength
3 <= length <= 3billingInterval*stringValue in
"month""year"intervalCount*integerRange
0 < value <= 9007199254740991card?|nullExamples may be generated from schemas; they are illustrative, not recorded successful API calls. Example snippets may omit required authentication headers.
curl -X GET 'https://api.01.software/api/memberships/me'Example Response
{ "id": "string", "plan": "string", "price": "string", "status": "incomplete", "currentPeriodEnd": "2019-08-24T14:15:22Z", "nextBillingAt": "2019-08-24T14:15:22Z", "cancelAtPeriodEnd": true, "amount": 0, "currency": "str", "billingInterval": "month", "intervalCount": 1, "card": { "last4": "string", "brand": "string" }}