Note: For testing webhooks, you can use https://webhook.site/. This service provides a unique URL to capture and inspect incoming HTTP requests, making it ideal for debugging and verifying your webhook integrations.
/api/processing/checkoutThis endpoint initiates the checkout process for Money-Go transactions. The functionality differs based on the role of the user:
(Deposit).(Sell Funds).Important Notes:
Signature Generation: The signature must be generated in a strict order and encrypted using the SHA-256 algorithm. It is crucial to follow the specified sequence exactly to ensure the signature is valid.
Wallet Currencies: The currencies of both the sender’s and receiver’s wallets must be identical. Any mismatch in currencies will cause the transaction to fail.
Transaction Limits: The minimum and maximum transaction amounts depend on the currency. Contact our managers to determine the exact limits for each currency.
Wallet Verification: Use the CHECK wallet! method to verify that the wallet you are interacting with exists and is active before proceeding with the transaction.
Unique User Info:
Always provide a unique value in the user_info field. This uniquely identifies the user involved in the transaction and helps prevent duplicate or fraudulent requests.
Recipient Wallets: The recipient’s wallet must not be the same as the sender’s wallet and must belong to a different user. This ensures that funds are not inadvertently transferred within the same account.
Before initiating a payment, follow these steps:
wallet_to (as a string)wallet_from (as a string)amount (as a string)id (as a string)secret (as a string) Use token for the form/api/processing/checkout endpoint to create the payment URL.
Example requestExample responseAfter the user completes the payment, the system performs two key actions:
status_url field. This webhook includes details about the transaction status (e.g., “SUCCESS”, “CANCEL”, “PENDING”, or “FAIL”) along with other relevant payment information. This enables your application to automatically receive updates about the payment status without manual checks.
Example webhook
Note: For testing webhooks, you can use https://webhook.site/. This service provides a unique URL to capture and inspect incoming HTTP requests, making it ideal for debugging and verifying your webhook integrations.
success_url.cancel_url.{ "wallet_to": "WALLET_TO_NUMBER", "wallet_from": "WALLET_FROM_NUMBER", "amount": "1.01", "id": "1511834a-v103mv31", "secret": "TOKEN_FOR_THE_FORM"}#!/bin/bash
# Define the JSON data for signature generation.jsonData='{ "wallet_to": "WALLET_TO_NUMBER", "wallet_from": "WALLET_FROM_NUMBER", "amount": "1.01", "id": "1511834a-v103mv31", "secret": "TOKEN_FOR_THE_FORM"}'
# Generate the SHA-256 signature using openssl.# The echo -n flag ensures no extra newline is added.signature=$(echo -n "$jsonData" | openssl dgst -sha256 | awk '{print $2}')
# Print the generated signature for verification.echo "Generated Signature: $signature"
# Use cURL to send a POST request to the checkout endpoint, including the generated signature.curl -X POST "https://api.money-go.com/api/processing/checkout" \-H "Content-Type: application/json" \-d '{ "wallet_to": "WALLET_TO_NUMBER", "wallet_from": "WALLET_FROM_NUMBER", "amount": "1.01", "id": "1511834a-v103mv31", "signature": "'"$signature"'", "success_url": "https://example.com/success", "cancel_url": "https://example.com/cancel", "status_url": "https://example.com/webhook", "user_info": "UNIQUE_USER_VALUE",}'<?php $data = [ 'wallet_to' => $this->walletToNumber, 'wallet_from' => $this->walletFromNumber, 'amount' => (string)$this->amount, 'id' => $this->id, 'secret' => $this->secret, ];
$signature = hash('sha256', json_encode($data)); return $signature;import * as crypto from 'crypto';
interface Signature { wallet_to: string; wallet_from: string; amount: string; id: string; secret: string;}
const data: Signature = { wallet_to: "WALLET_TO_NUMBER", wallet_from: "WALLET_FROM_NUMBER", amount: "1.0", id: "1511834a-v103mv31", secret: "TOKEN_FOR_THE_FORM"};
const jsonData: string = JSON.stringify(data);const hash: string = crypto.createHash('sha256').update(jsonData).digest('hex');
console.log("Signature:", hash);POSThttps://api.money-go.com/api/processing/checkoutContent-Type: application/jsonThe following JSON body must be sent with the POST request to the /api/processing/checkout endpoint:
{ "wallet_to": "WALLET_NUMBER", "wallet_from": "WALLET_NUMBER", "amount": "1", "id": "YOUR_PAYMENT_ID", "signature": "SIGNATURE", "success_url": "https://example.com/success", "cancel_url": "https://example.com/cancel", "status_url": "https://example.com/webhook", "user_info": "UNIQUE_USER_VALUE"}| Field | Type | Description |
|---|---|---|
| wallet_to | string | The destination wallet number. |
| wallet_from | string | The sender’s wallet number. |
| amount | string | The transaction amount, represented as a string (e.g., "1"). |
| id | string | A unique identifier for the payment transaction. |
| signature | string | The SHA-256 signature generated from the transaction data. |
| success_url | string | The URL to redirect the user upon successful payment. |
| cancel_url | string | The URL to redirect the user if the payment is cancelled. |
| status_url | string | The webhook URL where the API will send status updates for the transaction. POST |
| user_info | string | A unique value to identify the user, ensuring that the request is associated with a specific user. |
A successful response (HTTP 200) will return a JSON object with the following structure:
{ "status": true, "data": { "url": "https://money-go.com/ru/processing-pay/5d344f714bd0cacbc79a01286bc73e", "expired_at": "2021-02-25 13:20:32" }}| Field | Type | Description |
|---|---|---|
| status | boolean | Indicates whether the request was successful. |
| data | object | Contains additional information about the payment. |
| Field | Type | Description |
|---|---|---|
| url | string | The URL for the payment operation. The user is redirected here to complete payment. |
| expired_at | string | The expiration date and time for the payment URL (format: YYYY-MM-DD HH:MM:SS). |
Method: POST
After sending the checkout request, the API responds with a JSON object that contains details for the payment operation. In addition, a webhook will be sent to the status_url provided in your request. This webhook provides updates on the status of the payment operation.
{ "payment_id": "YOUR_PAY_ID", "signature": "b4ce1ec6293b8b99546c7dbf754fe5d0e6a50a2a6d0dffe36c470986f9b638b2", "transaction_id": 1010, "wallet_from": "U127056", "wallet_to": "U155332", "currency_to": "USD", "currency_from": "USD", "amount": 1, "commission": 0, "status": "PENDING", "cancel": false}| Field | Type | Description |
|---|---|---|
| payment_id | string | The unique identifier for the payment. |
| signature | string | The SHA-256 hash signature of the payment data. |
| transaction_id | number | The unique identifier for the transaction. |
| wallet_from | string | The sender’s wallet number. |
| wallet_to | string | The recipient’s wallet number. |
| currency_to | string | The currency code for the recipient’s wallet (e.g., “USD”). |
| currency_from | string | The currency code for the sender’s wallet (e.g., “USD”). |
| amount | number | The transaction amount. |
| commission | number | The commission charged for the transaction. |
| status | string | The current status of the transaction. Possible values: “CANCEL”, “FAIL”, “PENDING”, or “SUCCESS”. |
| cancel | boolean | Indicates whether the transaction was cancelled (true) or not (false). |
When a POST request is made to the processing checkout endpoint, the API may return error responses with HTTP status code 422 if any validation fails. Below is a table summarizing the possible error responses:
| Error Code | Error Message | Description |
|---|---|---|
| 422 | Order id is not unique | The provided order ID is not unique. Ensure that the order ID used in the request has not been used before. |
| 422 | This value should not be blank. | A required field (such as amount or wallet_to) is missing a value. |
| 422 | Wallet to not exists | The destination wallet (wallet_to) does not exist or is inactive (e.g., deleted or in status NEW) or insufficient balance. |
| 422 | Wallet from not exists | The sender wallet (wallet_from) does not exist or is inactive (e.g., deleted or in status NEW) or insufficient balance. |
| 422 | This value should be of type numeric. | The amount field must be numeric; non-numeric values are not allowed. |
| 422 | Signature not identical | The signature is missing or does not match the expected value. The signature must be generated in the correct sequence using SHA-256. |
| 422 | Minimum amount exceeded %min% for %currency% | The transaction amount is below the allowed minimum for the specified currency. |
| 422 | Maximum amount exceeded %max% for %currency% | The transaction amount is above the allowed maximum for the specified currency. |
| 422 | Amount is not correct | The sender’s wallet does not have sufficient funds (i.e., the amount exceeds the available balance). |
| 422 | Currencies are not equals | The currencies of the sender (wallet_from) and receiver (wallet_to) wallets do not match. |
| 422 | Currency is disabled | The specified currency is currently disabled and cannot be used for transactions. |
| 422 | Direction not active | The direction for the specified currency is not active at the moment |
| 422 | User is blocked | The recipient’s or sender’s account has been blocked. Please check the “translation” field for more details ("server_error.sender_account_is_blocked" or "server_error.recipient_account_is_blocked"). |
For wallet top-up via POST /api/processing/pay, the following errors may occur:
| Code | Error Message | Description |
|---|---|---|
| 422 | Route locked to avoid duplication | The endpoint was called twice simultaneously. The second call is blocked to prevent duplicate processing. |
| 422 | Method locked please try again later | The number of requests per minute has been exceeded. The request limit is enforced; please try again later. |
| 422 | Captcha string | A captcha validation error occurred. |
| 422 | Hash is not valid | Hash validation error. This can occur if the hash is not empty and a stored hash exists (indicating the user has already completed the checkout), or if the sender’s wallet (wallet_from) owner does not match the provided hash. |
| 422 | Deposit your wallet, you not have funds | The sender’s wallet (wallet_from) does not have sufficient funds to complete the transaction. |