TransactionAttempts API

for owner

GET /api/v1/transaction_attempts/:id

Parameters

Name Description
id id

Request

Headers

Accept: application/json
X-Api-Token: V2zcnUF6SoY-V-TNYqzc8qyS62eb3_xN1Q
X-Api-Email: user-215@example.com

Route

GET /api/v1/transaction_attempts/2

Query Parameters

{}: 

cURL

curl "http://localhost:3000/api/v1/transaction_attempts/2" -X GET \
	-H "Accept: application/json" \
	-H "X-Api-Token: V2zcnUF6SoY-V-TNYqzc8qyS62eb3_xN1Q" \
	-H "X-Api-Email: user-215@example.com" \
	-H "Content-Type: application/json" \
	-H "Host: school.worksonmy.computer"

Response

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 2971

Status

200 OK

Body

{
  "created_at": "2019-10-31T22:00:09Z",
  "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": 218,
  "final_price": 1,
  "currency": "USD",
  "author_id": null,
  "affiliate_id": null,
  "school_id": 108,
  "amount_refunded": null,
  "status": "failure",
  "affiliate_fees": 0,
  "author_fees": 0,
  "sale_id": 7,
  "coupon_id": null,
  "earnings_usd": 0,
  "stripe_charge_token": "MyText",
  "paypal_payment_id": "MyText",
  "purchased_at": null,
  "id": 2,
  "net_charge_usd": 1,
  "refunded_at": null,
  "is_teachable_payments": false,
  "meta": {
    "class": "transactionattempt",
    "url": null,
    "name": "2",
    "description": "",
    "image_url": null
  },
  "user": {
    "created_at": "2019-10-31T22:00:09Z",
    "role": "owner",
    "sanitized_name": "User Name",
    "gravatar_url": "https://s.gravatar.com/avatar/eee034f0709b56db4c9956fb990e798d?d=mm",
    "is_teachable_account": false,
    "author_bio": null,
    "author_bio_id": null,
    "custom_role": null,
    "custom_role_name": null,
    "primary_owner?": false,
    "show_custom_role_upgrade?": false,
    "email": "user-215@example.com",
    "notes": null,
    "affiliate_code": "108_jbgbl93f",
    "name": "User Name",
    "is_owner": true,
    "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:09Z",
    "signed_up_affiliate_code": null,
    "author_revenue_share": 0.0,
    "last_sign_in_ip": null,
    "current_sign_in_ip": null,
    "id": 218,
    "school_id": 108,
    "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:09Z",
    "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": 69,
    "author_revenue_share": null,
    "num_payments_required": null,
    "id": 41,
    "meta": {
      "class": "product",
      "url": "/courses/69/products/41",
      "name": "product name",
      "description": "product description",
      "image_url": null
    }
  },
  "sale": {
    "created_at": "2019-10-31T22:00:09Z",
    "vat_rate": 0.0,
    "subscription_amount_to_bill": 1000,
    "subscription_status": "canceled",
    "product_id": 41,
    "user_id": 219,
    "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:09Z",
    "country": null,
    "next_period_start": null,
    "num_payments_required": null,
    "fully_paid_plan": null,
    "vat_tax_id": null,
    "id": 7,
    "meta": {
      "class": "sale",
      "url": "/sales/7",
      "name": "7",
      "description": "",
      "image_url": null
    }
  },
  "course": {
    "name": "Course Name 64",
    "id": 69
  },
  "stripe_payouts": [

  ],
  "earnings_adjustments": [

  ]
}