Endpoint
GET https://pay.sandbox.yabetoopay.com/v1/payment-intents/{id} # Sandbox
GET https://pay.api.yabetoopay.com/v1/payment-intents/{id} # Production
Authentication
Use your secret key in theAuthorization header:
Authorization: Bearer YOUR_SECRET_KEY
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The payment intent ID |
Example Request
curl https://pay.sandbox.yabetoopay.com/v1/payment-intents/pi_XdLeavDjiiaEx2y5nRz0 \
-H "Authorization: Bearer YOUR_SECRET_KEY"
import Yabetoo from "@yabetoo/sdk-js";
const yabetoo = new Yabetoo("YOUR_SECRET_KEY");
const paymentIntent = await yabetoo.payments.retrieve("pi_XdLeavDjiiaEx2y5nRz0");
from yabetoo import Yabetoo
yabetoo = Yabetoo("YOUR_SECRET_KEY")
payment_intent = yabetoo.payments.retrieve("pi_XdLeavDjiiaEx2y5nRz0")
<?php
require 'vendor/autoload.php';
use Yabetoo\Yabetoo;
$yabetoo = new Yabetoo("YOUR_SECRET_KEY");
$paymentIntent = $yabetoo->payments->retrieve("pi_XdLeavDjiiaEx2y5nRz0");
import com.yabetoo.Yabetoo;
import com.yabetoo.YabetooConfig;
import com.yabetoo.model.PaymentIntent;
YabetooConfig config = new YabetooConfig()
.setApiKey("YOUR_SECRET_KEY");
Yabetoo yabetoo = new Yabetoo(config);
PaymentIntent paymentIntent = yabetoo.paymentIntents().retrieve("pi_XdLeavDjiiaEx2y5nRz0");
Response
200 OK
{
"amount": 2000,
"currency": "xaf",
"label": "payment_intent",
"id": "pi_XdLeavDjiiaEx2y5nRz0",
"status": "succeeded",
"client_secret": ""
}
Payment Intent Status
| Status | Description |
|---|---|
requires_payment_method | Waiting for payment method |
requires_confirmation | Waiting for confirmation |
processing | Payment is being processed |
succeeded | Payment completed successfully |
failed | Payment failed |
canceled | Payment was canceled |
404 Not Found
{
"message": "Payment intent not found"
}
401 Unauthorized
{
"error": "Unauthorized"
}