wallet.pay
Creates a top-up quote and opens provider payment.
POST
/api/v1/{locale}/wallet/top-up/payAPI scope wallet.pay
Request
Send Authorization: Bearer <key> with each request.
Requires a signed-in player and applicable permission.
Path parameters
| Field | Type | Requirement | Description |
|---|---|---|---|
locale | tr or en | Required | Request locale. |
Request body
| Field | Type | Requirement | Description |
|---|---|---|---|
package | string | Required | Package ID or custom for a custom amount. |
amount | string | Optional | Custom package amount in the display currency. |
amount_terms | string | Optional | The amountTerms value from options for custom amounts. |
payment | string | Required | Payment method identifier. |
payment_terms | object | Optional | Map from method ID to its pricing.token from paymentMethods. Supply it when the method has a token. |
promo_code | string | Optional | Wallet top-up promotion code. |
agreement | string | Optional | Send checkoutAgreement.token when an agreement is enabled. |
payment_customer | object | Optional | Customer information when required by the provider. Use the method’s customerDetails field. |
payment_customer.first_name | string | Optional | Given name. |
payment_customer.last_name | string | Optional | Family name. |
payment_customer.phone | string | Optional | Telephone number. |
payment_customer.address | string | Optional | Billing address when required. |
payment_customer.city | string | Optional | Billing city when required. |
payment_customer.country | string | Optional | Two-letter country code when required. |
payment_customer.postal_code | string | Optional | Postal code when required. |
payment_customer.identity_number | string | Optional | Identification number for iyzico. |
Run samples from your application server. See Quickstart for variables and sessions.
curl --fail-with-body --request POST \
-H "Authorization: Bearer $MINEXON_API_KEY" \
-b "$MINEXON_COOKIE_JAR" -c "$MINEXON_COOKIE_JAR" \
-H 'Content-Type: application/json' \
--data '{
"package": "custom",
"amount": "100.00",
"payment": "<payment>"
}' \
"${MINEXON_BASE_URL}/api/v1/en/wallet/top-up/pay"Response
HTTP 200 · application/json
| Field | Type | Requirement | Description |
|---|---|---|---|
next | string | Conditional | URL of the next player page or provider. |
notices | string[] | Conditional | Success and state codes. |
error | string | Conditional | Error code. |
errors | string[] | Conditional | Field or operation error codes. |
data.type | string | Conditional | The constant hosted_payment_form. |
data.method | string | Conditional | The constant POST. |
data.action | string | Conditional | Provider form submission URL. |
data.fields | object | Conditional | Provider-specific fields to send with the form. |
data | object | Conditional | Form data when the provider returns a hosted form. |
Redirects and forms start checkout. Verify settlement from the order or wallet record.
{
"next": "https://checkout.example.com/"
}When the provider uses a form
{
"data": {
"type": "hosted_payment_form",
"method": "POST",
"action": "https://checkout.example.com/",
"fields": {
"reference": "<provider-generated reference>"
}
}
}When the form is shown again, the response can contain data instead of next. Check the HTTP status and the error fields together.
Form response fields
| Field | Type | Requirement | Description |
|---|---|---|---|
locale | string | Required | Response locale. |
error | string or null | Conditional | Action error. Can be empty on success. |
errors | array or object | Conditional | Field or form validation errors. |
notice | string or null | Conditional | Action notice. |
currency | JSON value | Conditional | Value determined by screen and configuration. |
accountWallet | object or null | Conditional | Current account wallet. |
packages | JSON value | Conditional | Value determined by screen and configuration. |
selected | JSON value | Conditional | Category or filter selected on this screen. |
amount | JSON value | Conditional | Value determined by screen and configuration. |
paymentMethods | object or array | Conditional | Active methods keyed by provider and method ID. |
paymentDisplay | JSON value | Conditional | Value determined by screen and configuration. |
amountTerms | string | Conditional | Current currency terms token for custom amounts. |
payment | JSON value | Conditional | Value determined by screen and configuration. |
checkoutAgreement | JSON value | Conditional | Value determined by screen and configuration. |
agreementAccepted | boolean | Conditional | Acceptance state for the current agreement. |
promoApplied | string or null | Conditional | Wallet promotion applied to the session. |
promoInput | JSON value | Conditional | Value determined by screen and configuration. |
promoFocus | JSON value | Conditional | Value determined by screen and configuration. |
promoPercent | JSON value | Conditional | Value determined by screen and configuration. |
promoFixed | JSON value | Conditional | Value determined by screen and configuration. |
promoMinimum | JSON value | Conditional | Value determined by screen and configuration. |
bonusRules | JSON value | Conditional | Value determined by screen and configuration. |
quote | JSON value | Conditional | Value determined by screen and configuration. |
displayMinimum | JSON value | Conditional | Value determined by screen and configuration. |
displayMaximum | JSON value | Conditional | Value determined by screen and configuration. |
minimum | JSON value | Conditional | Value determined by screen and configuration. |
maximum | JSON value | Conditional | Value determined by screen and configuration. |
paymentMethods[].id | integer | Conditional | Field from this record, when available. |
paymentMethods[].name | string or null | Conditional | Field from this record, when available. |
paymentMethods[].provider | string or null | Conditional | Field from this record, when available. |
paymentMethods[].available | boolean | Conditional | Whether the method is available for this operation and amount. |
paymentMethods[].minimum | integer or string | Conditional | Field from this record, when available. |
paymentMethods[].maximum | integer or string or null | Conditional | Field from this record, when available. |
paymentMethods[].cashback | number or string | Conditional | Field from this record, when available. |
paymentMethods[].pricing | object | Conditional | Field from this record, when available. |
paymentMethods[].customerDetails | object or null | Conditional | Name, phone and other details requested by the provider. |
paymentMethods[].settlement_currency | string or null | Conditional | Settlement currency sent to the provider. |
Flow and error cases
A hosted provider form returns data. Outcomes that require navigation return next.
Validation errors return HTTP 422 with a top-up view containing data.error.