Retrieve Payment by Merchant Order ID

This request enables you to retrieve details of payments based on their merchant_order_id, which needs to be provided in the request path.

transactions in this response is an array containing every transaction of the payment. In webhook payloads the same field name carries a single object — the transaction that triggered the event — with the full list under transactions_history. See Webhook object and examples.

GET/payments

Query Parameters

merchant_order_idstringrequired

The unique identifier of the customer’s order.

Response

200

idstring
account_idstring
descriptionstring
countrystring
statusstring
sub_statusstring
merchant_order_idstring
created_atstring
updated_atstring
amountobject
Show amount properties
capturedinteger
currencystring
refundedinteger
valueinteger
checkoutobject
Show checkout properties
sessionstring
sdk_action_requiredboolean
payment_methodobject
Show payment_method properties
vaulted_tokenstring
typestring
vault_on_successboolean
tokenstring
payment_method_detailobject
Show payment_method_detail properties
bank_transferobject
Show bank_transfer properties
provider_imagestring
account_typeany
bank_namestring
beneficiary_namestring
bank_accountstring
bank_account_2any
beneficiary_document_typestring
beneficiary_documentstring
payment_instructionany
redirect_urlstring
bank_account_mask_numberstring

Masked bank account number associated with the bank transfer (for example, ****6789). This is account data, not mandate data.

mandateobject

Direct debit mandate details, for bank transfer methods that operate with mandates (for example, ACH, SEPA, BACS, PAD).

Show mandate properties
idstring

Mandate identifier, as provided by the payment provider.

infostring

Free-text mandate information.

received_statusstring

Provider status indicating whether the mandate was received. Forwarded as provided by the payment provider.

existing_statusstring

Provider status of the existing mandate. Forwarded as provided by the payment provider.

created_atstring<date-time>

Date and time when the mandate was created (ISO 8601).

updated_atstring<date-time>

Date and time when the mandate was last updated (ISO 8601).

customer_payerobject
Show customer_payer properties
idstring
merchant_customer_idstring
first_namestring
last_namestring
genderstring
date_of_birthstring
emailstring
nationalitystring
ip_addressstring
device_fingerprintany
browser_infoobject
Show browser_info properties
user_agentstring
accept_headerstring
accept_contentany
accept_browserany
color_depthstring
screen_heightstring
screen_widthstring
javascript_enabledany
java_enabledany
browser_time_differenceany
languagestring
documentobject
Show document properties
document_typestring
document_numberstring
phoneobject
Show phone properties
numberstring
country_codestring
billing_addressobject
Show billing_address properties
address_line_1string
address_line_2string
countrystring
statestring
citystring
zip_codestring
shipping_addressobject
Show shipping_address properties
address_line_1string
address_line_2string
countrystring
statestring
citystring
zip_codestring
additional_dataany
taxesany
transactionsobject[]
Show transactions properties
idstring
typestring
statusstring
categorystring
amountinteger
provider_idstring
payment_methodobject
Show payment_method properties
vaulted_tokenstring
typestring
vault_on_successboolean
tokenstring
detailobject
Show detail properties
bank_transferobject
Show bank_transfer properties
provider_imagestring
account_typeany
bank_namestring
beneficiary_namestring
bank_accountstring
bank_account_2any
beneficiary_document_typestring
beneficiary_documentstring
payment_instructionany
redirect_urlstring
bank_account_mask_numberstring

Masked bank account number associated with the bank transfer (for example, ****6789). This is account data, not mandate data.

mandateobject

Direct debit mandate details, for bank transfer methods that operate with mandates (for example, ACH, SEPA, BACS, PAD).

Show mandate properties
idstring

Mandate identifier, as provided by the payment provider.

infostring

Free-text mandate information.

received_statusstring

Provider status indicating whether the mandate was received. Forwarded as provided by the payment provider.

existing_statusstring

Provider status of the existing mandate. Forwarded as provided by the payment provider.

created_atstring<date-time>

Date and time when the mandate was created (ISO 8601).

updated_atstring<date-time>

