Get withdrawal info

This endpoint is used to get the information and details of a BRL withdrawal. Also it can be used to check the status.

https://api.exchangecopter.com/Withdrawal/Info

GET

import axios from 'axios';

const getWithdrawalInfo = async () => {
  const apiUrl = 'https://api.exchangecopter.com/Withdrawal/Info';

  const queryParams = {
    recipientId: 'DEFAULT', // Always default in this param.
    userId: "your_userId_here",
		withdrawalId: "id that gets back upon using withdrawal endpoint"
  };

  const headers = {
    Authorization: 'Bearer your-token-here', // Replace 'your-token-here' with the actual authentication token
    Accept: 'application/json',
    'Content-Type': 'application/json',
  };

  try {
    const response = await axios.get(apiUrl, {
      params: queryParams,
      headers: headers,
    });
    console.log('API Response:', response.data);
  } catch (error) {
    console.error('API Error:', error);
  }
};

// Example function call
getWithdrawalInfo();


👍

Response 200

{
    "data": {
        "id": "d3278ad1-c151-4a97-af7f-ea2bb4e8b716", // This is the withdrawal ID.
        "code": "TestAPIWLDOPERATION3",
        "amount": 500,
        "status": "CREATED",
        "method": "PIX",
        "createdAt": "2025-09-02T21:57:23.843Z",
        "approvedAt": null,
        "rejectedAt": null,
        "paidAt": null,
        "failedAt": null,
        "failedReason": null,
        "pixKey": "[email protected]",
        "transactionId": null,
        "expectedHolderTaxId": null,
        "receiptUrl": null,
        "recipient": {
            "id": "string",
            "code": "string",
            "name": "string",
            "taxId": null,
            "type": "COMPANY",
            "status": "ACTIVE",
            "createdAt": "2024-09-23T17:17:14.489Z",
            "updatedAt": null,
            "deletedAt": null
        },
        "metadata": {}
    }
}

StatusDescriptionFinal Status
CREATEDIndicates that the payment was received.NO
PROCESSEDIndicates that the payment was processed by provider but needs confirmation.NO
ERRORIndicates that an error has occurred.YES
PAIDIndicates that the payment was confirmed.YES
FAILEDIndicates that the payment was not processed.YES
REFUNDEDIndicates that the payment was refunded (by a medpix, anti-fraud checker or user request)YES

❗️

Response 400 or 500

{
	"data": {
      "message": "There is a problem with the service.",
      "description": error,
   }
}