Skip to content

GET Payment Status

https://api.magmaonepay.com/v1/payment/:payment_token

Retrieve Payment Transaction Details

This guide helps you to understand how to retrieve payment transaction details that were previously initialized using API.

Using the Endpoint

To use this endpoint, replace the :payment_token in the endpoint URL with the unique payment token assigned to the transaction during the payment initialization process.

Response Information

The API will return a JSON response containing the details of the payment transaction, including but not limited to the following information:

  • The amount of the payment
  • The currency in which the payment was made
  • The current status of the payment transaction
  • The payment method used for the transaction
  • The unique reference for the payment transaction assigned by the payment gateway or processor
  • Any custom fields or additional information provided by the merchant
  • A URL for processing the payment if required by the payment method

Usage

This endpoint can be used to retrieve the status of a payment transaction and to reconcile the payment with your own internal records. It is useful when you need to verify transaction details or handle any disputes or customer inquiries regarding the transaction.

Remember to handle all sensitive information returned from this endpoint with care to ensure the privacy and security of your customers.

HEADERS

AuthorizationBearer TOKEN

NB: TOKEN is your private secret key dependant on your mode (live or test) for server-side

PATH VARIABLES

payment_tokenpayment_token

Example Request

curl


curl --location 'https://api.magmaonepay.com/v1/payment/payment_token' \
--header 'Authorization: Bearer TOKEN'

Example Response

Body
json
{
    "code": 200,
    "message": "OK",
    "data": {
        "payment_token": "73351d2a-c2bd-4d7c-8f1a-35ddbe9bd606",
        "created_at": "2024-06-04 00:12:55",
        "updated_at": "2024-06-04 00:36:01",
        "success_at": null,
        "merchant_transaction_id": "97e1ab54-871-11ee-b9d1-0242ac12000s3ss",
        "amount": "10000",
        "currency": "XOF",
        "description": "Payment description",
        "payee": "+2250759423253",
        "payee_first_name": "john",
        "payee_last_name": "doe",
        "payment_method": "ORANGE_CI",
        "payment_processing_reference": null,
        "custom_field": "any_string",
        "payment_status": "failed",
        "payment_status_code": "300",
        "payment_status_message": "FAILED"
    }
}
Headers (1)

Content-Type        application/json