Skip to content

Google Pay Alternative

AM Integration option

Payment flow

  1. Customer initiates Google Pay payment on the merchant's website.
  2. Merchant sends the payment request to moqpay
  3. moqpay returns a payment link to the merchant.
  4. The merchant redirects the customer to the payment link. The link opens the page which displays the transaction amount along with a button to make a payment using Google Pay.
  5. The customer completes the payment using Google Pay.
  6. moqpay sends a webhook notification to the merchant.

Info

This integration option only supports EUR currency.

Payment

Request

Send a payment request with the following additional parameters:

Parameter Type Description
request object
amount * required
bigInteger Transaction amount in minimal currency units, for example, 5000 (50 euros).
return_url * required
string URL to return the customer to when the transaction is completed.
method object A section of the payment method.
type * required
string google_pay_alt
additional_data object A section of the additional data parameters.
customer object A section of additional information about the customer.
id object The customer's identifier in the merchant's system.
Request example
{
    "request": {
        "amount": 200,
        "currency": "EUR",
        "description": "description",
        "return_url": "https://your_return_url.com",            
        "method": {
            "type": "google_pay_alt"
        }            
    }
}
Response

Redirect your customer to the URL that is formed the following way: URL from form.action + ? + theform.fields.name value + = + the form.fields.value value.

For example: https://example.com/url-for-redirect?data=eyJpZCI6MjE4MTI4ODU2MSwiY29udHJvbCI6IjVlZDkyODBjZDFhNzRkZmVmZDRhOWNhNDQ3YmM3ZDFhIn0=

Response example
{
    "transaction": {
        "uid": "233d6ba5-907b-4a74-a68d-2f7abb486537",
        "type": "payment",
        "status": "pending",
        "amount": 100,
        "currency": "EUR",
        "description": "test",
        "created_at": "2024-09-04T13:10:48Z",
        "updated_at": "2024-09-04T13:10:49Z",
        "method_type": "google_pay_alt",
        "receipt_url": "https://backoffice.moqpay.com/customer/transactions/233d6ba5-907b-4a74-a68d-2f7abb486537/e28eac81a3624ca56f5a78896c9163345e61521e1b14d63300b461ea4639f439",
        "payment": {
            "status": "pending",
            "gateway_id": 4417,
            "ref_id": "2181288561",
            "message": "Transaction was initialized."
        },
        "google_pay_alt": {
            "type": "google_pay_alt"
        },
        "customer": {
            "email": null,
            "ip": null
        },
        "manually_corrected_at": null,
        "version": 0,
        "message": "Transaction was initialized.",
        "tracking_id": "your_uniq_number21212",
        "test": false,
        "additional_data": {
            "payment_method": {
                "type": "alternative"
            }
        },
        "gateway": {
            "iframe": false
        },
        "form": {
            "action": "https://example.com/url-for-redirect",
            "method": "GET",
            "fields": [
                {
                    "name": "data",
                    "value": "eyJpZCI6MjE4MTI4ODU2MSwiY29udHJvbCI6IjVlZDkyODBjZDFhNzRkZmVmZDRhOWNhNDQ3YmM3ZDFhIn0="
                }
            ]
        }
    }
}