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.

Body

required
application/json
  • Billing address

    Properties: 6
  • Amount in fiat currency

  • 3-letter uppercase ISO 4217 code

  • Buyer's IPv4 or IPv6 address

  • Buyer's full name

  • Wallet that produced the token

  • Base64-encoded wallet payment token. Apple Pay: Base64 of the token.paymentData JSON. Google Pay: Base64 of the token string from paymentData.paymentMethodData.tokenizationData.token.

  • URL to redirect the buyer to after a failed payment. Required when pay_system is google.

  • Optional buyer location. When provided, country_code is required.

    Properties: 2
  • Your 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.

  • URL to redirect the buyer to after a successful payment. Required when pay_system is google.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/sdk-partner/alternative-mobile-pay/mobile-pay
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"
}'
Payment created
{
  "status": 200,
  "data": {
    "id": "28a3c125a28075453",
    "status": "pending"
  }
}