gets transaction attempts successfully
GET /api/v1/transaction_attempts/
Parameters
Request
Headers
Route
GET /api/v1/transaction_attempts/?id=6
Query Parameters
id: 6
cURL
curl "http://localhost:3000/api/v1/transaction_attempts/?id=6" -X GET \
-H "Accept: application/json" \
-H "X-Api-Token: 7Ush1ZJBeVRJoXynwf_szWkjqcp7bpcsbw" \
-H "X-Api-Email: user-227@example.com" \
-H "Content-Type: application/json" \
-H "Host: school.worksonmy.computer"
Response
Headers
Status
200 OK
Body
{
"transactions": [
{
"created_at": "2019-10-31T22:00:14Z",
"failure_reason": "PayPal payment failed.",
"is_recurring?": false,
"gateway": "monthly_payment_gateway",
"payment_plan": "one_time_purchase",
"fully_refunded?": false,
"is_stripe_connect?": null,
"is_custom_paypal?": null,
"is_teachable_payments?": false,
"num_payments_required": null,
"tax_record": null,
"user_id": 230,
"final_price": 1,
"currency": "USD",
"author_id": null,
"affiliate_id": null,
"school_id": 112,
"amount_refunded": null,
"status": "failure",
"affiliate_fees": 0,
"author_fees": 0,
"sale_id": 11,
"coupon_id": null,
"earnings_usd": 0,
"stripe_charge_token": "MyText",
"paypal_payment_id": "MyText",
"purchased_at": null,
"id": 6,
"net_charge_usd": 1,
"refunded_at": null,
"is_teachable_payments": false,
"meta": {
"class": "transactionattempt",
"url": null,
"name": "6",
"description": "",
"image_url": null
},
"user": {
"created_at": "2019-10-31T22:00:14Z",
"role": "custom",
"sanitized_name": "User Name",
"gravatar_url": "https://s.gravatar.com/avatar/9f2a348c1f44a4e166ffbb6b31b2cef8?d=mm",
"is_teachable_account": false,
"author_bio": null,
"author_bio_id": null,
"custom_role": {
"created_at": "2019-10-31T22:00:14Z",
"users_count": 1,
"id": 3,
"name": "A Custom Role",
"school_id": 112,
"can_view_financial_information": true,
"can_issue_purchase_refunds": false,
"can_create_and_manage_users": false,
"can_send_emails": false,
"can_create_and_manage_courses": false,
"can_publish_and_delete_courses": false,
"can_customize_site": false,
"can_moderate_comments": false,
"can_view_course_reporting": false,
"can_erase_users": false,
"can_manage_school_settings": false,
"updated_at": "2019-10-31T22:00:14Z",
"meta": {
"class": "customrole",
"url": null,
"name": "A Custom Role",
"description": "",
"image_url": null
}
},
"custom_role_name": "A Custom Role",
"primary_owner?": false,
"show_custom_role_upgrade?": false,
"email": "user-227@example.com",
"notes": null,
"affiliate_code": "112_p8dhvgol",
"name": "User Name",
"is_owner": false,
"sign_in_count": 0,
"is_student": true,
"is_affiliate": false,
"is_author": false,
"src": null,
"current_sign_in_at": null,
"last_four": null,
"paypal_email": null,
"affiliate_revenue_share": null,
"joined_at": "2019-10-31T22:00:14Z",
"signed_up_affiliate_code": null,
"author_revenue_share": 0.0,
"last_sign_in_ip": null,
"current_sign_in_ip": null,
"id": 230,
"school_id": 112,
"teachable_account_id": null,
"is_staff_user": null,
"agree_updated_privacy_policy": true,
"unsubscribe_from_marketing_emails": null,
"meta": {
"class": "user",
"url": null,
"name": "User Name",
"description": "",
"image_url": null
},
"transactions_gross": 0
},
"affiliate": null,
"coupon": null,
"product": {
"created_at": "2019-10-31T22:00:14Z",
"formatted_price": "$10",
"name": "product name",
"description": "product description",
"billing_interval": "month",
"detailed_description": null,
"currency": "USD",
"position": 1,
"price": 1000,
"is_recurring": false,
"is_published": true,
"course_id": 73,
"author_revenue_share": null,
"num_payments_required": null,
"id": 45,
"meta": {
"class": "product",
"url": "/courses/73/products/45",
"name": "product name",
"description": "product description",
"image_url": null
}
},
"sale": {
"created_at": "2019-10-31T22:00:14Z",
"vat_rate": 0.0,
"subscription_amount_to_bill": 1000,
"subscription_status": "canceled",
"product_id": 45,
"user_id": 231,
"is_active": false,
"current_period_start": null,
"current_period_end": null,
"is_recurring": false,
"currency": "USD",
"payment_method": "free",
"purchased_at": "2019-10-31T22:00:14Z",
"country": null,
"next_period_start": null,
"num_payments_required": null,
"fully_paid_plan": null,
"vat_tax_id": null,
"id": 11,
"meta": {
"class": "sale",
"url": "/sales/11",
"name": "11",
"description": "",
"image_url": null
}
},
"course": {
"name": "Course Name 68",
"id": 73
},
"stripe_payouts": [
],
"earnings_adjustments": [
]
}
],
"aggregations": {
"final_price": 1.0,
"affiliate_fees": 0,
"author_fees": 0,
"amount_refunded": 0,
"earnings_usd": 0,
"is_chargeback": 0,
"amount_refunded_usd": 0
},
"has_affiliates": false,
"has_coupons": false,
"meta": {
"page": 1,
"total": 1,
"number_of_pages": 1,
"from": 1,
"to": 1
}
}