πTransaction verification
After initiating a payment, you should confirm that the transaction was processed through Monero before crediting/debiting your customer in your application. This step ensures that the payment aligns with your expectations.
Here are some key points to verify during the payment confirmation:
Confirm the Transaction Reference: Ensure that the transaction reference matches the one you generated.
Check the Transaction Status: Verify the transaction status is marked as
success
for successful payments. For more information on transaction statuses, refer to the Transaction Status Section.Verify the Currency: Confirm that the payment's currency matches the expected currency.
Ensure Correct Payment Amount: Check that the paid amount is equal to or greater than the anticipated amount. If the amount is higher, provide the customer with the corresponding value and refund the surplus.
To authenticate a payment, use the verify transaction
endpoint. Specify the transaction ID in the URL. You can obtain the transaction ID from the data.id
field in the response after creating a transaction, as well as from the webhook payload for any transaction.
Request
Parameters
Endpoint:
/v1/payments/{paymentId}/verify
Method:
GET
Name | Type | Required | Description |
---|---|---|---|
| String | Yes | The unique ID of the payment transaction to verify. |
Response Structure
The response from this API endpoint will be in the standard Moneroo API response format. You'll get a response that looks like this:
Successful Response:
Upon successful retrieval, the endpoint returns a HTTP status code of 200, and the details of the payment transaction in the response body.
Error Responses:
If there's an issue with your request, the API will return an error response. The type of error response depends on the nature of the issue. Check out our response format page for more information.
Security considerations
This endpoint requires a bearer token for authentication. The bearer token must be included in the Authorization
header of the request. Ensure the token is kept secure and not shared or exposed inappropriately.
Request examples
Please replace 'paymentId'
with the actual payment transaction ID and 'your_token'
with your valid authorization token in the code snippets above.
Response example
You'll get a response that looks like this:
The transaction details are contained in the data object. For instance:
id
: A unique identifier for the payment transaction.status
: The current status of the transaction (success
,pending
,failed
).is_processed
: A boolean value indicating whether the transaction has been mark as processed.processed_at
: A timestamp of when the transaction was processed.null
if not processed yet.amount
: The total amount of the transaction.currency
: An object containing details of the currency used for the transaction.amount_formatted
: A string representing the formatted amount of the transaction.description
: A brief description of the payment transaction.return_url
: The URL where the user will be redirected post-transaction.environment
: Indicates the environment where the transaction was processed (sandbox
orlive
).capture
: An object detailing specifics details about payment transaction (method
,gateway
,context
)initiated_at
: The timestamp when the transaction was initiated.metadata
: An object that stores additional information passed along with the transaction.app
: An object containing information about the application through which the transaction was made.
Transaction object
Field Name | Description |
---|---|
| The public ID of the transaction. |
| The status of the transaction. |
| Indicates whether the transaction is processed. |
| The time when the transaction was processed. |
| The amount involved in the transaction. |
| The currency used in the transaction. |
| The formatted amount involved in the transaction. |
| The description of the transaction. |
| The URL to return to after the transaction. |
| The environment in which the transaction occurred. |
| The time when the transaction was initiated. |
| The URL to checkout the transaction. |
| The phone number associated with the payment method. |
| The app associated with the transaction. |
| The customer associated with the transaction. |
| The payment method associated with the transaction. |
| The payment gateway associated with the transaction. |
| The metadata associated with the transaction. |
| The context associated with the transaction. |
capture
Object:
Field Name | Description |
---|---|
| A unique identifier for the payment capture. |
| The exchange rate applied to the transaction, if any. Null if not applied. |
| The formatted string of the applied exchange rate. Null if not applied. |
| Any correction to the initial rate that was applied. Null if not applied. |
| The phone number associated with the payment method. |
| A message detailing any failure that occurred during capture. Null if none. |
| The error code associated with the failure, if any. Null if no error. |
| The type of error encountered during capture, if any. Null if no error. |
| Additional metadata related to the capture process. |
| The amount that was captured. |
| The formatted amount that was captured according to the currency rules. |
| A nested object detailing the currency used in the capture. |
| A nested object describing the payment method used for capture. |
| A nested object with details about the payment gateway used. |
| A nested object containing contextual details about the transaction. |
Last updated