Returns a Payment
curl --request GET \
--url http://{defaultHost}/api/v2/platform/payments/{id} \
--header 'Authorization: Bearer <token>'
{
"data": {
"id": "10",
"type": "payment",
"attributes": {
"amount": "45.75",
"source_type": "Spree::CreditCard",
"state": "checkout",
"response_code": "12345",
"avs_response": null,
"created_at": "2022-11-08T19:34:51.349Z",
"updated_at": "2022-11-08T19:34:51.349Z",
"number": "PROYB91V",
"cvv_response_code": null,
"cvv_response_message": null,
"public_metadata": {},
"private_metadata": {},
"display_amount": "$45.75"
},
"relationships": {
"order": {
"data": {
"id": "74",
"type": "order"
}
},
"payment_method": {
"data": {
"id": "66",
"type": "payment_method"
}
},
"source": {
"data": {
"id": "9",
"type": "credit_card"
}
},
"log_entries": {
"data": []
},
"state_changes": {
"data": []
},
"payment_capture_events": {
"data": []
},
"refunds": {
"data": []
}
}
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Select which associated resources you would like to fetch, see: <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>
Record found
The response is of type object
.
Was this page helpful?
curl --request GET \
--url http://{defaultHost}/api/v2/platform/payments/{id} \
--header 'Authorization: Bearer <token>'
{
"data": {
"id": "10",
"type": "payment",
"attributes": {
"amount": "45.75",
"source_type": "Spree::CreditCard",
"state": "checkout",
"response_code": "12345",
"avs_response": null,
"created_at": "2022-11-08T19:34:51.349Z",
"updated_at": "2022-11-08T19:34:51.349Z",
"number": "PROYB91V",
"cvv_response_code": null,
"cvv_response_message": null,
"public_metadata": {},
"private_metadata": {},
"display_amount": "$45.75"
},
"relationships": {
"order": {
"data": {
"id": "74",
"type": "order"
}
},
"payment_method": {
"data": {
"id": "66",
"type": "payment_method"
}
},
"source": {
"data": {
"id": "9",
"type": "credit_card"
}
},
"log_entries": {
"data": []
},
"state_changes": {
"data": []
},
"payment_capture_events": {
"data": []
},
"refunds": {
"data": []
}
}
}
}