---
title: "Confirm Payment Source"
method: POST
path: "/2024-09/payment_sources/confirm"
tags: ["Payment Sources"]
---

# Confirm Payment Source

`POST /2024-09/payment_sources/confirm`

## Request

- Base URL: `https://public-api.easyship.com`
- URL: `https://public-api.easyship.com/2024-09/payment_sources/confirm`
- Auth: HTTP bearer

Easyship integrate with Stripe Setup Intent to collect credit card and bank account information.
Ref: https://docs.stripe.com/payments/save-and-reuse-cards-only

Here's a example of how you can process 3DS for card setup intent on the client side. Once the validation is completed, you can use the `setup_intent.id` to finalize the payment source in Easyship.

<details>
  <summary>Confirm 3DS Example</summary>

  ```html
    <html>
      <body>
        <form id="form">
          <label>
            <span>Intent Secret</span>
            <input id="secret" class="field" placeholder="" />
          </label>
          <div class="button-row">
            <button>Submit</button>
          </div>
        </form>

        <script src="https://js.stripe.com/v3/"></script>
        <script>
          // Retrieve Easyship stripe publishable api key through `GET /2024-01/account/stripe`
          var stripe = Stripe('Easyship_stripe_publishable_api_key');

          // Handle form submission and trigger 3DS
          var form = document.getElementById('form');
          form.addEventListener('submit', function (event) {
            event.preventDefault();

            var secret = document.getElementById('secret').value;
            console.log(secret)

            stripe.confirmCardSetup(secret).then(function (result) {
              if (result.error) {
                // error handling
              } else {
                // You would receive the `setup intent id` with prefix `seti_`.
                // `POST /2024-01/payment_sources/confirm` here to finalize the payment source in Easyship
              }
            });
          });
        </script>
      </body>
    </html>
  ```

</details>

Should the setup intent not have undergone 3D Secure, you'll receive a status code 202, indicating the need to process 3D Secure.

If the setup intent is for us bank account. You'll receive a status code 202, indicating the need to do micro deposit verification. The verification url will be provided in the response and the verification code will be sent to the email address attached to the bank account.

Reference: https://docs.stripe.com/payments/ach-debit/set-up-payment?platform=web&payment-ui=direct-api#optional:-send-custom-email-notifications

Once the verification is completed, stripe webhook would mark your bank account payment source activated.

Required authorization scope: `public.payment_source:write`

## Request body

- PaymentSourceConfirm
  - `intent_id` string, required: Reference ID to confirm the payment source. It could be found in the response of `POST /2024-09/payment_sources`.

## Response `201`

setup intent successfully confirmed

- PaymentSourceSingle: Payment source details
  - `payment_source` PaymentSource
    - `id` string, uuid: Payment source id in Easyship
    - `third_party_source_id` string: Third party payment source id
    - `payment_method_type` 'card' | 'bank_account'
    - `bank_account` object
      - `bank_name` string: Bank name
      - `holder_name` string: Account holder name
      - `last_four_digits` string: Last four digits of bank account number
      - `routing_number` string: Routing number
      - `is_verified` boolean: Whether the bank account is verified by Stripe
    - `card` object
      - `brand` string: Credit card brand
      - `expiration_year` string: The expiration year of the card
      - `expiration_month` string: The expiration month of the card
      - `last_four_digits` string: Last four digits of credit card
      - `holder_name` string, nullable: Card holder name
  - `meta` Meta
    - `request_id` string: An unique ID represent the request.

## Other responses

- `202`: action required
- `422`: payment source already existed

## Changes

- **2026-11-03** `b47b54b748a7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/easyship/apis/easyship-public-api/changes/2024-09/payment_sources/confirm/post.md)

---

[API](https://skmtc.dev/easyship/apis/easyship-public-api.md) - [All operations](https://skmtc.dev/easyship/apis/easyship-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/easyship/apis/easyship-public-api/revisions/b47b54b748a7?raw)
