YaPay API 0.3.1 Help

Providers

Providers are payment systems with which merchants can collaborate. Any merchant can provide providers validation URL and before each transaction processing Aggregator will send request to this endpoint with list of providers so merchant can choose which providers will be available for each specific client. Also, right before creating transaction Aggregator can call transaction validation URL, so merchant can check if client is allowed to make such transaction, including if he can use chosen provider. All those endpoints description is written below.

Supported providers

Please contact us to get the full list of supported providers.

Available providers validation

  • POST providers validation URL (specified by merchant)

    • Description: Get providers available for specific client.

    • Request:

      { "transactionData": { "merchantData": { "merchantHash": "string", "clientId": "string", "additionalData": {} }, "paymentData": { "nonce": "string", "amount": decimal, "currency": "string", "providerId": int }, "cashIn": bool }, "providers": [ { "id": int, "name": "string" } ] }
      • merchantData.clientId - unique identifier for each merchant's client.

      • merchantData.additionalData - any data that you put during payment initialization

      • providers - list of available providers.

      • provider.id - provider identifier.

      • provider.name - provider name.

      • currencies - list of currencies available for that provider.

      • currency.id - currency identifier.

      • currency.code - ISO-code of that currency.

    • Expected response from merchant service:

      { "providers": [ { "id": int } ] }
      • id - provider identifier.

    • Error Response:

      { "message": "string" }

Transaction validation

  • POST transaction validation URL (specified by merchant)

    • Description: validate client availability to make such transaction.

    • Request:

      { "merchantData": { "merchantHash": "string", "clientId": "string", "additionalData": {} }, "paymentData": { "nonce": "string", "amount": decimal, "currency": "string", "providerId": int }, "providerData": {}, "validationId": long }
      • merchantData - object that contains data to identify merchant and its' client.

      • merchantHash - GUID placed in string. Its' value is provided for each merchant individually, so this will always be used as a constant.

      • clientData - object that contains data to identify and correlate merchant's client with payment system's client. Its' value could be any object, but it has to be unique for each merchant's client. For example, it could be object that contains client identifier.

      • providerData - object that contains data needed for provider to process transaction.

      • amount - decimal value that describes amount of money that will be deposited or withdrawn.

      • currency - string that contains ISO-code of currency that will be deposited or withdrawn.

      • nonce - string with unique transaction stamp. This data is needed to identify transaction and prevent multiple transaction processing in case of multiple triggering the same transaction by merchant.

      • providerId - Id of payment system partner.

      • validationId - identifier of current validation operation.

    • Expected HTTP response status code:

      • 200 - client is allowed to make such transaction (for immediate validation).

      • 200 - validation request was created on your side (for postponed validation). Then, YaPay will be waiting for validation result. To proceed validation result - call Postponed validation endpoint, described below.

      • 403 - client is not allowed to make such transaction.

    • Error Response:

      { "message": "string" }

Postponed validation

If merchant needs transaction validation to be postponed, validation endpoint can be determined as Awaitable and when transaction will finally be validated on merchant's side, merchant can send callback to signalize YaPay about validation result. To perform this - send request to according endpoint.

  • POST https://{gateway-api-base-url}/api/v1/transactions/validation

    • Description: postponed validation of client availability to make such transaction.

    • Expected request:

      { "validationId": long, "success": bool }
      • validationId - identifier of current validation operation.

      • success - boolean value that determines if user was validated successfully to perform transaction.

    • HTTP response status code:

      • 200 - validation result was received.

      • 403 - validation result was already received with different status.

    • Error Response:

      { "message": "string" }
Last modified: 21 April 2025