Apple/Google Pay
How to integrate Apple Pay and Google Pay
Accepting payments via Apple Pay and Google Pay follows the same principle as regular payment through the Web form, but with a few important differences.
Quick Start
For Apple/Google Pay, you need to specify additional parameters when creating an order — the payment method and customer data.
Creating an Order
The order is created through the standard endpoint, but with additional parameters:
| Parameter | Type | Description |
|---|---|---|
| extraParams | string | Payment method: apple-pay or google-pay |
| customer | object | Customer information (required) |
The rest of the request fields are identical to creating a regular order.
How to create orders
extraParams Parameter
Specify the desired payment method:
| Value | Description |
|---|---|
| apple-pay | Payment via Apple Pay |
| google-pay | Payment via Google Pay |
customer Object
Required fields for customer data:
| Field | Type | Required | Description |
|---|---|---|---|
| country | string | ✅ Yes | Customer country (ISO 3166-1 alpha-2) |
| string | ✅ Yes | Customer email | |
| firstName | string | ✅ Yes | Customer first name |
| lastName | string | ✅ Yes | Customer last name |
| ip | string | ✅ Yes | Customer IP address |
The list of required fields may vary depending on your merchant settings. Check the exact requirements with your manager.
Request Example (Apple Pay)
curl -X POST "https://api.riopay.online/v1/orders" \
-H "Content-Type: application/json" \
-H "X-Api-Token: YOUR_API_TOKEN" \
-d '{
"amount": "1500.00",
"externalId": "order_12345",
"purpose": "Payment for order №12345",
"extraParams": "apple-pay",
"customer": {
"country": "RU",
"email": "customer@example.com",
"firstName": "Ivan",
"lastName": "Ivanov",
"ip": "192.168.1.1"
}
}'Request Example (Google Pay)
curl -X POST "https://api.riopay.online/v1/orders" \
-H "Content-Type: application/json" \
-H "X-Api-Token: YOUR_API_TOKEN" \
-d '{
"amount": "1500.00",
"externalId": "order_12345",
"purpose": "Payment for order №12345",
"extraParams": "google-pay",
"customer": {
"country": "RU",
"email": "customer@example.com",
"firstName": "Ivan",
"lastName": "Ivanov",
"ip": "192.168.1.1"
}
}'Successful Response Example
{
"id": "a1b2c3d4-e5f6-7g8h-i9j0-k1l2m3n4o5p6",
"status": "PENDING",
"purpose": "Payment for order №12345",
"amount": "1500.0",
"commission": "1.5",
"received": "1498.5",
"currency": "RUB",
"shopId": "a1b2c3d4-e5f6-7g8h-i9j0-k1l2m3n4o5p6",
"terminalId": "a1b2c3d4-e5f6-7g8h-i9j0-k1l2m3n4o5p6",
"merchantId": "a1b2c3d4-e5f6-7g8h-i9j0-k1l2m3n4o5p6",
"externalId": "order_12345",
"paymentLink": "https://example.com/payment?id=a1b2c3d4-e5f6-7g8h-i9j0-k1l2m3n4o5p6",
"successUrl": null,
"payedAt": null,
"updatedAt": "2023-03-21T12:34:56Z",
"createdAt": "2023-03-21T12:34:56Z"
}Redirecting the User
After creating an order, you will receive a paymentLink — a link for payment.
Redirect the user to this link to complete the payment via Apple/Google Pay.
Recommendations
- Ensure all required
customerfields are filled in correctly - Pass the user's real IP address
- Apple/Google Pay work primarily on mobile devices
- Test the integration on real devices before launch