https://github.com/setxpro/stripe-integration
Stripe Billing | Recurring Payments & Subscription
https://github.com/setxpro/stripe-integration
java spring-boot stripe-api stripe-payments
Last synced: 3 months ago
JSON representation
Stripe Billing | Recurring Payments & Subscription
- Host: GitHub
- URL: https://github.com/setxpro/stripe-integration
- Owner: setxpro
- Created: 2024-02-15T19:17:44.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-19T12:50:31.000Z (over 2 years ago)
- Last Synced: 2025-03-27T17:21:15.804Z (over 1 year ago)
- Topics: java, spring-boot, stripe-api, stripe-payments
- Language: Java
- Homepage:
- Size: 67.4 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Stripe Integration
-
Stripe Billing | Recurring Payments & Subscription
## CARD TOKEN
Method
Endpoint
POST
public/stripe/card/token
### EXAMPLE
REQUEST:
```json
{
"cardNumber": "4242424242424242",
"expMonth": "05",
"expYear": "26",
"cvc": "123",
"username": "patrick"
}
```
RESPONSE:
```json
{
"cardNumber": "4242424242424242",
"expMonth": "05",
"expYear": "26",
"cvc": "123",
"token": "tok_1Ok9JQB0FkclW1WXrdY8TFDp",
"username": "patrick",
"success": true
}
```
---
## CHARGE
Method
Endpoint
POST
public/stripe/charge
### EXAMPLE
REQUEST:
```json
{
"stripeToken": "tok_1Ok9JQB0FkclW1WXrdY8TFDp",
"username": "zend",
"amount": 5000,
"additionalInfo": {
"ID_TAG": "1234567890"
}
}
```
RESPONSE:
```json
{
"stripeToken": "tok_1Ok9JQB0FkclW1WXrdY8TFDp",
"username": "zend",
"amount": 5000.0,
"success": true,
"message": "Payment complete.",
"chargeId": "ch_3Ok9JbB0FkclW1WX14RkZViB",
"additionalInfo": {
"ID_TAG": "1234567890"
}
}
```
---
## SUBSCRIPTION
Method
Endpoint
POST
public/stripe/customer/subscription
### EXAMPLE
REQUEST:
```json
{
"cardNumber": "4242424242424242",
"expMonth": "05",
"expYear": "26",
"cvc": "123",
"email": "patrickpqdt87289@gmail.com",
"priceId": "price_1Ok5PmB0FkclW1WXrag0Rby3",
"username": "zend",
"numberOfLicense": 1
}
```
RESPONSE:
```json
{
"stripeCustomerId": "cus_PZIcBMcxPGvrEi",
"stripeSubscriptionId": "sub_1OkA1BB0FkclW1WXvORStzo2",
"stripePaymentMethodId": "pm_1OkA19B0FkclW1WXEKD21zUm",
"username": "zend"
}
```
---
## CANCEL SUBSCRIPTION
Method
Endpoint
PARAM
POST
public/stripe/subscription/{sub_id}
sub_1OkA1BB0FkclW1WXvORStzo2
### EXAMPLE
REQUEST:
```json
DELETE
```
RESPONSE:
```json
{
"status": "canceled"
}
```
---