🇷🇺 RU: AlfaPay - Payments

📘

"paymentMethodName": "AlfaPay"


Payment Method Features

Payment MethodAlfaPay
CountryRussia
Processing CurrenciesRUS
PaymentsYes
-- Min per transaction amountVary, depends on your contract
-- Max per transaction amountVary, depends on your contract
RefundsFull & Partial
-- Full RefundYes
-- Partial RefundYes
-- Multiple Partial RefundsYes
ChargebacksNo

Possible Payment Scenarios:

Our API will provide you with all the necessary information to execute on of the following scenarios:

Name

Steps

Payment via AlfaPay Link

  1. The client creates a payment request via the API.
  2. The system creates the payment and returns a AlfaPay Payment Link.
  3. The client provides the payment link to the payer (for example, via a button, link, QR).
  4. The payer opens the URL.
  5. Alfa Bank attempts to open a compatible Alfa Bank application on the payer’s device using deeplink fallback mechanism.
  6. If a compatible banking application is found, the payer is redirected to it; otherwise, the payer is redirected to the Alfa Bank landing page.
  7. The payer completes the payment.
  8. The system updates the payment status
  9. The system sends a callback with the final payment status to the client.

Workflow: Payment & Refund

Download in high resolution


Section “Payment Order Creation”

[Step 1.3] You need to create a new intent

  • Use the following API method to create an intent: POST /processing/api/v1/intents.
  • When creating the intent, complete the Payment object.
  • Most fields are common across all payment methods and are thoroughly described in the API Reference section.
  • Method-specific parameters ( please make sure you provided them correctly):
    • "paymentMethodName": "AlfaPay" ← always “AlfaPay” for this method

    • "incomingDetails":

      {
      	"redirectUrl": "url"
      }
  • Ensure these all the required fields are completed accurately so that we can process your request correctly.

Request Example

{
  "clientReferenceId": "1234",
  "payments": [
    {
      "paymentInstrument": {
        "paymentMethodName": "AlfaPay",
        "incomingDetails": {
          "redirectUrl": "url"
        }
      },
      "description": "Purchase description",
      "webhookUrl": "webhookUrl",
      "submittedAmount": {
        "value": 100.05,
        "currency": "RUB"
      },
      "authCurrencyCode": "RUB"
    }
  ]
}

Fileds Description

Field Path

Type

Scenario AlfaPay

Description

clientReferenceId

String

Required

payments

Array_of_objects

Required

payments[].payer

Object

Optional

payments[].paymentInstrument

Object

Required

payments[].paymentInstrument.paymentMethodName

String

Required

Always "AlfaPay" for this method

payments[].paymentInstrument.incomingDetails

Object

Required

Configuration details that are required for the selected Payment Method

payments[].paymentInstrument.incomingDetails.redirectUrl

String

Required

URL to which the payer is redirected after a successful payment attempt

payments[].paymentInstrument.incomingDetails.failureUrl

String

Optional

URL to which the payer is redirected after a failed or cancelled payment attempt

payments[].paymentInstrument.incomingDetails.sessionTimeoutMin

Integer

Optional

The validity period of the payment order, expressed in minutes.

If not provided, the default lifetime of 20 minutes is applied.

Maximum allowed value is not limited

payments[].submittedAmount

Object

Required

payments[].submittedAmount.value

Number

Required

payments[].submittedAmount.currency

String

Required

payments[].authCurrencyCode

String

Required

payments[].webhookUrl

String

Required

description

String

Optional


[Step 1.5] Return the link in response

  • In the response, you will receive an additional object payments.additionalData. It contains the following fields:
    • url – a payment link

Response Example

{
  "intentId": "232510340021612544",
  "payments": [
    {
      "id": "232510340646563840",
      "submittedAmount": {
        "value": 100.05,
        "currency": "RUB"
      },
      "authAmount": {
	      "value": 100.05,
        "currency": "RUB"
      },
      "paymentInstrument": {
        "id": "PI204264628196626432",
        "paymentMethodId": "PM199507277233246209",
        "paymentMethodName": "AlfaPay"
      },
      "status": "ACCEPTED",
      "additionalData": {
        "url": "string",
      } 
    }
  ],
  "disbursements": [],
  "clientReferenceIntentId": "123456789",
  "paymentCreationErrors": [],
  "disbursementCreationErrors": [],
  "intentStatus": "CREATED"
}

Section “Payment / Expiration”

[2.5] Receive the webhook with the transaction status

🔗

More about Payment Callbacks on the dedicated page

  • After the transaction was processed and reached its final status (CAPTURED or DECLINED)
  • The Platform will notify you about the latest status change via the callback

Section "REFUNDS"

📘
  • Refunds cannot exceed the total value of confirmed transactions for the current day.

[Step 5.1] Send a Refund Request

  • To initiate the refund (full or partial) to the payer's original payment instrument, you must send a separate Refund request.
  • Use the following endpoint: Create Refund inside existing Intent and specify the following parameters:

Field

Type

Required

Description

paymentId

int64

Yes

You must to let us know what payment transaction this refund must be linked to. Input here the ID of a Payment transaction your received during the Intent Creation

partial

boolean

Optional

  • true - for partial refunds. If the refund is partial, then you need to specify the amount and currency
  • fasle - for full refunds. You don't need to specify the amount. If the filed is not specified at all, the platform will try to issue the refund for the full available amount

amount

object

Optional

-- value

number

Optional

-- currency

string

Optional

If the payment involved FX and there two currencies involved, then you can use any these two currencies here. There is no difference between currencies, because we will use the historical rate that was used during the payment processing and the payer will receive the exact amount they spent.

reason

string

Optional

webhookUrl

string

Optional

  • After the creation of the refund request you must wait for the callback, that will provide you with the latest transaction status

Test Data

Our system allows emulating different test cases in the sandbox environment. To simulate specific scenarios and receive different results, use the intent.description parameter.

SBP Payment Test flow

Download in high resolution


SINGLE-STAGE (SS) AUTHORISATION FLOW CASES

List of Test Scenarios

NoCaseintent.descriptionfinal paymentStatus
SS_1Successful payment--CAPTURED
SS_2Link preparation (or sending for Push) errorLinkCreationErrorERROR
SS_3Declined paymentFailedAuthorizationDECLINED
SS_4Expired payment linkExpiredLinkDECLINED

Step-by-Step Scenario Description

No

Case

Steps

SS_1

Successful payment

  1. You send a request to create a new Intent.
  2. You receive a successful response confirming the Intent and Payment creation, along with a payment link.
  3. Our platform emulates a successful payment completion by the payer.
  4. The system waits for 5 seconds.
  5. You receive a webhook notifying you that the payment status has changed into CAPTURED.

SS_2

Link preparation error

  1. You send a request to create a new Intent.
  2. You receive a successful response confirming the Intent and Payment creation, however the creation link error occurred
  3. You receive a webhook notifying you that the payment status has changed into ERROR.

SS_3

Declined payment

  1. You send a request to create a new Intent.
  2. You receive a successful response confirming the Intent and Payment creation, along with a payment link.
  3. Our platform emulates exceeding the maximum number of unsuccessful payment attempts by the payer.
  4. The system waits for 5 seconds.
  5. You receive a webhook notifying you that the payment status has changed into DECLINED.

SS_4

Expired payment link

  1. You send a request to create a new Intent.
  2. You receive a successful response confirming the Intent and Payment creation, along with a payment link.
  3. Our platform emulates a case when the link is expired without payment.
  • The system waits for 5 seconds.

  • You receive a webhook notifying you that the payment status has changed into DECLINED.