Skip to main content

Querying a charge

Querying the status of a charge#

You can query the details and current status of a transaction using the transaction_id generated by PicPay or the reference_id generated by the partner.

Endpoint#

GET https://ecommerce-api.svc.picpay.com/v1/payments

Request example#

curl --location 'https://ecommerce-api.svc.picpay.com/v1/payments?transaction_id=e646263b-2b4d-4b2c-93d8-2568fbffb744' \
--header 'Authorization: Bearer {{access_token}}'

Or using reference_id:

curl --location 'https://ecommerce-api.svc.picpay.com/v1/payments?reference_id=04c923a4-34d6-43e8-89db-1b563f887b53' \
--header 'Authorization: Bearer {{access_token}}'

Query parameters#

ParameterTypeRequiredDescription
transaction_idstringYes*Transaction identifier generated by PicPay at the time of the charge
reference_idstringYes*Unique transaction identifier generated by the partner

*At least one of the two must be provided.

Successful response#

{
"id": "6a5f8c9a3709b847022d1526",
"reference_id": "04c923a4-34d6-43e8-89db-1b563f887b53",
"status": "PAID",
"created_at": "2021-02-22T19:29:16-03:00",
"paid_at": "2021-02-22T19:29:16-03:00",
"value": 3.0,
"refunded_value": 0.0,
"transactions": [
{
"id": "e646263b-2b4d-4b2c-93d8-2568fbffb744",
"value": 3.0,
"status": "PAID",
"created_at": "2021-02-22T19:29:16-03:00",
"captured_value": null,
"captured_at": null,
"refunds": []
}
]
}

Response fields#

FieldDescription
idInternal payment ID
reference_idExternal ID provided by the seller
statusCurrent payment status
created_atCreation date
paid_atPayment date (null if not paid)
valuePayment amount (or captured amount if partial capture)
refunded_valueTotal amount already refunded
transactions[].idTransaction ID
transactions[].valueTransaction amount
transactions[].statusIndividual transaction status
transactions[].captured_valueCaptured amount (deferred capture)
transactions[].captured_atCapture date
transactions[].refunds[]List of refunds performed

Possible statuses#

StatusTypeDescription
CREATEDInitialTransaction created, in initial processing
PENDINGIntermediateBeing processed (challenge, analysis)
AUTHORIZEDIntermediateAuthorized, awaiting deferred capture
PAIDFinalPaid and captured
COMPLETEDFinalFinancially settled
REFUSEDDeclinedDeclined (balance, card, risk or security)
CANCELLEDFinalCanceled before capture (deferred capture)
EXPIREDFinalDeferred capture not performed within 6 days
REFUNDEDFinalFully refunded
PARTIALLY_REFUNDEDFinalPartially refunded
TIMEOUT_REFUNDEDFinalAsynchronous refund triggered after charge timeout
ERRORFinalError during transaction processing

Next steps#