Get detailed information about a specific payment.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const payment = await client.payments.retrieve('payment_id');
console.log(payment.brand_id);
{
"billing": {
"city": "<string>",
"country": "AF",
"state": "<string>",
"street": "<string>",
"zipcode": "<string>"
},
"brand_id": "<string>",
"business_id": "<string>",
"card_issuing_country": null,
"card_last_four": "<string>",
"card_network": "<string>",
"card_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer": {
"customer_id": "<string>",
"email": "<string>",
"name": "<string>"
},
"digital_products_delivered": true,
"discount_id": "<string>",
"disputes": [
{
"amount": "<string>",
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"dispute_id": "<string>",
"dispute_stage": "pre_dispute",
"dispute_status": "dispute_opened",
"payment_id": "<string>",
"remarks": "<string>"
}
],
"error_code": "<string>",
"error_message": "<string>",
"metadata": {},
"payment_id": "<string>",
"payment_link": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>",
"product_cart": [
{
"product_id": "<string>",
"quantity": 1
}
],
"refunds": [
{
"amount": 123,
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": null,
"is_partial": true,
"payment_id": "<string>",
"reason": "<string>",
"refund_id": "<string>",
"status": "succeeded"
}
],
"settlement_amount": 123,
"settlement_currency": "AED",
"settlement_tax": 123,
"status": null,
"subscription_id": "<string>",
"tax": 123,
"total_amount": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Payment Id
The response is of type object
.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const payment = await client.payments.retrieve('payment_id');
console.log(payment.brand_id);
{
"billing": {
"city": "<string>",
"country": "AF",
"state": "<string>",
"street": "<string>",
"zipcode": "<string>"
},
"brand_id": "<string>",
"business_id": "<string>",
"card_issuing_country": null,
"card_last_four": "<string>",
"card_network": "<string>",
"card_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer": {
"customer_id": "<string>",
"email": "<string>",
"name": "<string>"
},
"digital_products_delivered": true,
"discount_id": "<string>",
"disputes": [
{
"amount": "<string>",
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"dispute_id": "<string>",
"dispute_stage": "pre_dispute",
"dispute_status": "dispute_opened",
"payment_id": "<string>",
"remarks": "<string>"
}
],
"error_code": "<string>",
"error_message": "<string>",
"metadata": {},
"payment_id": "<string>",
"payment_link": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>",
"product_cart": [
{
"product_id": "<string>",
"quantity": 1
}
],
"refunds": [
{
"amount": 123,
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": null,
"is_partial": true,
"payment_id": "<string>",
"reason": "<string>",
"refund_id": "<string>",
"status": "succeeded"
}
],
"settlement_amount": 123,
"settlement_currency": "AED",
"settlement_tax": 123,
"status": null,
"subscription_id": "<string>",
"tax": 123,
"total_amount": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
Get detailed information about a specific payment.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const payment = await client.payments.retrieve('payment_id');
console.log(payment.brand_id);
{
"billing": {
"city": "<string>",
"country": "AF",
"state": "<string>",
"street": "<string>",
"zipcode": "<string>"
},
"brand_id": "<string>",
"business_id": "<string>",
"card_issuing_country": null,
"card_last_four": "<string>",
"card_network": "<string>",
"card_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer": {
"customer_id": "<string>",
"email": "<string>",
"name": "<string>"
},
"digital_products_delivered": true,
"discount_id": "<string>",
"disputes": [
{
"amount": "<string>",
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"dispute_id": "<string>",
"dispute_stage": "pre_dispute",
"dispute_status": "dispute_opened",
"payment_id": "<string>",
"remarks": "<string>"
}
],
"error_code": "<string>",
"error_message": "<string>",
"metadata": {},
"payment_id": "<string>",
"payment_link": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>",
"product_cart": [
{
"product_id": "<string>",
"quantity": 1
}
],
"refunds": [
{
"amount": 123,
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": null,
"is_partial": true,
"payment_id": "<string>",
"reason": "<string>",
"refund_id": "<string>",
"status": "succeeded"
}
],
"settlement_amount": 123,
"settlement_currency": "AED",
"settlement_tax": 123,
"status": null,
"subscription_id": "<string>",
"tax": 123,
"total_amount": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Payment Id
The response is of type object
.
import DodoPayments from 'dodopayments';
const client = new DodoPayments({
bearerToken: process.env['DODO_PAYMENTS_API_KEY'], // This is the default and can be omitted
});
const payment = await client.payments.retrieve('payment_id');
console.log(payment.brand_id);
{
"billing": {
"city": "<string>",
"country": "AF",
"state": "<string>",
"street": "<string>",
"zipcode": "<string>"
},
"brand_id": "<string>",
"business_id": "<string>",
"card_issuing_country": null,
"card_last_four": "<string>",
"card_network": "<string>",
"card_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "AED",
"customer": {
"customer_id": "<string>",
"email": "<string>",
"name": "<string>"
},
"digital_products_delivered": true,
"discount_id": "<string>",
"disputes": [
{
"amount": "<string>",
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"dispute_id": "<string>",
"dispute_stage": "pre_dispute",
"dispute_status": "dispute_opened",
"payment_id": "<string>",
"remarks": "<string>"
}
],
"error_code": "<string>",
"error_message": "<string>",
"metadata": {},
"payment_id": "<string>",
"payment_link": "<string>",
"payment_method": "<string>",
"payment_method_type": "<string>",
"product_cart": [
{
"product_id": "<string>",
"quantity": 1
}
],
"refunds": [
{
"amount": 123,
"business_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": null,
"is_partial": true,
"payment_id": "<string>",
"reason": "<string>",
"refund_id": "<string>",
"status": "succeeded"
}
],
"settlement_amount": 123,
"settlement_currency": "AED",
"settlement_tax": 123,
"status": null,
"subscription_id": "<string>",
"tax": 123,
"total_amount": 123,
"updated_at": "2023-11-07T05:31:56Z"
}