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
    Type: object
    required

    Billing address

  • email
    Type: string
    required
  • fiat_amount
    Type: string
    required

    Amount in fiat currency

  • fiat_currency
    Type: string
    required

    3-letter uppercase ISO 4217 code

  • ip
    Type: string
    required

    Buyer's IPv4 or IPv6 address

  • name
    Type: string
    required

    Buyer's full name

  • pay_system
    Type: string enum
    required

    Wallet that produced the token

    values
    • apple
    • google
  • pay_token
    Type: string
    required

    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.

  • failure_url
    Type: string

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

  • location
    Type: object

    Optional buyer location. When provided, country_code is required.

  • merchant_transaction_id
    Type: string
    max length:  
    100

    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.

  • success_url
    Type: string

    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"
}'
{
  "status": 200,
  "data": {
    "id": "28a3c125a28075453",
    "status": "pending"
  }
}