Authoritative state
Verify before fulfillment
/api/v2/payments/verify/{transaction_id}Redirect parameters are customer-controlled navigation data. Verify the transaction server-side, confirm it belongs to the expected order and amount, then perform fulfillment exactly once.
Idempotent fulfillment
In one database transaction, lock or claim the merchant order, record the Moneybag transaction ID and verified state, and apply fulfillment only when it has not already occurred. Repeated redirects, reads, and webhook deliveries must reach the same result without repeating the side effect.
API reference
The public artifact defines the transaction path parameter, the complete verification response fields, and the validation-error response. It does not define polling intervals or a retry schedule.
/api/v2/payments/verify/{transaction_id}Verify Payment
Verify Payment API This endpoint verifies the status of a payment transaction using the transaction ID. It checks the transaction status and returns the result. Args: transaction_id: Unique identifier for the payment transaction payment_service: Service for managing payment transactions payment_session: Service for managing payment sessions Returns: PaymentResponses: Response with payment verification details Raises: HTTPException: If the transaction doesn't exist or has expired
- Operation ID
verify_payment_api_v2_payments_verify__transaction_id__get- Environment
https://sandbox.api.moneybag.com.bd(Moneybag sandbox)- Authentication
X-Merchant-API-Key— Sandbox merchant API key. Live keys are rejected.
Parameters
| Field | Type | Required | Constraints and meaning |
|---|---|---|---|
path.transaction_id | string | Yes | — Transaction ID for the payment |
Request body
No request body.
Sandbox example
Set the merchant key and replace resource identifiers with values created in your sandbox workspace.
curl --request GET "https://sandbox.api.moneybag.com.bd/api/v2/payments/verify/${TRANSACTION_ID}" \
--header "X-Merchant-API-Key: $MONEYBAG_MERCHANT_KEY"Run this reviewed operation in the API Lab →
Responses
200 Successful Response
Content type: application/json. Schema: PaymentResponses.
| Field | Type | Required | Constraints and meaning |
|---|---|---|---|
data | CheckoutResponse | SessionResponse | ProcessResponse | VerificationResponse | InvoiceDetailsResponse | CancelResponse | CheckoutResponse | SessionResponse | ProcessResponse | VerificationResponse | InvoiceDetailsResponse | CancelResponse[] | null | No | — |
data<CheckoutResponse>.checkout_url | string | When parent is present | — |
data<CheckoutResponse>.expires_at | string | When parent is present | — |
data<CheckoutResponse>.session_id | string | When parent is present | — |
data<SessionResponse>.bleeding | boolean | No | default false Whether merchant pays service charges (bleeding) |
data<SessionResponse>.business_name | string | null | No | — |
data<SessionResponse>.currency | string | When parent is present | — |
data<SessionResponse>.customer | object | null | No | — |
data<SessionResponse>.emi_checkout_id | string | null | No | — Selected EMI configuration UUID if pre-selected |
data<SessionResponse>.emi_fee_bleeding | boolean | No | default false Whether merchant pays EMI fees (emi_fee_bleeding) |
data<SessionResponse>.emi_payment_options | object[] | null | No | — EMI payment options with calculations |
data<SessionResponse>.expires_at | string | When parent is present | — |
data<SessionResponse>.merchant_logo | string | null | No | — |
data<SessionResponse>.order_amount | string | When parent is present | pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ |
data<SessionResponse>.order_description | string | null | No | — |
data<SessionResponse>.order_id | string | When parent is present | — |
data<SessionResponse>.payment_options | object[] | When parent is present | — |
data<SessionResponse>.requires_emi | boolean | No | default false Whether EMI payment options are available |
data<SessionResponse>.selected_emi_configuration | SelectedEMIConfiguration | null | No | — Selected EMI configuration with emi_configuration_id, service_id and service_uuid |
data<SessionResponse>.selected_emi_configuration.emi_configuration_id | string | When parent is present | — Selected EMI configuration ID |
data<SessionResponse>.selected_emi_configuration.payment_service_id | integer | string | null | No | — Deprecated alias of service_id, kept for backward compatibility |
data<SessionResponse>.selected_emi_configuration.service_id | integer | null | No | — Internal merchant payment service id, matches payment_options[].service_id |
data<SessionResponse>.selected_emi_configuration.service_uuid | string | null | No | — Public merchant payment service UUID, matches payment_options[].service_uuid |
data<SessionResponse>.session_id | string | When parent is present | — |
data<SessionResponse>.status | string | When parent is present | — |
data<ProcessResponse>.meta | object | null | No | — |
data<ProcessResponse>.redirect_url | string | null | No | format uri; minimum length 1 |
data<ProcessResponse>.transaction_id | string | When parent is present | — |
data<VerificationResponse>.amount | string | When parent is present | pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ |
data<VerificationResponse>.charge_amount | string | When parent is present | pattern ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$ |
data<VerificationResponse>.currency | string | When parent is present | — |
data<VerificationResponse>.customer | Customer | When parent is present | — |
data<VerificationResponse>.customer.address | string | null | No | — Customer's address |
data<VerificationResponse>.customer.city | string | null | No | — Customer's city |
data<VerificationResponse>.customer.country | string | null | No | — Customer's country |
data<VerificationResponse>.customer.email | string | When parent is present | format email Customer's email address |
data<VerificationResponse>.customer.metadata | object | null | No | — Additional customer-specific data |
data<VerificationResponse>.customer.name | string | When parent is present | — Customer's full name |
data<VerificationResponse>.customer.phone | string | When parent is present | — Customer's phone number |
data<VerificationResponse>.customer.postcode | string | null | No | — Customer's postal code |
data<VerificationResponse>.order_id | string | When parent is present | — |
data<VerificationResponse>.payment_method | string | When parent is present | — |
data<VerificationResponse>.payment_reference_id | string | When parent is present | — |
data<VerificationResponse>.status | string | When parent is present | — |
data<VerificationResponse>.transaction_id | string | When parent is present | — |
data<VerificationResponse>.verified | boolean | When parent is present | — |
data<InvoiceDetailsResponse>.all_total | number | When parent is present | — |
data<InvoiceDetailsResponse>.business_name | string | When parent is present | — |
data<InvoiceDetailsResponse>.customer | object | null | When parent is present | — |
data<InvoiceDetailsResponse>.due_date | string | null | When parent is present | — |
data<InvoiceDetailsResponse>.gross_discount | number | When parent is present | — |
data<InvoiceDetailsResponse>.invoice_id | string | When parent is present | — |
data<InvoiceDetailsResponse>.invoice_items | object[] | When parent is present | — |
data<InvoiceDetailsResponse>.invoice_status | string | When parent is present | — |
data<InvoiceDetailsResponse>.invoice_type | string | null | No | — |
data<InvoiceDetailsResponse>.merchant_logo | string | null | No | — |
data<InvoiceDetailsResponse>.payable_amount | number | When parent is present | — |
data<InvoiceDetailsResponse>.uuid | string | When parent is present | — |
data<CancelResponse>.order_id | string | When parent is present | — |
data<CancelResponse>.redirect_url | string | When parent is present | — |
data<CancelResponse>.session_id | string | When parent is present | — |
data<CancelResponse>.status | string | No | default "CANCELLED" |
message | string | null | No | — |
meta | object | null | No | — |
success | boolean | Yes | — |
422 Validation Error
Content type: application/json. Schema: HTTPValidationError.
| Field | Type | Required | Constraints and meaning |
|---|---|---|---|
detail | ValidationError[] | No | — |
detail[].loc | string | integer[] | When parent is present | — |
detail[].msg | string | When parent is present | — |
detail[].type | string | When parent is present | — |