Create a Payment Source

Create a payment sources.

Easyship won't hold the details of your credit card. We use stripe token to attach the credit card to your easyship account on Stripe.
Please upload your credit card to stripe via Stripe Token JS.


<script src=""></script>
   // Retrieve Easyship stripe publishable api key through `GET /2023-01/account/stripe`
   var stripe = Stripe('stripe_publishable_api_key'); 

   // Create an instance of Elements.
   var elements = stripe.elements();

   // Create a CardElement
   var card = elements.create('card')

   // Create your token from the CardElement data
   stripe.createToken(card).then(function (result) {
     if (result.error) {
       // error handling
     } else {
       // You would receive the `stripe token` with prefix `tok_`.
       // `POST /2023-01/payment_sources` here to attach your card to Easyship
       var token = result.token;

When the credit card needs 3DS (with response status code 202), proceed with the next step found in POST /2023-01/payment_sources/confirm_3ds.

Required authorization scope: Payment Source

This API is currently in beta and is available upon request. Get in touch with your account manager or Easyship Support Team to enable it.

Click Try It! to start a request and see the response here!