πVerify payout
Last updated
Last updated
After a payout, it's crucial to confirm that the transaction was processed through Moneroo before crediting value to your customer wallet or balance in your application. This precaution ensures the payment received aligns with your expectations.
Here are some key points to verify during the payment confirmation:
Transaction Reference: Confirm that the transaction reference corresponds with the one you generated.
Transaction Status: Check the transaction status for accuracy. The status should be "success" for successful payments. To learn more about transaction statuses, see the transaction status section.
Payment Currency: Verify that the payment's currency matches the expected currency.
Paid Amount: Ensure the paid amount is equal to or greater than the anticipated amount. If the amount is higher, you can provide the customer with the corresponding value and refund the surplus.
To authenticate a payment, use the "verify transaction" endpoint, specifying the transaction ID in the URL. You can obtain the transaction ID from the data.id
field in the response after transaction creation, as well as in the webhook payload for any transaction.
Endpoint: /v1/payouts/{payoutId}/verify
Method: GET
Name | Type | Required | Description |
---|---|---|---|
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 an HTTP status code of 200 and the details of the payment transaction in the response body.
Error Responses:
401 Unauthorized: This error is returned if you didn't provide a valid authorization token in your request.
404 Not Found: This error is returned if the provided payoutId
doesn't correspond to any transaction in the system.
500 Internal Server Error: This error indicates an unexpected issue on the server while processing your request. It happens rarely.
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.
Replace 'paymentId'
with the actual payment transaction ID and 'your_token'
with a valid API key in the code snippets above.
You'll get a response that looks like this:
The transaction details are contained in the data
object. For instance:
The status of the transaction is in data.status
.
The details of the customer are in the data.customer
field.
The data.amount
field says how much the customer was charged.
Some fields will vary depending on the type of transaction or state of the transaction.
The data.method
field contains the payment method used by the customer.
The data.gateway
field contains the payment gateway used to process the transaction.
The data.metadata
field contains any custom metadata you may have provided when creating the transaction.
The data.context
field contains the context of the transaction.
The data.app
field contains the app details.
Field Name | Description |
---|---|
payoutId
String
Yes
The unique ID of the payout transaction to verify.
id
The public ID of the transaction.
status
The status of the transaction.
is_processed
Indicates whether the transaction is processed.
processed_at
The time when the transaction was processed.
amount
The amount involved in the transaction.
currency
The currency used in the transaction.
amount_formatted
The formatted amount involved in the transaction.
description
The description of the transaction.
return_url
The URL to return to after the transaction.
environment
The environment in which the transaction occurred.
initiated_at
The time when the transaction was initiated.
checkout_url
The URL to checkout the transaction.
app
The app associated with the transaction.
customer
The customer associated with the transaction.
method
The payment method associated with the transaction.
gateway
The payment gateway associated with the transaction.
metadata
The metadata associated with the transaction.
context
The context associated with the transaction.