---
title: "Add credit"
method: POST
path: "/2024-09/account/credit"
tags: ["Credit"]
---

# Add credit

`POST /2024-09/account/credit`

## Request

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

Top up your credit.

In case your payment source (credit card) requires 3D validation use the Stripe SDK.

To detect any fraudulent activities and initiate Radar and 3D Secure, integrate `handleCardAction` from Stripe.js.
Reference: https://stripe.com/docs/js/payment_intents/handle_card_action

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

   // When `POST /2024-09/account/credit` returns status code 202, retrieve the secret in the response.
   var secret = response.action.client_secret

   // 3D validation
   stripe.handleCardAction(secret).then(function (result) {
     if (result.error) {
       // error handling
     } else {
       // You would receive stripe payment_intent object
       // `POST /2024-09/account/credit/confirm_3ds` with payment_intent.id to confirm credit top-up
     }
   });
 </script>
```

> If you are using an authorized bank account as your payment method, the transaction might take around 1 to 3 days to complete.

Required authorization scope: `public.payment:write`

## Request body

- CreditCreate
  - `payment_source_id` string, required: Source ID based on Payment Source API. Your payment source should have the `card` accept type. Use default card if this property is not provided.
  - `amount` number, required: Amount of credits to be added to a current account.

## Response `201`

credit successfully added

- CreditSingle
  - `credit` Credit
    - `balance` number: Total amount in the account without considering holds or pending transactions.
    - `available_balance` number: Funds accessible for use, accounting for holds and pending transactions.
    - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYR' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLF' | 'CLP' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LTL' | 'LVL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRO' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SKK' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XAG' | 'XAU' | 'XCD' | 'XDR' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'BTC' | 'JEP' | 'EEK' | 'GHC' | 'MTL' | 'TMM' | 'YEN' | 'ZWD' | 'ZWL' | 'ZWN' | 'ZWR': Currency code for the account. ISO-4217 three-letter alphabetic currency code (e.g. USD, EUR, GBP).
  - `meta` Meta
    - `request_id` string: An unique ID represent the request.

## Other responses

- `202`: 3D validation
- `404`: record not found

## Changes

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

[Operation history](https://skmtc.dev/easyship/apis/easyship-public-api/changes/2024-09/account/credit/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)
