Verify the payment

You can get invoice-unique-id and orderId with GET method in your website callback URL


  ENDPOINT https://app.paycrypto24.com/api/gateway/request/check/{invoice-unique-id}/{orrderId}
  

GET Parameters

the following parameters that you will receive in your callback URL

NAMEDEFINITION
uuidInvoice unique ID
order_idYour website invoice ID

Examples

All requests must be sent via GET method in JSON format.

Here are some examples of how to communicate with the API:

Javascript

Example of making request in Javascript:

fetch('https://app.paycrypto24.com/api/gateway/request/check/{invoice-unique-id}/{orderId}', {
    method: "GET",
    headers: {
      "Authorization": "Bearer 3|fy5JH4a8 ********** 1C9958f1f1",
      "Accept": "application/json",
      "Content-Type": "application/json"
    },
  })

PHP Laravel Client::HTTP

Example of making request in Laravel client:http package:

use Illuminate\Support\Facades\Http;

$url = "https://app.paycrypto24.com/api/gateway/request/check/{invoice-unique-id}/{orderId}";
$token = "your_bearer_token_here"; // Replace with your actual token

$response = Http::withToken($token)
    ->acceptJson();
    ->get();

if ($response->successful()) {
    return $response->json(); // Return or process the response data
} else {
    return response()->json([
        'error' => 'Request failed',
        'status' => $response->status(),
        'message' => $response->body(),
    ], $response->status());
}

CURL

Example of making request with CURL:

curl -X GET https://app.paycrypto24.com/api/gateway/request/check/{invoice-unique-id}/{orderId} -H "Authorization: Bearer your_bearer_token_here" -H "Accept: application/json" -H "Content-Type: application/json"

Responses

Here are some examples of endpoint response types:

DATASTATUSCODE
`Payment TXID`true200
Invoice status | `pending` - `pending_currency` - `pending_payment` - `expired` - `replaced`false200
`invoice not found`false404
`Unauthenticated.`-401

Examples

Example of responses with json format:

{
  "status": true,
  "data": {
    "txid": "0xbd0d23b20999e15788c5********5793a23c"
  }
}
  
{
  "status": true,
  "data": "expired" // the invoice current status | example : pending - pending_currency - pending_payment - expired - replaced
}

{
  "status": false,
  "data": "not_found" // invoice not found
}

{
  "message": "Unauthenticated." // invalid API key
}