🇷🇺 RU: AlfaPay - Payments
"paymentMethodName": "AlfaPay"
Payment Method Features
| Payment Method | AlfaPay |
|---|---|
| Country | Russia |
| Processing Currencies | RUS |
| Payments | Yes |
| -- Min per transaction amount | Vary, depends on your contract |
| -- Max per transaction amount | Vary, depends on your contract |
| Refunds | Full & Partial |
| -- Full Refund | Yes |
| -- Partial Refund | Yes |
| -- Multiple Partial Refunds | Yes |
| Chargebacks | No |
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 |
|
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
Paymentobject. - 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
| Type | Scenario AlfaPay | Description |
|---|---|---|---|
| String |
| |
| Array_of_objects |
| |
| Object |
| |
| Object |
| |
| String |
| Always "AlfaPay" for this method |
| Object |
| Configuration details that are required for the selected Payment Method |
| String |
| URL to which the payer is redirected after a successful payment attempt |
| String |
| URL to which the payer is redirected after a failed or cancelled payment attempt |
| Integer |
| 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 |
| Object |
| |
| Number |
| |
| String |
| |
| String |
| |
| String |
| |
| String |
|
[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 |
|
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
| No | Case | intent.description | final paymentStatus |
|---|---|---|---|
| SS_1 | Successful payment | -- | CAPTURED |
| SS_2 | Link preparation (or sending for Push) error | LinkCreationError | ERROR |
| SS_3 | Declined payment | FailedAuthorization | DECLINED |
| SS_4 | Expired payment link | ExpiredLink | DECLINED |
Step-by-Step Scenario Description
No | Case | Steps |
|---|---|---|
SS_1 | Successful payment |
|
SS_2 | Link preparation error |
|
SS_3 | Declined payment |
|
SS_4 | Expired payment link |
|
Updated about 2 hours ago
