Apple Pay
 
Specifics
  • Payment method type in the API:
    apple_pay
  • Confirmation scenario: no
  • Payment term: 1 hour
  • Holding: 7 days
  • Code in reports: AC
  • Refund: yes, full and partial
  • Refund processing time: 0 to 3 days (depends on the issuer)
  • Recurring payments: yes
  • Limits: the minimum payment amount is 1 ruble, and the maximum amount is 250,000 rubles, there are additional restrictions
  • Conditions for displaying the Apple Pay button: the Safari browser version 11.1 or later is used for the payment and the user is signed in to their Apple account.
 
Integration scenarios
Ready-made solutions:
 
Payment on the website or in the app
In this section, we will describe the process of accepting a payment for those who integrate Apple Pay independently. If you’re using the YooMoney’s mobile SDK, refer to the article on iOS SDK.
 
Implementation
To implement this payment method, send the certificate that will be used by Apple to encode the bank card data to YooMoney. To get this certificate, you need to:
  1. Contact the manager and ask them to create a Certificate Signing Request (CSR) for you.
  2. Load the CSR in Apple Developer account.
  3. Download the generated certificate and send it to the manager.
Detailed instructions (see Step 2 “Exchange certificates with Apple”)
 
Processing payment
Step 1. Generate an Apple Pay cryptogram on the user’s device and get the contents of the 
PKPaymentToken
object. More about generating cryptograms:
Step 2. Send a payment creation request to YooMoney with the 
apple_pay
type and the Apple Pay cryptogram (
paymentData
) in the 
payment_method_data
object.
Example of request
cURL
PHP
Python
curl https://api.yookassa.ru/v3/payments \
  -X POST \
  -u <Shop ID>:<Secret Key> \
  -H 'Idempotence-Key: <Idempotence Key>' \
  -H 'Content-Type: application/json' \
  -d '{
        "amount": {
          "value": "2.00",
          "currency": "RUB"
        },
        "payment_method_data": {
          "type": "apple_pay",
          "payment_data": "<paymentData>"
        },
        "description": "Order No. 72"
      }'
Example of a created payment object
JSON
{
  "id": "22e290a5-000f-5000-9000-13324c06cacb",
  "status": "waiting_for_capture",
  "paid": true,
  "amount": {
    "value": "2.00",
    "currency": "RUB"
  },
  "authorization_details": {
    "rrn": "10000000000",
    "auth_code": "000000",
    "three_d_secure": {
      "applied": false
    }
  },
  "created_at": "2018-07-19T11:58:29.196Z",
  "description": "Order No. 72",
  "expires_at": "2018-07-26T11:58:32.019Z",
  "metadata": {
    "ymapi": "true"
    },
  "payment_method": {
    "type": "apple_pay",
    "id": "22e290a5-000f-5000-9000-13324c06cacb",
    "saved": false
  },
  "recipient": {
    "account_id": "100001",
    "gateway_id": "1000001"
  },
  "refundable": false,
  "test": false
}
Step 3. Wait for the payment to be successfully completed: you will receive a notification from YooMoney, or you can send periodic requests for payment information .

Do you have any questions or comments regarding the documentation?

We can set up a call and discuss them: we'll help you solve the problem and you'll help us understand what we need to improve. To do that, share your contact information and select the time.
Yes, I'd like to set up a meeting
 
See also
iOS SDKPayment processDeclined paymentsPayment by 54-FZ