An open API service indexing awesome lists of open source software.

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

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"
}
```
---