List Payment Methods
List payment methods for an organization/subscription Returns payment method details (type, last4, brand, expiry, is_default)
Bearer token
In: header
Tenant or organization identifier
In: header
Query Parameters
Filters
Filter by subscription
Only return default payment method
Pagination
int32int32Response Body
application/json
curl -X GET "https://api.nrings.io/v1/payment-methods?subscriptionId&onlyDefault&page&pageSize" \ -H "Authorization: Bearer {your_token}" \ -H "X-Organization-ID: {your_org_id}"{
"paymentMethods": [
{
"id": "string",
"customerId": "string",
"paymentProviderPaymentMethodId": "string",
"type": "string",
"last4": "string",
"brand": "string",
"expiryMonth": 0,
"expiryYear": 0,
"isDefault": true,
"metadata": {},
"createdAt": "2019-08-24T14:15:22Z",
"organizationId": "string",
"subscriptionId": "string",
"status": "STATUS_UNSPECIFIED",
"timestamps": {
"createTime": "2019-08-24T14:15:22Z",
"updateTime": "2019-08-24T14:15:22Z"
}
}
],
"totalCount": 0
}Attach Payment Method POST
Attach a payment method to a subscription/organization Works for both providers (platform subscriptions) and clients (provider plan subscriptions) Authorization: Check organization type and rule engine (subscription.payment_method.manage.enabled)
Remove Payment Method DELETE
Remove a payment method Validation: - Providers: Cannot remove if only one method exists (except on free plan) - Clients: Cannot remove if only one method exists - Cannot remove if payment method is currently in use for active subscriptions