Skip to main content

Pay with Cashier (Website Browser) - Credit Card

Accept credit card payments on your website by redirecting the shopper to a hosted payment page.

Step 0. Authentication

How to obtain access token Authentication Reference

Step 1. Initialize a Payment Intent

POST /mch-api/v1/pa/payment_intents/create

  • Example Request
{
"amount": "20.00",
"currency": "USD",
"merchant_order_id": "P9297895081906",
"payment_method": {
"type": "card"
},
"description": "Online Payment",
"notify_url": "https://put_your_site_here/example_url"
}
  • Request
REQUEST BODYDetailsTypeRequiredExample
amountPayment amount. This is the order amount you would like to charge your customerstring(32)required
currencyAmount currencystring(3)requiredUSD
merchant_order_idThe order ID created in merchant's order system that corresponds to this PaymentIntent. Maximum length is 32.string(32)required
descriptionThe description of the orderstringrequired
notify_urlThe URL that is used to receive the payment result notification from AiscPaystringoptional
payment_methodobjectrequired
- typeSpecify this payment channel (card)stringrequiredcard
  • Example Response
{
"code": 0,
"data": {
"amount": "20.00",
"create_time": "2025-08-18T03:23:46+08:00",
"currency": "USD",
"merchant_order_id": "P9297895081906",
"next_action": {
"redirect_url": "https://api-live.aiscpay.com/mch-api/v1/pa/redirect/ccb3af9e4bae114682958fb114e2069b29bceceb5c364024d7c5042b1f0782bc",
"type": "redirect"
},
"order_id": "C96458626019020000",
"status": "PENDING"
},
"message": "ok",
"rid": "7fa547cb4c1e428fb996b2c31180dfa7"
}

You should redirect the shopper to the payment page with the next_action.redirect_url returned in the response. The shopper will complete the card payment on the hosted payment page.

Step 2. Get payment notify

Once you fill in the notify_url field when creating an order, after the user completes the payment, our system will prompt you with information about the user's completed payment.

How to verify our notify message Webhook Verify Reference

  • Example Webhook
{
"notify_type": "payment_success",
"data": {
"order_id": "C96245645019020000",
"merchant_order_id": "P9297895081903",
"order_amount": "20.00",
"order_currency": "USD",
"settle_amount": "20.00",
"settle_currency": "USD",
"create_time": "2025-08-18T03:23:46+08:00",
"pay_time": "2025-08-18T03:23:46+08:00"
}
}

Step 3. Retrieve a payment

Retrieve a Payment by ID.

POST /mch-api/v1/pa/payment_intents/query

  • Example Request
{
"order_id": "C96458626019020000",
"merchant_order_id": "P9297895081906"
}
  • Request
REQUEST BODYDetailsTypeRequiredExample
order_idPlatform order id from payment request.string(32)conditional (required if merchant_order_id is empty)
merchant_order_idMerchant order id from your creation of payment.string(32)conditional (required if order_id is empty)
  • Example Response
{
"code": 0,
"data": {
"amount": "20.00",
"create_time": "2025-08-18T03:23:46+08:00",
"currency": "USD",
"merchant_order_id": "P9297895081906",
"order_id": "C96458626019020000",
"status": "PENDING"
},
"message": "ok",
"rid": "863b73d9d0db4b35a1827c6a4396e988"
}
  • Explain of status
STATUS CODEDetails
PENDINGThe Payment is pending the final result from the provider. No further action is required.
SUCCESSThe Payment has succeeded. The payment transaction is complete.
EXPIREDPayment canceled or timeout, user has not completed the payment and the order has been closed.
FAILEDPayment failed. You can contact our support team for the detail reason.