# Retrieve Payment Session
This endpoint allows you to retrieve and view information and parameters related to a specific payment, using a session ID
Request example
- Shell
- JavaScript
curl -X GET \
https://api.ompay.com/v1/merchants/w3z8dfhkzvfq0j9n/payment/session/9c22d208-4e25-47f8-8d32-c0e6d97c17c2 \
-H 'authorization: Basic ODZidWQ0Y2JremlxOXZmYzoweHI1ZDkwOHo2bmo4a2h6' \
-H 'content-type: application/json'
}
Response example
{
"id": "4YC5R0FUJN69Q7D8WN6V",
"reference_id": "Y82J4Q7N32DZC70WN6DR",
"state": "captured",
"result": {
"authorisation_code": "999999",
"actions": {
"capture": {
"id": "4YC5R0FUJN69Q7D8WN6V",
"state": "captured",
"code": "0000",
"message": "Approved"
},
"authorization": {
"id": "Y82J4Q7N32DZC70WN6DR",
"state": "authorised",
"code": "0000",
"message": "Approved"
}
},
"code": "0000",
"description": "Approved"
},
"intent": "Sale",
"payer": {
"payment_type": "CC",
"funding_instrument": {
"credit_card": {
"id": "8ba60b72-712d-4afe-9e28-efb62f6cc937",
"type": "Visa",
"expire_month": 6,
"expire_year": 2025,
"name": "AVISH",
"last4": "9996",
"bin": "454347"
}
},
"payer_info": {
"id": "360b6c81-8f69-4a4a-a850-7f5b9d5facf7",
"email": "avish@ompay.com",
"ip": "0.0.0.1",
"name": "Avish Test",
"billing_address": {
"phone": {
"number": "12345678"
},
"line1": "test",
"city": "test",
"country_code": "OM",
"postal_code": "123",
"state": "Shamāl al Bāţinah"
}
}
},
"transaction": {
"amount": {
"currency": "OMR",
"total": "1"
},
"type": "1",
"mode": "1",
"items": [
{
"sku": "30065",
"name": "Test product ",
"quantity": "1",
"unit_price": "0",
"price": "0.1",
"shipping": "0",
"currency": "OMR",
"tangible": true
}
],
"soft_descriptor": {},
"invoice_number": "421278610"
},
"risk_check": true,
"three_d": {},
"create_time": "2023-09-05T10:48:30Z"
}
# Request
# Header parameters
The request require a Basic
authentication in the header. For more information about HTTP request headers, see HTTP request headers.
# Request parameters
Parameter | Type | Description |
---|---|---|
merchant_id required | string | Encrypted Merchant account identifier for the Merchant |
session_id required | guid | Session ID for a particular payment transction |