Date and time when the mandate was last updated (ISO 8601).

response_codestring
response_messagestring
reasonany
descriptionstring
merchant_referenceany
provider_dataobject
Show provider_data properties
idstring
transaction_idstring
account_idstring
statusstring
status_detailstring
response_codestring
response_messagestring
iso8583_response_codestring
iso8583_response_messagestring
raw_requestobject

Obfuscated copy of the request WHITELABEL sent to the provider. Only returned for allowlisted organizations.

raw_responseobject
Show raw_response properties
dataobject
Show data properties
amount_in_centsinteger
bill_idany
billing_dataany
created_atstring
currencystring
customer_dataany
customer_emailstring
finalized_atany
idstring
payment_link_idany
payment_methodobject
Show payment_method properties
extraobject
Show extra properties
is_three_dsboolean
payment_descriptionstring
sandbox_statusstring
typestring
user_typestring
payment_method_typestring
payment_source_idany
redirect_urlstring
referencestring
shipping_addressany
statusstring
status_messageany
taxesany[]
metaobject
third_party_transaction_idstring
three_d_secure_action_requiredany
created_atstring
updated_atstring
splitany[]
callback_urlstring
workflowstring
metadataany[]
plan_idstring

The subscription’s plan when this payment was created. Present only on payments created with subscription.plan_id and on their renewals; absent otherwise.

plan_assigned_atstring<date-time>

When the plan was assigned to the subscription (UTC, ISO 8601). Present only on payments that carry plan_id.

400

codestring
messagesstring[]

401

codestring
messagesstring[]

403

