Skip to main content

Retrieve Payment Intent

Retrieves the details of an existing payment intent.

Endpoint

GET /v1/payment-intents/:intentId

Authentication

Requires API key authentication.

Path Parameters

ParameterTypeRequiredDescription
intentIdstringYesThe ID of the payment intent to retrieve

Request Example

curl https://api.finternet.com/v1/payment-intents/intent_2xYz9AbC123 \
-H "X-API-Key: sk_test_your_key_here"

Response

Returns a payment intent object if valid and accessible.

{
"id": "intent_2xYz9AbC123",
"object": "payment_intent",
"status": "SUCCEEDED",
"data": {
"id": "intent_2xYz9AbC123",
"merchantId": "merchant_abc123",
"status": "SUCCEEDED",
"amount": "1000.00",
"currency": "USDC",
"type": "DELIVERY_VS_PAYMENT",
"settlementMethod": "OFF_RAMP_MOCK",
"settlementDestination": "9876543210",
"settlementStatus": "IN_PROGRESS",
"contractAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f42318",
"transactionHash": "0xabc123...",
"chainId": 11155111,
"signerAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f42318",
"phases": [
{
"phase": "SIGNATURE_VERIFICATION",
"status": "COMPLETED",
"completedAt": 1704067200
},
{
"phase": "BLOCKCHAIN_CONFIRMATION",
"status": "COMPLETED",
"completedAt": 1704067260
},
{
"phase": "ESCROW_LOCKED",
"status": "COMPLETED",
"completedAt": 1704067320
},
{
"phase": "SETTLEMENT",
"status": "IN_PROGRESS",
"startedAt": 1704067380
}
],
"metadata": {
"orderId": "ORD-123",
"customerId": "CUST-456"
},
"created": 1704067200,
"updated": 1704067380
},
"created": 1704067200,
"updated": 1704067380
}

Response Fields

FieldTypeDescription
idstringUnique identifier for the payment intent
statusstringCurrent status (see Status Lifecycle)
amountstringPayment amount as a decimal string
currencystringCurrency code (e.g., USDC)
typestringPayment type (DELIVERY_VS_PAYMENT or CONDITIONAL)
settlementMethodstringSettlement method (e.g., OFF_RAMP_MOCK)
settlementDestinationstringDestination for settlement (bank account, etc.)
settlementStatusstringCurrent settlement status
contractAddressstringSmart contract address (if applicable)
transactionHashstringBlockchain transaction hash
chainIdintegerBlockchain chain ID
signerAddressstringAddress that signed the payment
phasesarrayArray of payment phases with status
metadataobjectCustom metadata associated with the payment
createdintegerUnix timestamp of creation
updatedintegerUnix timestamp of last update

Public Endpoint

For frontend integration, use the public endpoint (no authentication required):

GET /v1/payment-intents/public/:intentId

This endpoint returns the same data but doesn't require API key authentication. Use it when displaying payment information to end users.

Error Responses

Payment Intent Not Found

{
"error": {
"code": "resource_missing",
"message": "Payment intent not found: intent_2xYz9AbC123",
"type": "invalid_request_error"
}
}

Status Code: 404 Not Found

Access Denied

{
"error": {
"code": "forbidden",
"message": "You do not have access to this payment intent",
"type": "authentication_error"
}
}

Status Code: 403 Forbidden

This occurs when you try to access a payment intent that belongs to another merchant.

Code Examples

JavaScript/TypeScript

const response = await fetch(
`https://api.finternet.com/v1/payment-intents/${intentId}`,
{
headers: {
'X-API-Key': process.env.FINTERNET_API_KEY,
},
}
);

const paymentIntent = await response.json();
console.log(paymentIntent.data.status);

Python

import requests

response = requests.get(
f'https://api.finternet.com/v1/payment-intents/{intent_id}',
headers={'X-API-Key': os.environ['FINTERNET_API_KEY']}
)

payment_intent = response.json()
print(payment_intent['data']['status'])

cURL

curl https://api.finternet.com/v1/payment-intents/intent_2xYz9AbC123 \
-H "X-API-Key: sk_test_your_key_here"