Apple Payments

Endpoints: POST /moneyins/card/webinit/ and POST /direct-payments/xpay/apple/

To view the diagram copy and paste the code on the following site:

Mermaid Live

sequenceDiagram
autonumber
participant PartnerSite as App/Website (Front)
participant Partner as Platform (Server)
participant Lemonway as Lemonway API
participant Apple

PartnerSite-->PartnerSite: Display ApplePay button
Partner->>+Lemonway: MoneyInWebInit
Lemonway-->>-Partner: WebkitToken
PartnerSite-->PartnerSite: Payer chooses Apple Pay
alt Only if using Lemonway Apple Account (OPTION 1)
Partner->>Lemonway: Session Creation with POST /xpay/apple/session
Lemonway-->>Partner: ApplePaymentSessionId
end
PartnerSite->>Apple: Send Payment Request
Apple -->>PartnerSite: Return Apple PaymentData
PartnerSite -->>Partner: Send Apple PaymentData
Partner->>Lemonway: Send Apple Payment Request with POST /xpay/apple
Lemonway->>Partner: TransactionResult (Success or Fail)
Lemonway->>PartnerSite: WebRedirection