codestring
messagesstring[]
Request
curl -X GET "https://api-sandbox.whitelabel.com/v1/payments?merchant_order_id=<merchant_order_id>" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>"
Response
[
  {
    "id": "e3f397ed-b7d0-4816-ab75-8457b0a30ec1",
    "account_id": "493e9374-510a-4201-9e09-de669d75f256",
    "description": "Test Bank of America",
    "country": "US",
    "status": "READY_TO_PAY",
    "sub_status": "CREATED",
    "merchant_order_id": "0000022",
    "created_at": "2023-07-20T17:24:58.900553Z",
    "updated_at": "2023-07-20T17:25:13.447662Z",
    "amount": {
      "captured": 0,
      "currency": "USD",
      "refunded": 0,
      "value": 52000
    },
    "checkout": {
      "session": "954dc216-60ff-4ae4-a299-c603b93bd267",
      "sdk_action_required": true
    },
    "payment_method": {
      "vaulted_token": "",
      "type": "BANK_TRANSFER",
      "vault_on_success": false,
      "token": "2cd31999-e44e-4de3-bbe4-179981ff4295",
      "payment_method_detail": {
        "bank_transfer": {
          "provider_image": "",
          "account_type": null,
          "bank_name": "Bank of America",
          "beneficiary_name": "John Doe",
          "bank_account": "123456789",
          "bank_account_2": null,
          "beneficiary_document_type": "SSN",
          "beneficiary_document": "123-45-6789",
          "payment_instruction": null,
          "redirect_url": "https://api-sandbox.wompi.co/v1/payment_methods/redirect/bank_transfer?transferCode=52xB9jF695TdDvHK-approved",
          "bank_account_mask_number": "string",
          "mandate": {
            "id": "string",
            "info": "string",
            "received_status": "string",
            "existing_status": "string",
            "created_at": "1970-01-01T00:00:00.000Z",
            "updated_at": "1970-01-01T00:00:00.000Z"
          }
        }
      }
    },
    "customer_payer": {
      "id": "cfae0941-7234-427a-a739-ef4fce966c79",
      "merchant_customer_id": "1689873883",
      "first_name": "John",
      "last_name": "Doe",
      "gender": "M",
      "date_of_birth": "1990-02-28",
      "email": "johndoe@example.com",
      "nationality": "US",
      "ip_address": "192.0.2.1",
      "device_fingerprint": null,
      "browser_info": {
        "user_agent": "",
        "accept_header": "",
        "accept_content": null,
        "accept_browser": null,
        "color_depth": "",
        "screen_height": "",
        "screen_width": "",
        "javascript_enabled": null,
        "java_enabled": null,
        "browser_time_difference": null,
        "language": ""
      },
      "document": {
        "document_type": "SSN",
        "document_number": "123-45-6789"
      },
      "phone": {
        "number": "5551234567",
        "country_code": "1"
      },
      "billing_address": {
        "address_line_1": "123 Main St",
        "address_line_2": "Apt 4B",
        "country": "US",
        "state": "California",
        "city": "Los Angeles",
        "zip_code": "90001"
      },
      "shipping_address": {
        "address_line_1": "123 Main St",
        "address_line_2": "Apt 4B",
        "country": "US",
        "state": "California",
        "city": "Los Angeles",
        "zip_code": "90001"
      }
    },
    "additional_data": null,
    "taxes": null,
    "transactions": [
      {
        "id": "09135cb9-159c-4662-8fe3-da5523bb2266",
        "type": "PURCHASE",
        "status": "SUCCEEDED",
        "category": "BANK_TRANSFER",
        "amount": 52000,
        "provider_id": "BANK_OF_AMERICA",
        "payment_method": {
          "vaulted_token": "",
          "type": "BANK_TRANSFER",
          "vault_on_success": false,
          "token": "2cd31999-e44e-4de3-bbe4-179981ff4295",
          "detail": {
            "bank_transfer": {
              "provider_image": "",
              "account_type": null,
              "bank_name": "Bank of America",
              "beneficiary_name": "John Doe",
              "bank_account": "123456789",
              "bank_account_2": null,
              "beneficiary_document_type": "SSN",
              "beneficiary_document": "123-45-6789",
              "payment_instruction": null,
              "redirect_url": "https://api-sandbox.wompi.co/v1/payment_methods/redirect/bank_transfer?transferCode=52xB9jF695TdDvHK-approved",
              "bank_account_mask_number": null,
              "mandate": null
            }
          }
        },
        "response_code": "SUCCEEDED",
        "response_message": "Transaction successful",
        "reason": null,
        "description": "Test Bank of America",
        "merchant_reference": null,
        "provider_data": {
          "id": "BANK_OF_AMERICA",
          "transaction_id": "117490-1689873907-17347",
          "account_id": "",
          "status": "APPROVED",
          "status_detail": "",
          "response_code": "",
          "response_message": "",
          "iso8583_response_code": "00",
          "iso8583_response_message": "Approved or completed successfully",
          "raw_request": {},
          "raw_response": {
            "data": {
              "amount_in_cents": 5200000,
              "bill_id": null,
              "billing_data": null,
              "created_at": "2023-07-20T17:25:07.167Z",
              "currency": "USD",
              "customer_data": null,
              "customer_email": "johndoe@example.com",
              "finalized_at": null,
              "id": "117490-1689873907-17347",
              "payment_link_id": null,
              "payment_method": null,
              "payment_method_type": "BANK_TRANSFER",
              "payment_source_id": null,
              "redirect_url": "https://google.com/?checkoutSession=954dc216-60ff-4ae4-a299-c603b93bd267",
              "reference": "09135cb9-159c-4662-8fe3-da5523bb2266",
              "shipping_address": null,
              "status": "PENDING",
              "status_message": null,
              "taxes": null
            },
            "meta": {}
          },
          "third_party_transaction_id": ""
        },
        "three_d_secure_action_required": null,
        "created_at": "2023-07-20T17:25:05.410687Z",
        "updated_at": "2023-07-20T17:25:11.472652Z"
      }
    ],
    "split": [
      null
    ],
    "callback_url": "https://whitelabel.com/?checkoutSession=954dc216-60ff-4ae4-a299-c603b93bd267",
    "workflow": "SDK_CHECKOUT",
    "metadata": [
      null
    ],
    "plan_id": "string",
    "plan_assigned_at": "1970-01-01T00:00:00.000Z"
  }
]