stripe-api-java

An object-oriented client library for Stripe's API

License

License

Categories

Categories

Net Stripe Business Logic Libraries Financial
GroupId

GroupId

net.joelinn
ArtifactId

ArtifactId

stripe
Last Version

Last Version

1.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

stripe-api-java
An object-oriented client library for Stripe's API
Project URL

Project URL

http://github.com/jlinn/stripe-api-java
Source Code Management

Source Code Management

http://github.com/jlinn/stripe-api-java

Download stripe

How to add to project

<!-- https://jarcasting.com/artifacts/net.joelinn/stripe/ -->
<dependency>
    <groupId>net.joelinn</groupId>
    <artifactId>stripe</artifactId>
    <version>1.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.joelinn/stripe/
implementation 'net.joelinn:stripe:1.2.0'
// https://jarcasting.com/artifacts/net.joelinn/stripe/
implementation ("net.joelinn:stripe:1.2.0")
'net.joelinn:stripe:jar:1.2.0'
<dependency org="net.joelinn" name="stripe" rev="1.2.0">
  <artifact name="stripe" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.joelinn', module='stripe', version='1.2.0')
)
libraryDependencies += "net.joelinn" % "stripe" % "1.2.0"
[net.joelinn/stripe "1.2.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.sun.jersey : jersey-client jar 1.18.1
org.codehaus.jackson : jackson-jaxrs jar 1.9.13

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.hamcrest : hamcrest-library jar 1.3

Project Modules

There are no modules declared in this project.

stripe-api-java

Build Status

A Java client library for Stripe's API.

Usage

Maven dependency

<dependency>
    <groupId>net.joelinn</groupId>
    <artifactId>stripe</artifactId>
    <version>1.2.0</version>
</dependency>

Making API Calls

Initialize the client object

Stripe stripe = new Stripe("your_api_key");

Customers calls

// create a customer
CreateCustomerRequest customerRequest = new CreateCustomerRequest()
    .setEMail("[email protected]")
    .setDescription("A customer!")
    .setCard(new CreateCardRequest("4242424242424242", 1, 2020));
CustomerResponse customer = stripe.customers().createCustomer(customerRequest);

// retrieve the customer
CustomerResponse retrievedCustomer = stripe.customers().getCustomer(customer.getId());

Charges calls

// create a charge
CreateChargeRequest chargeRequest = new CreateChargeRequest(350, "usd")
    .setCustomer(customer.getId());
ChargeResponse charge = stripe.charges().createCharge(chargeRequest);

Versions

Version
1.2.0
1.1.0
1.0.2
1.0.1