Skip to main content

Card Payments

AcountPay partners can enable card payment acceptance for their merchants. This includes online payments (Payment Page, Online SDK), in-store tap-to-pay via CheckoutX, and merchant-initiated transactions for subscriptions. AcountPay handles all communication with the payment processor APIs. Partners only need to call AcountPay’s Partner API.

Overview

Enabling card payments for a merchant involves these steps:
  1. Onboard the merchant — Initiate KYB verification
  2. Set up terminals — Register online or in-store terminals
  3. Accept payments — Create orders and process payments

Step 1: Onboard Merchant for Card Payments

Card payment onboarding is separate from A2A bank payment onboarding. A merchant can have both.

Initiate Onboarding

curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'x-partner-client-id: YOUR_CLIENT_ID' \
  -H 'x-partner-client-secret: YOUR_CLIENT_SECRET' \
  'https://api.acountpay.com/v1/partner/merchants/{merchantId}/card-payments/onboard'
This returns a webKybUrl — a link to the KYB verification form. AcountPay automatically emails this link to the merchant. You can also share it directly. Response:
{
  "webKybUrl": "https://surfkyb.com/...",
  "applicationId": "8268abfc4ae6900a10",
  "applicationStatus": "APPLICATION_INITIATED"
}

Check Onboarding Status

Poll this endpoint to track the merchant’s KYB progress:
curl -X GET \
  -H 'x-partner-client-id: YOUR_CLIENT_ID' \
  -H 'x-partner-client-secret: YOUR_CLIENT_SECRET' \
  'https://api.acountpay.com/v1/partner/merchants/{merchantId}/card-payments/onboard/status'
Status progression: APPLICATION_INITIATEDAPPLICATION_SUBMITTEDAPPLICATION_SIGNEDAPPLICATION_COMPLETEDMERCHANT_CREATED Once status is MERCHANT_CREATED, the merchant has a merchantId and storeId for card payments, and you can register terminals.

Step 2: Set Up Terminals

Online Terminals (for websites)

Register an online terminal to accept payments on the merchant’s website:
curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'x-partner-client-id: YOUR_CLIENT_ID' \
  -H 'x-partner-client-secret: YOUR_CLIENT_SECRET' \
  -d '{"onlineTerminalMode": "SelfHostedPage"}' \
  'https://api.acountpay.com/v1/partner/merchants/{merchantId}/card-payments/online-terminals'
Terminal modes:
  • PaymentPage — Hosted payment page. Simplest integration.
  • SelfHostedPage — Embed payment fields in the merchant’s website using the Online SDK.
  • MerchantInitiated — For recurring payments and subscriptions.
The response includes a terminalId and terminalPublicKey needed for SDK initialization.

CheckoutX Terminals (for in-store tap-to-pay)

Generate a registration code for the merchant’s Android device:
curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'x-partner-client-id: YOUR_CLIENT_ID' \
  -H 'x-partner-client-secret: YOUR_CLIENT_SECRET' \
  'https://api.acountpay.com/v1/partner/merchants/{merchantId}/card-payments/terminals/interapp'
The merchant enters this code in the CheckoutX app on their Android device. Poll the status endpoint to get the terminalId once registration completes.

Step 3: Accept Payments

Create an Order

curl -X POST \
  -H 'Content-Type: application/json' \
  -H 'x-partner-client-id: YOUR_CLIENT_ID' \
  -H 'x-partner-client-secret: YOUR_CLIENT_SECRET' \
  -d '{
    "terminalId": "TERMINAL_ID",
    "amount": 10000,
    "currency": "SEK",
    "orderLines": [{
      "name": "Product",
      "quantity": 1,
      "itemPrice": {"value": "10000", "currency": "SEK"}
    }]
  }' \
  'https://api.acountpay.com/v1/partner/merchants/{merchantId}/card-payments/orders'
For Payment Page terminals, the response includes a paymentLink to redirect the customer. For Online SDK terminals, use the orderId and nonce from the response to initialize the SDK. For CheckoutX, use the orderId for the app-switch to CheckoutX on the merchant’s device.

Check Payment Status

curl -X GET \
  -H 'x-partner-client-id: YOUR_CLIENT_ID' \
  -H 'x-partner-client-secret: YOUR_CLIENT_SECRET' \
  'https://api.acountpay.com/v1/partner/merchants/{merchantId}/card-payments/payments/{paymentId}/status'

Webhooks

Subscribe to card payment events by adding these event types to your webhook configuration:
  • card.payment.completed
  • card.payment.failed
  • card.payment.cancelled
  • card.payment.initiated
  • card.payment.refunded
  • card.order.cancelled

Get Card Payment Status

Check the complete card payment state for a merchant:
curl -X GET \
  -H 'x-partner-client-id: YOUR_CLIENT_ID' \
  -H 'x-partner-client-secret: YOUR_CLIENT_SECRET' \
  'https://api.acountpay.com/v1/partner/merchants/{merchantId}/card-payments/status'
Returns the merchant’s card payment mapping, stores, and registered terminals.