API Reference
Events API
The events API allows you to view the activity on your account. Note that some actions may create multiple events.
It’s expected that additional event types will be introduced over time. Event types currently include:
- charge.authorised
- charge.voided
- charge.captured
- charge.failed
- customer.created
- customer.updated
- customer.deleted
- recipient.created
- recipient.updated
- recipient.deleted
- refund.created
- refund.succeeded
- refund.failed
- transfer.created
- transfer.failed
- deposit.created
- sub_merchant_application.submitted
- sub_merchant_application.activated
- sub_merchant_application.declined
- sub_merchant_application.on_hold
- plan.created
- plan.deleted
- subscription.created
- subscription.unsubscribed
- subscription.cancelled
- subscription.expired
- subscription.renewed
- subscription.renewal_failed
- dispute.evidence_required
- dispute.resolved
- dispute.cancelled
- dispute.evidence_under_review
- dispute.lost
- dispute.won
- dispute.expired
- dispute.accepted
- dispute.arbitration_under_review
- dispute.arbitration_won
- dispute.arbitration_lost
Events are only guaranteed to be stored for 30 days after they are created.
GET /events
Returns a paginated list of all events.
Example
curl https://test-api.pinpayments.com/1/events -u your-secret-api-key:
200
OK
{
"response": [
{
"token": "evt_12K4fafROQsdI5PdwLkX",
"type": "charge.captured",
"data": {
"token": "ch_lfUYEBK14zotCTykezJkfg",
"success": true,
"amount": 400,
"currency": "AUD",
"description": "test charge",
"email": "roland@pinpayments.com",
"ip_address": "203.192.1.172",
"created_at": "2023-06-20T03:10:49Z",
"status_message": "Success",
"error_message": null,
"card": {
"token": "card_pIQJKMs93GsCc9vLSLevbw",
"scheme": "master",
"display_number": "XXXX-XXXX-XXXX-0000",
"issuing_country": "AU",
"expiry_month": 5,
"expiry_year": 2025,
"name": "Roland Robot",
"address_line1": "42 Sevenoaks St",
"address_line2": "",
"address_city": "Lathlain",
"address_postcode": "6454",
"address_state": "WA",
"address_country": "Australia",
"network_type": null,
"network_format": null,
"customer_token": null,
"primary": null
},
"transfer": [],
"amount_refunded": 0,
"total_fees": 42,
"merchant_entitlement": 358,
"refund_pending": false,
"authorisation_token": null,
"authorisation_expired": false,
"authorisation_voided": false,
"captured": true,
"captured_at": "2023-06-20T03:10:49Z",
"settlement_currency": "AUD",
"active_chargebacks": false,
"metadata": {
"OrderNumber": "123456",
"CustomerName": "Roland Robot"
}
},
"created_at": "2024-11-03T23:25:26Z"
}
],
"pagination": {
"count": 1,
"per_page": 25,
"current": 1
}
}
GET /events/event-token
Returns the details of the specified event.
Example
curl https://test-api.pinpayments.com/1/events/evt_12K4fafROQsdI5PdwLkX -u your-secret-api-key:
200
OK
{
"response": {
"token": "evt_12K4fafROQsdI5PdwLkX",
"type": "charge.captured",
"data": {
"token": "ch_lfUYEBK14zotCTykezJkfg",
"success": true,
"amount": 400,
"currency": "AUD",
"description": "test charge",
"email": "roland@pinpayments.com",
"ip_address": "203.192.1.172",
"created_at": "2023-06-20T03:10:49Z",
"status_message": "Success",
"error_message": null,
"card": {
"token": "card_pIQJKMs93GsCc9vLSLevbw",
"scheme": "master",
"display_number": "XXXX-XXXX-XXXX-0000",
"issuing_country": "AU",
"expiry_month": 5,
"expiry_year": 2025,
"name": "Roland Robot",
"address_line1": "42 Sevenoaks St",
"address_line2": "",
"address_city": "Lathlain",
"address_postcode": "6454",
"address_state": "WA",
"address_country": "Australia",
"network_type": null,
"network_format": null,
"customer_token": null,
"primary": null
},
"transfer": [],
"amount_refunded": 0,
"total_fees": 42,
"merchant_entitlement": 358,
"refund_pending": false,
"authorisation_token": null,
"authorisation_expired": false,
"authorisation_voided": false,
"captured": true,
"captured_at": "2023-06-20T03:10:49Z",
"settlement_currency": "AUD",
"active_chargebacks": false,
"metadata": {
"OrderNumber": "123456",
"CustomerName": "Roland Robot"
}
},
"created_at": "2024-11-03T23:25:26Z"
}
}
Error Responses
404 | resource_not_found |
{...}
|
---|