close

The Payment Record object

Attributes

  • idstring

    Unique identifier for the object.

  • amountobject

    The amount you intend to collect for this payment.

  • amount_authorizedobject

    The portion of the requested amount that has been authorized to be guaranteed by the payment provider.

  • amount_canceledobject

    The portion of the requested amount that has been canceled by the user, or that you no longer intend to collect.

  • amount_failedobject

    The portion of the requested amount that failed to be collected.

  • amount_guaranteedobject

    The portion of the requested amount that has been guaranteed by the payment provider.

  • amount_refundedobject

    The amount that has been refunded to the customer on this payment.

  • amount_requestedobject

    The amount you initially requested for this payment.

  • customer_detailsnullable object

    Customer information for this payment.

  • customer_presencenullable enum

    Indicates whether the customer was present in your checkout flow during this payment.

    Possible enum values
    off_session

    The customer was not present during the transaction.

    on_session

    The customer was present during the transaction.

  • descriptionnullable string

    An arbitrary string attached to the object. Often useful for displaying to users.

  • metadatamap

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • payment_method_detailsnullable object

    Information about the Payment Method debited for this payment.

  • processor_detailsobject

    Processor information for this payment.

  • shipping_detailsnullable object

    Shipping information for this payment.

More attributes

  • objectstring

  • applicationnullable string

  • createdtimestamp

  • latest_payment_attempt_recordnullable string

  • livemodeboolean

  • reported_byenum

The Payment Record object
{
"id": "pr_5RV730PrHyAEi",
"object": "payment_record",
"amount_authorized": {
"currency": "usd",
"value": 1000
},
"amount_canceled": {
"currency": "usd",
"value": 0
},
"amount_failed": {
"currency": "usd",
"value": 0
},
"amount_guaranteed": {
"currency": "usd",
"value": 0
},
"amount_refunded": {
"currency": "usd",
"value": 0
},
"amount_requested": {
"currency": "usd",
"value": 1000
},
"created": 1730211363,
"customer_details": null,
"customer_presence": "on_session",
"description": "computer software",
"latest_payment_attempt_record": "par_1ArV730PrHyQuG",
"livemode": true,
"metadata": {},
"payment_method_details": {
"billing_details": null,
"custom": {
"display_name": "newpay",
"type": "custom"
},
"payment_method": null,
"type": "custom"
},
"processor_details": {
"type": "custom",
"custom": {
"payment_reference": "npp2358872734k"
}
},
"shipping_details": null
}

Retrieve a Payment Record

GET /v1/payment_records/:id

Retrieves a Payment Record with the given ID

Parameters

  • idstringRequired

    The ID of the Payment Record.

Returns

Returns a Payment Record object if a valid ID was provided. Otherwise, this call raises an error.

curl https://api.stripe.com/v1/payment_records/pr_5RV730PrHyAEi \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
Response
{
"id": "pr_5RV730PrHyAEi",
"object": "payment_record",
"amount_canceled": {
"currency": "usd",
"value": 0
},
"amount_failed": {
"currency": "usd",
"value": 0
},
"amount_guaranteed": {
"currency": "usd",
"value": 0
},
"amount_refunded": {
"currency": "usd",
"value": 0
},
"amount_requested": {
"currency": "usd",
"value": 1000
},
"created": 1730211363,
"customer_details": null,
"customer_presence": "on_session",
"description": "computer software",
"latest_payment_attempt_record": "par_1ArV730PrHyQuG",
"livemode": true,
"metadata": {},
"payment_method_details": {
"billing_details": null,
"custom": {
"display_name": "newpay",
"type": "custom"
},
"payment_method": null,
"type": "custom"
},
"processor_details": {
"type": "custom",
"custom": {
"payment_reference": "npp2358872734k"
}
},
"shipping_details": null
}

Report a payment

POST /v1/payment_records/report_payment

Report a new Payment Record. You may report a Payment Record as it is initialized and later report updates through the other report_* methods, or report Payment Records in a terminal state directly, through this method.

Parameters

  • amount_requestedobjectRequired

    The amount you initially requested for this payment.

  • initiated_attimestampRequired

    When the reported payment was initiated. Measured in seconds since the Unix epoch.

  • payment_method_detailsobjectRequired

    Information about the Payment Method debited for this payment.

  • customer_detailsobject

    Customer information for this payment.

  • customer_presenceenum

    Indicates whether the customer was present in your checkout flow during this payment.

    Possible enum values
    off_session

    The customer was not present during the transaction.

    on_session

    The customer was present during the transaction.

  • descriptionstring

    An arbitrary string attached to the object. Often useful for displaying to users.

  • failedobject

    Information about the payment attempt failure.

  • guaranteedobject

    Information about the payment attempt guarantee.

  • metadatamap

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.

  • outcomeenum

    The outcome of the reported payment.

    Possible enum values
    failed

    The payment failed.

    guaranteed

    The payment was guaranteed.

  • processor_detailsobjectRequired

    Processor information for this payment.

  • shipping_detailsobject

    Shipping information for this payment.

Returns

The newly created Payment Record.

curl https://api.stripe.com/v1/payment_records/report_payment \
-u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d "amount_requested[currency]=usd" \
-d "amount_requested[value]=1000" \
-d customer_presence=on_session \
-d "description=computer software" \
-d initiated_at=1730253453 \
-d "payment_method_details[custom][display_name]=newpay" \
-d "payment_method_details[type]=custom" \
-d "processor_details[type]=custom" \
-d "processor_details[custom][payment_reference]=npp2358872734k"
Response
{
"id": "pr_5RV730PrHyAEi",
"object": "payment_record",
"amount_canceled": {
"currency": "usd",
"value": 0
},
"amount_failed": {
"currency": "usd",
"value": 0
},
"amount_guaranteed": {
"currency": "usd",
"value": 0
},
"amount_refunded": {
"currency": "usd",
"value": 0
},
"amount_requested": {
"currency": "usd",
"value": 1000
},
"created": 1730211363,
"customer_details": null,
"customer_presence": "on_session",
"description": "computer software",
"latest_payment_attempt_record": "par_1ArV730PrHyQuG",
"livemode": true,
"metadata": {},
"payment_method_details": {
"billing_details": null,
"custom": {
"display_name": "newpay",
"type": "custom"
},
"payment_method": null,
"type": "custom"
},
"processor_details": {
"type": "custom",
"custom": {
"payment_reference": "npp2358872734k"
}
},
"shipping_details": null
}