POST Preview Prop Challenge¶
Endpoint¶
POST /prop/challenge/preview
Description¶
Validates whether the authenticated customer can buy a prop challenge with the selected payer account. This endpoint does not create a purchase.
Authorization¶
Available for authenticated customer sessions.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
program_id |
int | Yes | Prop program id |
payer_login |
int | Yes | Customer account used as payer |
Success Response¶
{
"can_buy": true,
"price": 499,
"currency": "USD",
"payer_balance": 1200,
"amount_account_currency": 499,
"conversion_rate": 1,
"warnings": []
}
Blocked Response¶
{
"can_buy": false,
"reason": "NOT_ENOUGH_FUNDS",
"message": "Not enough funds",
"required_amount": 499,
"available_balance": 120,
"block_reason_message": "Not enough funds"
}
Stable Reasons¶
| Reason | Description |
|---|---|
INVALID_PAYER_ACCOUNT |
Payer account does not belong to the customer |
PROGRAM_DISABLED |
Program is not active |
PAYER_ACCOUNT_DISABLED |
Payer account is disabled |
PAYER_GROUP_NOT_FOUND |
Payer group was not found |
CURRENCY_CONVERSION_REQUIRED |
Program and payer currencies do not match |
PAYER_ACCOUNT_NOT_REAL |
Payer account is not a REAL account |
PAYER_BALANCE_UNAVAILABLE |
Balance snapshot is unavailable |
NOT_ENOUGH_FUNDS |
Payer balance is insufficient |