> For the complete documentation index, see [llms.txt](https://docs.a-pay.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.a-pay.one/api-documentation/api-integration/deposit/deposit-activation.md).

# Deposit Activation

Some payment systems also provide activation of deposits. In simple words, 2 more actions are added to the request processing.

## Deposit activation

> For payment system that require payment activation

```json
{"openapi":"3.0.3","info":{"title":"A-Pay","version":"1.0.0"},"tags":[{"name":"Deposit","description":"Deposits"}],"servers":[{"url":"https://<domain>"}],"security":[{"apikey":[]}],"components":{"securitySchemes":{"apikey":{"type":"apiKey","name":"apikey","in":"header"}},"schemas":{"unauthorized_error":{"title":"Unauthorized","required":["success","message","code"],"properties":{"success":{"type":"boolean","description":"`false` if an error occurred"},"message":{"type":"string","default":"unauthorized","description":"Invalid credentials"},"code":{"type":"number","description":"Error code in the A-Pay system"}}}}},"paths":{"/Remotes/deposit-activate":{"post":{"tags":["Deposit"],"summary":"Deposit activation","operationId":"DepositActivation","description":"For payment system that require payment activation","parameters":[{"in":"query","name":"project_id","schema":{"type":"number"},"description":"Project ID in the A-Pay system","required":true},{"in":"query","name":"order_id","schema":{"type":"string"},"description":"Deposit ID in the A-Pay system","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["payment_system","data"],"properties":{"payment_system":{"type":"string","enum":["banistmo_p2p","bcgeneral_p2p","bkash_a","bkash_b","bkash_p2p","brou_p2p","d17_l","easypaisa_l","esewa_p2p","etb_p2p","flouci_l","imepay_l","imps","inr_p2p","ipay_l","itau_p2p","jazzcash_l","kbzpay_p2p","khalti_l","lynk_p2p","mercado_ars_p2p","nayapay_l","paytm","phonepe","scotiabank_p2p","tap_p2p","upi_p2p","wavepay_l","wing_l","yape_pen_p2p","yappy_p2p"],"description":"Name of the payment system in A-Pay"},"data":{"description":"Data depending on the specific payment system","anyOf":[{"description":"Banistmo P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":8,"minimum":8,"pattern":"^[0-9]{8}$","type":"string"}},"required":["key"],"title":"banistmo_p2p","type":"object"},{"description":"Bcgeneral P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":14,"minimum":10,"pattern":"^[0-9]{10,14}$","type":"string"}},"required":["key"],"title":"bcgeneral_p2p","type":"object"},{"description":"BKash_a data (empty)\n\nFor example: `\"data\": {}`","title":"bkash_a","type":"object"},{"description":"BKash_b data (empty)\n\nFor example: `\"data\": {}`","title":"bkash_b","type":"object"},{"description":"Bkash P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":10,"minimum":10,"pattern":"^[A-Za-z]{2}[0-9A-Za-z]{8}$","type":"string"}},"required":["key"],"title":"bkash_p2p","type":"object"},{"description":"BROU P2P data","properties":{"key":{"description":"The last 10 digits of the activation code (Transaction ID) received from the user","maximum":10,"minimum":10,"pattern":"^[0-9]{10}$","type":"string"}},"required":["key"],"title":"brou_p2p","type":"object"},{"description":"D17_l data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":6,"minimum":6,"pattern":"^[0-9]{6}$","type":"string"}},"required":["key"],"title":"d17_l","type":"object"},{"properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":22,"minimum":1,"pattern":"^[0-9]{1,22}$","type":"string"}},"required":["key"],"title":"easypaisa_l"},{"description":"eSewa P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":11,"minimum":7,"pattern":"^[0-9A-Za-z]{7,11}$","type":"string"}},"required":["key"],"title":"esewa_p2p","type":"object"},{"description":"ETB P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":10,"minimum":6,"pattern":"^[0-9A-Z]{6,10}$","type":"string"}},"required":["key"],"title":"etb_p2p","type":"object"},{"description":"Flouci L data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":10,"minimum":6,"pattern":"^[0-9A-Z]{6,10}$","type":"string"}},"required":["key"],"title":"flouci_l","type":"object"},{"description":"ImePay L data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":18,"minimum":18,"pattern":"^[0-9]{18}$","type":"string"}},"required":["key"],"title":"imepay_l","type":"object"},{"description":"Imps data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":22,"minimum":1,"pattern":"^[0-9]{1,22}$","type":"string"}},"required":["key"],"title":"imps","type":"object"},{"description":"INR-p2p data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":22,"minimum":1,"pattern":"^[0-9]{1,22}$","type":"string"}},"required":["key"],"title":"inr_p2p","type":"object"},{"description":"Ipai_l data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","pattern":"^[0-9]+$","type":"string"}},"required":["key"],"title":"ipay_l","type":"object"},{"description":"Itau p2p data","properties":{"key":{"description":"Identificador de la transacción (Número de comprobante)","maximum":10,"minimum":6,"pattern":"^[0-9]{6,10}$","type":"string"}},"required":["key"],"title":"itau_p2p","type":"object"},{"description":"Jazzcash-l data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":22,"minimum":1,"pattern":"^[0-9]{1,22}$","type":"string"}},"required":["key"],"title":"jazzcash_l","type":"object"},{"description":"KBZpay P2P data","properties":{"key":{"description":"The last 7 digits of the activation code (Transaction No) received from the user","maximum":7,"minimum":7,"pattern":"^[0-9]{7}$","type":"string"}},"required":["key"],"title":"kbzpay_p2p","type":"object"},{"description":"Khalti_l data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":12,"minimum":8,"pattern":"^[A-Za-z0-9]{8,12}","type":"string"}},"required":["key"],"title":"khalti_l","type":"object"},{"description":"Lynk P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":21,"minimum":2,"pattern":"^#[0-9]{1,20}$","type":"string"}},"required":["key"],"title":"lynk_p2p","type":"object"},{"description":"MercadoPago P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":22,"minimum":10,"pattern":"^[0-9]{10,22}$","type":"string"}},"required":["key"],"title":"mercado_ars_p2p","type":"object"},{"description":"Nayapay_l data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":50,"minimum":1,"pattern":"^[0-9a-z]{1,50}$","type":"string"}},"required":["key"],"title":"nayapay_l","type":"object"},{"description":"PayTM data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":22,"minimum":1,"pattern":"^[0-9]{1,22}$","type":"string"}},"required":["key"],"title":"paytm","type":"object"},{"description":"PhonePe data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":22,"minimum":1,"pattern":"^[0-9]{1,22}$","type":"string"}},"required":["key"],"title":"phonepe","type":"object"},{"description":"Scotiabank data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":8,"minimum":8,"pattern":"^[0-9A-Za-z]{8}$","type":"string"}},"required":["key"],"title":"scotiabank_p2p","type":"object"},{"description":"Tap P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":14,"minimum":14,"pattern":"^[cC]{1}[0-9a-zA-Z]{13}$","type":"string"}},"required":["key"],"title":"tap_p2p","type":"object"},{"description":"UPI p2p data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":22,"minimum":1,"pattern":"^[0-9]{1,22}$","type":"string"}},"required":["key"],"title":"upi_p2p","type":"object"},{"description":"Wavepay_l data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":22,"minimum":1,"pattern":"^[0-9]{1,22}$","type":"string"}},"required":["key"],"title":"wavepay_l","type":"object"},{"description":"Wing_l data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":20,"minimum":1,"pattern":"^[0-9A-Z]{1,20}$","type":"string"}},"required":["key"],"title":"wing_l","type":"object"},{"description":"Yape Pen P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":8,"minimum":8,"pattern":"^[0-9A-Za-z]{8}$","type":"string"}},"required":["key"],"title":"yape_pen_p2p","type":"object"},{"description":"Yappy P2P data","properties":{"key":{"description":"A code on which activation is performed (Transaction ID), received from the user","maximum":20,"minimum":10,"pattern":"^#?(?=.{10,20}$)[A-Za-z]+-?[0-9]+$","type":"string"}},"required":["key"],"title":"yappy_p2p","type":"object"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"title":"Success","required":["success","order_id"],"properties":{"success":{"type":"boolean","description":"`true` if there are no errors"},"order_id":{"type":"string","description":"Deposit ID in the A-Pay system"},"message":{"type":"string","description":"Description of error"},"code":{"type":"number","description":"Error code in the A-Pay system"},"data":{"type":"object","description":"Payment system specific data"}}},{"title":"Error","required":["success","message","code"],"properties":{"success":{"type":"boolean","description":"`false` if an error occurred"},"message":{"type":"string","description":"Description of error"},"code":{"type":"number","description":"Error code in the A-Pay system"},"order_id":{"type":"string","description":"Deposit ID in the A-Pay system"}}}]}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"oneOf":[{"title":"transaction failed","description":"transaction_failed","required":["success","message","code","order_id"],"properties":{"success":{"type":"boolean","description":"`false` if an error occurred"},"message":{"description":"Failed to activate transaction","default":"transaction_failed"},"status":{"type":"string","enum":["Failed"],"description":"Deposit status"},"code":{"type":"number","description":"Error code in the A-Pay system"},"order_id":{"type":"string","description":"Deposit ID in the A-Pay system"}}},{"title":"payment system data is not valid","description":"payment system data is not valid","required":["success","message","code"],"properties":{"success":{"type":"boolean","description":"`false` if an error occurred"},"message":{"description":"Validation error in field `data`","default":"payment system data is not valid"},"status":{"type":"string","enum":["Failed"],"description":"Deposit status"},"code":{"type":"number","description":"Error code in the A-Pay system"}}},{"title":"required field missing","description":"required field missing","required":["success","message","code"],"properties":{"success":{"type":"boolean","description":"`false` if an error occurred"},"message":{"description":"Validation error in request body or parameters","default":"required field missing"},"status":{"type":"string","enum":["Failed"],"description":"Deposit status"},"code":{"type":"number","description":"Error code in the A-Pay system"}}},{"title":"invalid payment system","description":"invalid payment system","required":["success","message","code"],"properties":{"success":{"type":"boolean","description":"`false` if an error occurred"},"message":{"description":"Payment system does not support activation","default":"invalid payment system"},"status":{"type":"string","enum":["Failed"],"description":"Deposit status"},"code":{"type":"number","description":"Error code in the A-Pay system"}}},{"title":"user already activated this transaction","description":"user already activated this transaction","required":["success","message","code"],"properties":{"success":{"type":"boolean","description":"`false` if an error occurred"},"message":{"description":"User already activated this transaction","default":"user already activated this transaction"},"status":{"type":"string","enum":["Failed"],"description":"Deposit status"},"code":{"type":"number","description":"Error code in the A-Pay system"}}},{"title":"transaction already activated by another user","description":"transaction already activated by another user","required":["success","message","code"],"properties":{"success":{"type":"boolean","description":"`false` if an error occurred"},"message":{"description":"Transaction already activated by another user","default":"transaction already activated by another user"},"status":{"type":"string","enum":["Failed"],"description":"Deposit status"},"code":{"type":"number","description":"Error code in the A-Pay system"}}}]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/unauthorized_error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","title":"Transaction was not found","properties":{"success":{"type":"boolean","default":false},"code":{"type":"integer","default":404},"message":{"type":"string","default":"invalid order","description":"Transaction was not found"}},"required":["code","error","success","message"]}}}}}}}}}
```

A perfect example of a payment system that provides for activation is upi\_p2p. Let's analyze an example of request processing and activation:

1. We see that activation is required for this PS in [Request to create a deposit](/api-documentation/api-integration/deposit/request-to-create-a-deposit.md).
2. [Here](https://api.a-pay.one/#tag/Deposit/operation/DepositActivation) we can see that in this PS A-pay sends the UPI address parameter to the client after processing the request. In this case, it means that A-pay sends the address to which the user needs to transfer money in Responses.
3. After the user has transferred money, he must activate his deposit. It transmits the necessary information to the client server. For upi\_p2p this is the Transaction ID (UTR). The client server sends to A-pay an activation request, in which certain data is transmitted. After that, A-pay processes the activation request and responds to the client with success or failure, depending on the situation.

**Examples of the responses:**

{% code title="Success" %}

```json
{
  "success": true,
  "order_id": "7fa13dbc3b79e05e",
  "data": {
    "verify_otp": true,
    "require_new_otp": false
  }
}
```

{% endcode %}

{% code title="Error" %}

```json
{
  "success": false,
  "message": "Invalid request",
  "code": 400,
  "order_id": "7fa13dbc3b79e05e"
}
```

{% endcode %}
