Appearance
Step 1: Payment Methods
Retrieve available methods and saved payment options for your customer.
Endpoint
http
GET https://api.iimmpact.com/v2/payment-methodsRequest headers
| Field | Type | Required | Description |
|---|---|---|---|
X-Api-Key | string | Yes | Your API key; keep it on your backend. |
X-Timestamp | string | Yes | Current Unix time in seconds; within five minutes of server time. |
X-Nonce | string | Yes | Fresh identifier for every request, including retries. |
X-Signature | string | Yes | v1= followed by the request's HMAC signature. |
Follow API Key Authentication. Sign an empty body and the sorted query.
Query fields
| Field | Type | Required | Description |
|---|---|---|---|
customer_external_id | string | Yes | Your own customer ID as a non-empty string. No UUID, numeric, or email format is required. Use the same value when creating a payment. |
URL-encode the ID, including any +, &, or / characters. IDs are matched exactly within your account; an unknown ID returns no saved methods. Your backend must authorize the customer making the lookup.
Request example
bash
curl 'https://api.iimmpact.com/v2/payment-methods?customer_external_id=CUS-1042' \
--header "X-Api-Key: $API_KEY" \
--header "X-Timestamp: $TIMESTAMP" \
--header "X-Nonce: $NONCE" \
--header "X-Signature: v1=$SIGNATURE"Response fields
| Field | Type | Description |
|---|---|---|
data.payment_methods | array | Available methods. An empty array means payment is unavailable. |
code | string | Method code for calculation and payment creation. |
display_name | string | Checkout label. |
icon_url | string or null | Always returned; null when no icon is available. |
description | string or null | Always returned; null when no display text is available. |
fee | object | Fixed or percentage payment fee. |
saved_payment_methods | array | This customer's saved options for this method. Empty when none exist. |
Saved payment method fields
| Field | Type | Description |
|---|---|---|
saved_payment_method_id | string | Opaque ID used to select this saved option at payment creation. |
display_name | string | Ready-to-display label for the saved option. |
card | object | Card display details for a saved card; omitted for other method types. |
card.brand | string | Card brand, such as VISA, when card exists. |
card.last4 | string | Last four digits for display, when card exists. |
card.expiry_month | integer | Expiry month, 1–12, when card exists. |
card.expiry_year | integer | Four-digit expiry year, when card exists. |
Use the parent method's code and the saved option's ID to pay. Card details are display-only; selection does not depend on them.
Response example — 200
json
{
"data": {
"payment_methods": [
{
"code": "CARD",
"display_name": "Card",
"icon_url": null,
"description": null,
"fee": {
"type": "percentage",
"value": "1.70"
},
"saved_payment_methods": [
{
"saved_payment_method_id": "spm_example",
"display_name": "Visa ending in 1091",
"card": {
"brand": "VISA",
"last4": "1091",
"expiry_month": 12,
"expiry_year": 2029
}
}
]
},
{
"code": "FPX",
"display_name": "FPX Online Banking",
"icon_url": null,
"description": "Pay with your bank account",
"fee": {
"type": "fixed",
"value": "2.00"
},
"saved_payment_methods": []
}
]
}
}Errors
| HTTP | Code | Action |
|---|---|---|
| 422 | validation_error | customer_external_id is missing or empty. Supply your customer ID; its format is not checked. |
See shared errors for authentication and service failures.
Next: Calculate Order.
