Skip to main content

Retrieve a PaymentIntent

Retrieve a PaymentIntent resource by ID.

A PaymentIntent can be retrieved from the client side using a public API key when the client_secret is passed via query string.


Endpoint

GET /payment_intents/:id

Sample code

const client = require('payrex-node')('insert your PayRex Secret API key.');

const paymentIntent = await client.paymentIntents.retrieve('<ID of a payment intent resource>');

Parameters

client_secret REQUIRED IF YOU USE A PUBLIC KEY.

The client secret of the PaymentIntent. This attribute is required if you authenticate with the endpoint using your public key. This endpoint is used by PayRexJS using the public key.

Returns

Returns a PaymentIntent resource.