Create a pay-in
Creates a mobile wallet pay-in from the encrypted wallet token and the buyer's details. pay_system selects the wallet. A new payment starts as pending; repeating the same merchant_transaction_id returns the current state of the existing payment, including a final status or redirect_data when applicable. Keep the same id when retrying after a timeout or lost response. Track the result through the status endpoint and webhooks.
- Type: objectbilling
_address requiredBilling address
- Type: stringemailrequired
- Type: stringfiat
_amount requiredAmount in fiat currency
- Type: stringfiat
_currency required3-letter uppercase ISO 4217 code
- Type: stringiprequired
Buyer's IPv4 or IPv6 address
- Type: stringnamerequired
Buyer's full name
- Type: string enumpay
_system requiredWallet that produced the token
values- apple
- google
- Type: stringpay
_token requiredBase64-encoded wallet payment token. Apple Pay: Base64 of the
token.paymentDataJSON. Google Pay: Base64 of the token string frompaymentData.paymentMethodData.tokenizationData.token. - Type: stringfailure
_url URL to redirect the buyer to after a failed payment. Required when
pay_systemisgoogle. - Type: objectlocation
Optional buyer location. When provided, country_code is required.
- Type: stringmerchant
_transaction _id max length:100Your transaction id (letters, digits, -, _; up to 100 characters). If omitted, Mercuryo generates one. Reuse the same id when retrying a request. The id must be unique across all your shops and operations: an existing operation is looked up by merchant and id.
- Type: stringsuccess
_url URL to redirect the buyer to after a successful payment. Required when
pay_systemisgoogle.
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://pay-in-api.mrcr.io/sdk-partner/alternative-mobile-pay/mobile-pay \
--request POST \
--header 'Content-Type: application/json' \
--header 'Sdk-Partner-Token: YOUR_SECRET_TOKEN' \
--header 'X-Signature: YOUR_SECRET_TOKEN' \
--data '{
"pay_token": "",
"pay_system": "apple",
"email": "john.doe@example.com",
"name": "John Doe",
"fiat_amount": "10.00",
"fiat_currency": "USD",
"ip": "203.0.113.10",
"billing_address": {
"country_code": "DE",
"street_line_1": "Unter den Linden 1",
"street_line_2": "Apt 3",
"city": "Berlin",
"state_code": "BE",
"zip_code": "10115"
},
"location": {
"country_code": "DE",
"state": "Berlin"
},
"merchant_transaction_id": "order-8841",
"success_url": "https://example.com/checkout/success",
"failure_url": "https://example.com/checkout/failure"
}'
{
"status": 200,
"data": {
"id": "28a3c125a28075453",
"status": "pending"
}
}