View Categories

Save Card via iCard (Initiate)

< 1 min read

Save Card via iCard (Gateway Initiate) #

Triggers the gateway-proxied iCard flow for registering a reusable payment method. Use it before listing cards with GET /api/v1/IndividualPaymentMethod/{individualId}.

Endpoint #

POST https://api-test.10npay.com/api/v1/IndividualPaymentMethod/{individualId}/card-initiate

Request body #

{
  "deviceIP": "94.72.159.162"
}

Response (200) #

{
  "data": "c76ac88badd96a37d1a7a744b4aecbdcad641d83",
  "redirectUrl": "https://dev-ipg.icards.eu/sandbox/"
}

Embed snippet #

<div id="ipg"></div>
<script>
const domain = 'https://dev-ipg.icards.eu/sandbox/';
const token = 'c76ac88badd96a37d1a7a744b4aecbdcad641d83';
const theme = 'classic';
const js = document.createElement('script');
js.src = `${domain}js/payment-modal.js?token=${token}&theme=${theme}`;
js.id = 'ipg-io-js';
js.async = true;
document.body.appendChild(js);
</script>

After completion #

  1. Wait for the PSP redirect callback.
  2. Call GET /api/v1/IndividualPaymentMethod/{individualId} to fetch the new card plus its status (e.g., PendingReview, Active).
  3. Use the returned value as paymentMethodId when initiating deposits.

Error codes #

  • 400 – user not eligible to add cards (finish onboarding first).
  • 401 – invalid bearer token.
  • 404 – individual ID unknown.
  • 500 – upstream PSP/iCard outage.