Webhooks
Our webhooks are notifications about events happening on Pike's side. Pike sends webhooks to inform you of the results of your operations, ask for confirmation, or alert you about actions you need to take.
How to get webhooks
To start getting webhooks, do the following:
- In your system, create an address at which you want to receive the webhooks.
- Inform your Pike manager of this address.
To stop using the webhooks, inform your manager of your decision.
If you choose not to receive our webhooks, use the session/status method to get the payment session status.
What to send in response
You are expected to send the 200 HTTP code in response to any webhook.
If Pike receives a 4** or 5** code or no response, Pike will resend the webhook as follows:
- the webhook will be resent repeatedly at intervals of increasing length (up to 15 minutes)
- approximately after 30 minutes Pike will stop resending the webhook
Additional fields may be added to the webhook payload over time, depending on the payment methods used. Make sure that your service can handle them without failure.
action_required
Pike sends you this webhook when you or your users need to carry out certain actions to proceed with the operation. For example, the user might need to go through 3D Secure authentication when paying via a bank card.
The maximum waiting time for an action is 60 minutes. If the action does not occur within this time, the operation will automatically be completed with the
canceledstatus.
Parameters
| Name | Mandatory | Type | Description |
|---|---|---|---|
type | + | string | Webhook type: action_required |
session | + | object | Payment session |
Examples
- API v1
- API v2
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "action_required",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"acquiring_payments": [{
"id": "pm_1313",
"status": "pending",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference":"user@test.ru"
},
"payment_details": {
"type": "card",
"card": {
"brand": "visa",
"last4": "8801",
"bin":"444600"
}
},
"amount_details": {
"amount": 15000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"customer_interaction": {
"type": "redirect",
"redirect": {
"url": "https://pikepayments.com?foo=bar",
"base_url": "https://pikepayments.com",
"method": "POST",
"qs": {
"foo": "bar"
},
"params": {
"PaReq": "sdfew^//asdhbv",
"MD": "abc75daefnn"
}
}
}
}]
}
}'
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "action_required",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payment_list": [{
"id": "pm_1313",
"status": "pending",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference":"user@test.ru"
},
"payment_details": {
"type": "card",
"card": {
"brand": "visa",
"last4": "8801",
"bin":"444600"
}
},
"amount_details": {
"amount": 15000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"customer_interaction": {
"type": "redirect",
"redirect": {
"url": "https://pikepayments.com?foo=bar",
"base_url": "https://pikepayments.com",
"method": "POST",
"qs": {
"foo": "bar"
},
"params": {
"PaReq": "sdfew^//asdhbv",
"MD": "abc75daefnn"
}
}
}
}]
}
}'
payment_finished
You receive this webhook when Pike has completed an operation. The webhook body contains all the details of the operation, including its final status (in the status field). For example, if you are sending a payout and have received the succeeded status in this webhook, it means that the payout has been completed successfully.
Parameters
| Name | Mandatory | Type | Description |
|---|---|---|---|
type | + | string | Webhook type: payment_finished |
session | + | object | Payment session |
Examples
- API v1
- API v2
- Payout
- Payment
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_finished",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payments": [{
"id": "po_1234",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_method": {
"type": "bank_account",
"bank_account": {
"system_type": "ru",
"ru": {
"bic": "*******02",
"account": "****************5734",
"full_name": "***",
"description": "*****",
"is_fast": false
}
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
}
}]
}
}'
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_finished",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"acquiring_payments": [{
"id": "po_1234",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_details": {
"type": "bank_account",
"bank_account": {
"system_type": "ru",
"ru": {
"bic": "*******02",
"account": "****************5734",
"full_name": "***",
"description": "*****",
"is_fast": false
}
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
}
}]
}
}'
- Payout
- Payment
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_finished",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payout_list": [{
"id": "po_1234",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payout_details": {
"type": "bank_account",
"bank_account": {
"system_type": "ru",
"ru": {
"bic": "*******02",
"account": "****************5734",
"full_name": "***",
"description": "*****",
"is_fast": false
}
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
}
}]
}
}'
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "payment_finished",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payment_list": [{
"id": "po_1234",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_details": {
"type": "bank_account",
"bank_account": {
"system_type": "ru",
"ru": {
"bic": "*******02",
"account": "****************5734",
"full_name": "***",
"description": "*****",
"is_fast": false
}
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
}
}]
}
}'
payment_refunded
Pike sends you this webhook after performing a refund. It contains information on the payment session, including all the details about the refund.
The webhook is sent in the following cases:
- if the refund was made using the
session/refundmethod - within the chargeback procedure
If the refund was made as part of the chargeback procedure, the
refundsarray will contain"is_chargeback": true.
Parameters
| Name | Mandatory | Type | Description |
|---|---|---|---|
type | + | string | Webhook type: payment_refunded |
session | + | object | Payment session |
Examples
- API v1
- API v2
- Payout
- Payment
curl - X POST \
https: //partner.ru \
-H 'Content-Type: application/json' \ -
-H 'X-PARTNER-SIGN: signature' \ -
-d '{
"type": "payment_refunded",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payments": [{
"id": "pm_2705",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "lucky"
},
"payment_method": {
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"bin":"444600"
}
},
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"metadata": "good",
"refunds": [{
"id": "rf_203",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"is_chargeback": true,
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
}
}]
}]
}
}'
curl - X POST \
https: //partner.ru \
-H 'Content-Type: application/json' \ -
-H 'X-PARTNER-SIGN: signature' \ -
-d '{
"type": "payment_refunded",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"acquiring_payments": [{
"id": "pm_2705",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "lucky"
},
"payment_details": {
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"bin":"444600"
}
},
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"metadata": "good",
"refunds": [{
"id": "rf_203",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"is_chargeback": true,
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
}
}]
}]
}
}'
- Payout
- Payment
curl - X POST \
https: //partner.ru \
-H 'Content-Type: application/json' \ -
-H 'X-PARTNER-SIGN: signature' \ -
-d '{
"type": "payment_refunded",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payout_list": [{
"id": "pm_2705",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "lucky"
},
"payout_details": {
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"bin":"444600"
}
},
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"metadata": "good",
"refunds": [{
"id": "rf_203",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"is_chargeback": true,
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
}
}]
}]
}
}'
curl - X POST \
https: //partner.ru \
-H 'Content-Type: application/json' \ -
-H 'X-PARTNER-SIGN: signature' \ -
-d '{
"type": "payment_refunded",
"session": {
"id": "ps_3230",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"payment_list": [{
"id": "pm_2705",
"status": "succeeded",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "lucky"
},
"payment_details": {
"type": "card",
"card": {
"brand": "visa",
"last4": "4242",
"bin":"444600"
}
},
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
},
"metadata": "good",
"refunds": [{
"id": "rf_203",
"status": "accepted",
"created_at": "2024-05-27T02:03:00.000000Z",
"finished_at": "2024-05-27T02:03:00.000000Z",
"is_chargeback": true,
"amount_details": {
"amount": 1000,
"currency": "rub"
},
"transaction_info": {
"rrn": "425307614918",
"auth_code": "057441"
}
}]
}]
}
}'
ready_to_capture
Pike sends you this webhook after placing a hold on money in case of delayed capture payments. To debit the money, send a session/capture request. To cancel the payment, send a session/cancel request.
Parameters
| Name | Mandatory | Type | Description |
|---|---|---|---|
type | + | string | Webhook type: ready_to_capture |
session | + | object | Payment session |
Examples
- API v1
- API v2
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "ready_to_capture",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"next_action": "capture",
"acquiring_payments": [{
"id": "pm_1313",
"status": "pending",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_details": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa"
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"metadata": "good"
}]
}
}'
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "ready_to_capture",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"next_action": "capture",
"payment_list": [{
"id": "pm_1313",
"status": "pending",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_details": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa"
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"metadata": "good"
}]
}
}'
ready_to_confirm
You receive this webhook when Pike is ready to perform an operation. You need to check the operation parameters and either confirm the operation by sending a session/confirm request or cancel the operation by sending a session/cancel request to Pike.
The maximum waiting time for a confirmation is 240 minutes. If no confirmation is received within this time, the operation will automatically be completed with the
canceledstatus.
For your convenience, you can use automatic payment session confirmation, when you are not required to get a ready_to_confirm webhook and then confirm it. To set up the automatic payment session confirmation, apply to your manager.
Parameters
| Name | Mandatory | Type | Description |
|---|---|---|---|
type | + | string | Webhook type: ready_to_confirm |
session | + | object | Payment session |
Examples
- API v1
- API v2
- Payout
- Payment
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "ready_to_confirm",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"next_action": "confirm",
"payments": [{
"id": "po_1234",
"status": "pending",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_method": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa"
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"metadata": "good"
}]
}
}'
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "ready_to_confirm",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"next_action": "confirm",
"acquiring_payments": [{
"id": "pm_1313",
"status": "pending",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_details": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa"
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"metadata": "good"
}]
}
}'
- Payout
- Payment
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "ready_to_confirm",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"next_action": "confirm",
"payout_list": [{
"id": "po_1234",
"status": "pending",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payout_details": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa"
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"metadata": "good"
}]
}
}'
curl -X POST \
https://partner.ru \
-H 'Content-Type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "ready_to_confirm",
"session": {
"id": "ps_3230",
"status": "in_progress",
"created_at": "2024-05-27T02:03:00.000000Z",
"updated_at": "2024-05-27T02:03:00.000000Z",
"next_action": "confirm",
"payment_list": [{
"id": "pm_1313",
"status": "pending",
"created_at": "2024-05-27T02:03:00.000000Z",
"customer": {
"reference": "user123",
"contacts": [{
"email": "user@gmail.com"
}]
},
"payment_details": {
"type": "card",
"card": {
"last4": "4242",
"brand": "visa"
}
},
"amount_details": {
"amount": 10000,
"currency": "rub"
},
"amounts": {
"fee": {
"merchant_fee": {
"amount": 10,
"currency": "RUB"
}
}
},
"metadata": "good"
}]
}
}'