backend-manager 5.9.6 → 5.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/package.json +5 -3
  2. package/src/manager/events/cron/runner.js +0 -1
  3. package/src/manager/libraries/email/data/disposable-domains.json +21 -0
  4. package/src/test/fixtures/firebase-project/.temp/test-mode.json +1 -1
  5. package/src/test/fixtures/firebase-project/database-debug.log +8 -8
  6. package/src/test/fixtures/firebase-project/firestore-debug.log +55 -59
  7. package/src/test/fixtures/firebase-project/pubsub-debug.log +3 -3
  8. package/templates/_.env +42 -0
  9. package/templates/_.gitignore +60 -0
  10. package/templates/backend-manager-config.json +249 -0
  11. package/templates/database.rules.json +83 -0
  12. package/templates/firebase.json +66 -0
  13. package/templates/firestore.indexes.json +4 -0
  14. package/templates/firestore.rules +112 -0
  15. package/templates/public/404.html +26 -0
  16. package/templates/public/index.html +24 -0
  17. package/templates/remoteconfig.template.json +1 -0
  18. package/templates/storage-lifecycle-config-1-day.json +9 -0
  19. package/templates/storage-lifecycle-config-30-days.json +9 -0
  20. package/templates/storage.rules +8 -0
  21. package/test/_init/accounts-validation.js +58 -0
  22. package/test/_legacy/ai/index.js +231 -0
  23. package/test/_legacy/ai/test.jpg +0 -0
  24. package/test/_legacy/ai/test.pdf +0 -0
  25. package/test/_legacy/index.js +31 -0
  26. package/test/_legacy/payment-resolver/chargebee/orders/refunded.json +0 -0
  27. package/test/_legacy/payment-resolver/chargebee/orders/unpaid.json +98 -0
  28. package/test/_legacy/payment-resolver/chargebee/subscriptions/active.json +578 -0
  29. package/test/_legacy/payment-resolver/chargebee/subscriptions/trial-in-trial.json +38 -0
  30. package/test/_legacy/payment-resolver/chargebee/subscriptions/trial-skipped-to-active.json +135 -0
  31. package/test/_legacy/payment-resolver/chargebee/subscriptions/trial-to-active-to-cancelled.json +42 -0
  32. package/test/_legacy/payment-resolver/chargebee/subscriptions/trial-to-active.json +44 -0
  33. package/test/_legacy/payment-resolver/chargebee/subscriptions/trial-to-cancelled.json +39 -0
  34. package/test/_legacy/payment-resolver/chargebee/subscriptions/trial-to-refund.json +143 -0
  35. package/test/_legacy/payment-resolver/chargebee/subscriptions/trial-to-suspended.json +48 -0
  36. package/test/_legacy/payment-resolver/coinbase/orders/regular.json +204 -0
  37. package/test/_legacy/payment-resolver/coinbase/subscriptions/cancelled.json +204 -0
  38. package/test/_legacy/payment-resolver/coinbase/subscriptions/paid-2.json +125 -0
  39. package/test/_legacy/payment-resolver/index.js +1558 -0
  40. package/test/_legacy/payment-resolver/paypal/orders/refunded.json +0 -0
  41. package/test/_legacy/payment-resolver/paypal/orders/regular.json +120 -0
  42. package/test/_legacy/payment-resolver/paypal/subscriptions/active-refund-previous-stmnt.json +323 -0
  43. package/test/_legacy/payment-resolver/paypal/subscriptions/active.json +192 -0
  44. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-in-trial.json +125 -0
  45. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-payment-not-complete.json +76 -0
  46. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-payment-overdue-2.json +114 -0
  47. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-payment-overdue.json +114 -0
  48. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-to-active-to-cancelled.json +111 -0
  49. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-to-active.json +132 -0
  50. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-to-cancelled.json +107 -0
  51. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-to-expired.json +91 -0
  52. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-to-refund.json +147 -0
  53. package/test/_legacy/payment-resolver/paypal/subscriptions/trial-to-suspended.json +120 -0
  54. package/test/_legacy/payment-resolver/stripe/orders/refunded.json +0 -0
  55. package/test/_legacy/payment-resolver/stripe/orders/regular.json +91 -0
  56. package/test/_legacy/payment-resolver/stripe/subscriptions/active.json +421 -0
  57. package/test/_legacy/payment-resolver/stripe/subscriptions/trial-in-trial.json +349 -0
  58. package/test/_legacy/payment-resolver/stripe/subscriptions/trial-to-active-failed-authorization.json +430 -0
  59. package/test/_legacy/payment-resolver/stripe/subscriptions/trial-to-active.json +319 -0
  60. package/test/_legacy/payment-resolver/stripe/subscriptions/trial-to-cancelled.json +319 -0
  61. package/test/_legacy/payment-resolver/stripe/subscriptions/trial-to-refund.json +414 -0
  62. package/test/_legacy/payment-resolver/stripe/subscriptions/trial-to-suspended.json +319 -0
  63. package/test/_legacy/payment-resolver/stripe/subscriptions/unsure.json +339 -0
  64. package/test/_legacy/test-new +1178 -0
  65. package/test/_legacy/test.md +89 -0
  66. package/test/_legacy/usage.js +175 -0
  67. package/test/_legacy/user.js +31 -0
  68. package/test/ai/tools-live.js +170 -0
  69. package/test/boot/emulator-boots.js +37 -0
  70. package/test/content/blog-generate.js +160 -0
  71. package/test/email/campaign-send.js +45 -0
  72. package/test/email/consent-lifecycle.js +257 -0
  73. package/test/email/feedback-and-plain-send.js +52 -0
  74. package/test/email/fixtures/clean.json +30 -0
  75. package/test/email/fixtures/editorial.json +30 -0
  76. package/test/email/fixtures/field-report.json +53 -0
  77. package/test/email/marketing-lifecycle.js +132 -0
  78. package/test/email/newsletter-generate.js +819 -0
  79. package/test/email/newsletter-templates.js +491 -0
  80. package/test/email/templates.js +207 -0
  81. package/test/email/transactional-send.js +34 -0
  82. package/test/email/transactional.js +560 -0
  83. package/test/email/validation.js +710 -0
  84. package/test/events/auth-delete-race.js +201 -0
  85. package/test/events/payments/journey-payments-cancel-endpoint.js +100 -0
  86. package/test/events/payments/journey-payments-cancel.js +182 -0
  87. package/test/events/payments/journey-payments-discount.js +89 -0
  88. package/test/events/payments/journey-payments-failure.js +146 -0
  89. package/test/events/payments/journey-payments-legacy-product.js +149 -0
  90. package/test/events/payments/journey-payments-one-time-failure.js +111 -0
  91. package/test/events/payments/journey-payments-one-time.js +136 -0
  92. package/test/events/payments/journey-payments-plan-change.js +144 -0
  93. package/test/events/payments/journey-payments-refund-webhook.js +180 -0
  94. package/test/events/payments/journey-payments-suspend.js +181 -0
  95. package/test/events/payments/journey-payments-trial-cancel.js +130 -0
  96. package/test/events/payments/journey-payments-trial.js +171 -0
  97. package/test/events/payments/journey-payments-uid-resolution.js +132 -0
  98. package/test/events/payments/journey-payments-upgrade.js +135 -0
  99. package/test/fixtures/chargebee/invoice-one-time.json +27 -0
  100. package/test/fixtures/chargebee/subscription-active.json +44 -0
  101. package/test/fixtures/chargebee/subscription-cancelled.json +42 -0
  102. package/test/fixtures/chargebee/subscription-in-trial.json +41 -0
  103. package/test/fixtures/chargebee/subscription-legacy-plan.json +41 -0
  104. package/test/fixtures/chargebee/subscription-non-renewing.json +41 -0
  105. package/test/fixtures/chargebee/subscription-paused.json +42 -0
  106. package/test/fixtures/chargebee/webhook-payment-failed.json +51 -0
  107. package/test/fixtures/chargebee/webhook-subscription-created.json +47 -0
  108. package/test/fixtures/paypal/order-approved.json +62 -0
  109. package/test/fixtures/paypal/order-completed.json +110 -0
  110. package/test/fixtures/paypal/subscription-active.json +76 -0
  111. package/test/fixtures/paypal/subscription-cancelled.json +50 -0
  112. package/test/fixtures/paypal/subscription-suspended.json +65 -0
  113. package/test/fixtures/stripe/checkout-session-completed.json +130 -0
  114. package/test/fixtures/stripe/invoice-payment-failed.json +148 -0
  115. package/test/fixtures/stripe/invoice-subscription-payment-failed.json +28 -0
  116. package/test/fixtures/stripe/subscription-active.json +161 -0
  117. package/test/fixtures/stripe/subscription-canceled.json +161 -0
  118. package/test/fixtures/stripe/subscription-trialing.json +161 -0
  119. package/test/functions/admin/database-read.js +134 -0
  120. package/test/functions/admin/database-write.js +159 -0
  121. package/test/functions/admin/edit-post.js +366 -0
  122. package/test/functions/admin/firestore-query.js +207 -0
  123. package/test/functions/admin/firestore-read.js +129 -0
  124. package/test/functions/admin/firestore-write.js +105 -0
  125. package/test/functions/admin/get-stats.js +115 -0
  126. package/test/functions/admin/send-email.js +119 -0
  127. package/test/functions/admin/send-notification.js +208 -0
  128. package/test/functions/admin/write-repo-content.js +223 -0
  129. package/test/functions/general/add-marketing-contact.js +335 -0
  130. package/test/functions/general/fetch-post.js +54 -0
  131. package/test/functions/general/generate-uuid.js +114 -0
  132. package/test/functions/test/authenticate.js +64 -0
  133. package/test/functions/user/create-custom-token.js +73 -0
  134. package/test/functions/user/delete.js +135 -0
  135. package/test/functions/user/get-active-sessions.js +111 -0
  136. package/test/functions/user/get-subscription-info.js +99 -0
  137. package/test/functions/user/regenerate-api-keys.js +156 -0
  138. package/test/functions/user/resolve.js +52 -0
  139. package/test/functions/user/sign-out-all-sessions.js +94 -0
  140. package/test/functions/user/sign-up.js +252 -0
  141. package/test/functions/user/submit-feedback.js +104 -0
  142. package/test/functions/user/validate-settings.js +82 -0
  143. package/test/helpers/ai-request-payload.js +300 -0
  144. package/test/helpers/ai-test-provider.js +202 -0
  145. package/test/helpers/ai-tools-format.js +383 -0
  146. package/test/helpers/content/blog-auto-publisher.js +484 -0
  147. package/test/helpers/content/feed-parser.js +528 -0
  148. package/test/helpers/content/ghostii-blocks.js +134 -0
  149. package/test/helpers/content/ghostii-feed-integration.js +404 -0
  150. package/test/helpers/content/ghostii-write-article.js +243 -0
  151. package/test/helpers/environment.js +230 -0
  152. package/test/helpers/infer-contact.js +113 -0
  153. package/test/helpers/merge-line-files.js +271 -0
  154. package/test/helpers/payment/chargebee/parse-webhook.js +413 -0
  155. package/test/helpers/payment/chargebee/to-unified-one-time.js +147 -0
  156. package/test/helpers/payment/chargebee/to-unified-subscription.js +648 -0
  157. package/test/helpers/payment/paypal/parse-webhook.js +539 -0
  158. package/test/helpers/payment/paypal/to-unified-one-time.js +382 -0
  159. package/test/helpers/payment/paypal/to-unified-subscription.js +820 -0
  160. package/test/helpers/payment/stripe/parse-webhook.js +447 -0
  161. package/test/helpers/payment/stripe/to-unified-one-time.js +306 -0
  162. package/test/helpers/payment/stripe/to-unified-subscription.js +708 -0
  163. package/test/helpers/sanitize.js +222 -0
  164. package/test/helpers/slugify.js +394 -0
  165. package/test/helpers/storage.js +194 -0
  166. package/test/helpers/user.js +755 -0
  167. package/test/helpers/webhook-forward.js +418 -0
  168. package/test/mcp/discovery.js +53 -0
  169. package/test/mcp/oauth.js +161 -0
  170. package/test/mcp/protocol.js +268 -0
  171. package/test/mcp/roles.js +188 -0
  172. package/test/mcp/utils.js +245 -0
  173. package/test/routes/admin/create-post.js +364 -0
  174. package/test/routes/admin/database.js +131 -0
  175. package/test/routes/admin/deduplicate-image-alts.js +190 -0
  176. package/test/routes/admin/email.js +114 -0
  177. package/test/routes/admin/firestore-query.js +204 -0
  178. package/test/routes/admin/firestore.js +127 -0
  179. package/test/routes/admin/infer-contact.js +218 -0
  180. package/test/routes/admin/notification.js +198 -0
  181. package/test/routes/admin/post-resize-image.js +184 -0
  182. package/test/routes/admin/post.js +368 -0
  183. package/test/routes/admin/repo-content.js +223 -0
  184. package/test/routes/admin/stats.js +112 -0
  185. package/test/routes/content/post.js +54 -0
  186. package/test/routes/general/uuid.js +115 -0
  187. package/test/routes/marketing/campaign.js +125 -0
  188. package/test/routes/marketing/contact.js +370 -0
  189. package/test/routes/marketing/email-preferences.js +292 -0
  190. package/test/routes/marketing/push-send.js +32 -0
  191. package/test/routes/marketing/webhook-forward.js +61 -0
  192. package/test/routes/marketing/webhook.js +639 -0
  193. package/test/routes/payments/cancel.js +163 -0
  194. package/test/routes/payments/discount.js +80 -0
  195. package/test/routes/payments/dispute-alert.js +320 -0
  196. package/test/routes/payments/intent.js +336 -0
  197. package/test/routes/payments/portal.js +92 -0
  198. package/test/routes/payments/refund.js +179 -0
  199. package/test/routes/payments/trial-eligibility.js +71 -0
  200. package/test/routes/payments/webhook.js +107 -0
  201. package/test/routes/test/authenticate.js +59 -0
  202. package/test/routes/test/schema.js +554 -0
  203. package/test/routes/test/usage.js +342 -0
  204. package/test/routes/user/api-keys.js +156 -0
  205. package/test/routes/user/delete.js +136 -0
  206. package/test/routes/user/feedback.js +104 -0
  207. package/test/routes/user/sessions.js +199 -0
  208. package/test/routes/user/settings-validate.js +82 -0
  209. package/test/routes/user/signup.js +542 -0
  210. package/test/routes/user/subscription.js +99 -0
  211. package/test/routes/user/token.js +73 -0
  212. package/test/routes/user/user.js +157 -0
  213. package/test/rules/notifications.js +410 -0
  214. package/test/rules/payments-carts.js +371 -0
  215. package/test/rules/user.js +396 -0
@@ -0,0 +1,135 @@
1
+ {
2
+ "id": "6oqX0TnhKo5R513B",
3
+ "plan_id": "somiibo-premium-monthly-1",
4
+ "plan_quantity": 1,
5
+ "plan_unit_price": 1995,
6
+ "billing_period": 1,
7
+ "billing_period_unit": "month",
8
+ "trial_end": 1692737757,
9
+ "customer_id": "6oqX0TnhKo5R513B",
10
+ "plan_amount": 1995,
11
+ "plan_free_quantity": 0,
12
+ "status": "active",
13
+ "trial_start": 1692737752,
14
+ "current_term_start": 1692737757,
15
+ "current_term_end": 1695416157,
16
+ "next_billing_at": 1695416157,
17
+ "created_at": 1692737752,
18
+ "started_at": 1692737752,
19
+ "activated_at": 1692737757,
20
+ "created_from_ip": "176.88.149.106",
21
+ "updated_at": 1692737762,
22
+ "has_scheduled_changes": false,
23
+ "channel": "web",
24
+ "resource_version": 1692737762304,
25
+ "deleted": false,
26
+ "object": "subscription",
27
+ "currency_code": "USD",
28
+ "shipping_address": {
29
+ "first_name": "Batuhan",
30
+ "last_name": "Onat",
31
+ "line1": "Kadıköy Sahili",
32
+ "city": "İstanbul",
33
+ "state": "İstanbul",
34
+ "country": "TR",
35
+ "validation_status": "not_validated",
36
+ "object": "shipping_address"
37
+ },
38
+ "due_invoices_count": 0,
39
+ "mrr": 1995,
40
+ "exchange_rate": 1,
41
+ "base_currency_code": "USD",
42
+ "cf_clientorderid": "1692737619789-0976",
43
+ "has_scheduled_advance_invoices": false,
44
+ "invoices": [{
45
+ "invoice": {
46
+ "id": "3461",
47
+ "customer_id": "6oqX0TnhKo5R513B",
48
+ "subscription_id": "6oqX0TnhKo5R513B",
49
+ "recurring": true,
50
+ "status": "paid",
51
+ "price_type": "tax_exclusive",
52
+ "date": 1692737757,
53
+ "due_date": 1692737757,
54
+ "net_term_days": 0,
55
+ "exchange_rate": 1,
56
+ "total": 1995,
57
+ "amount_paid": 1995,
58
+ "amount_adjusted": 0,
59
+ "write_off_amount": 0,
60
+ "credits_applied": 0,
61
+ "amount_due": 0,
62
+ "paid_at": 1692737758,
63
+ "updated_at": 1692737759,
64
+ "resource_version": 1692737759973,
65
+ "deleted": false,
66
+ "object": "invoice",
67
+ "first_invoice": true,
68
+ "amount_to_collect": 0,
69
+ "round_off_amount": 0,
70
+ "new_sales_amount": 1995,
71
+ "has_advance_charges": false,
72
+ "currency_code": "USD",
73
+ "base_currency_code": "USD",
74
+ "generated_at": 1692737757,
75
+ "is_gifted": false,
76
+ "term_finalized": true,
77
+ "channel": "web",
78
+ "tax": 0,
79
+ "line_items": [{
80
+ "id": "li_Azyru6TnhL7mx5scU",
81
+ "date_from": 1692737757,
82
+ "date_to": 1695416157,
83
+ "unit_amount": 1995,
84
+ "quantity": 1,
85
+ "amount": 1995,
86
+ "pricing_model": "flat_fee",
87
+ "is_taxed": false,
88
+ "tax_amount": 0,
89
+ "object": "line_item",
90
+ "subscription_id": "6oqX0TnhKo5R513B",
91
+ "customer_id": "6oqX0TnhKo5R513B",
92
+ "description": "Somiibo Premium (Monthly)",
93
+ "entity_type": "plan",
94
+ "entity_id": "somiibo-premium-monthly-1",
95
+ "tax_exempt_reason": "tax_not_configured",
96
+ "discount_amount": 0,
97
+ "item_level_discount_amount": 0
98
+ }],
99
+ "sub_total": 1995,
100
+ "linked_payments": [{
101
+ "txn_id": "txn_Azyru6TnhL7om5scf",
102
+ "applied_amount": 1995,
103
+ "applied_at": 1692737759,
104
+ "txn_status": "success",
105
+ "txn_date": 1692737758,
106
+ "txn_amount": 1995
107
+ }],
108
+ "applied_credits": [],
109
+ "adjustment_credit_notes": [],
110
+ "issued_credit_notes": [],
111
+ "linked_orders": [],
112
+ "dunning_attempts": [],
113
+ "billing_address": {
114
+ "first_name": "Batuhan",
115
+ "last_name": "Onat",
116
+ "line1": "Kadıköy Sahili",
117
+ "city": "İstanbul",
118
+ "state": "İstanbul",
119
+ "country": "TR",
120
+ "validation_status": "not_validated",
121
+ "object": "billing_address"
122
+ },
123
+ "shipping_address": {
124
+ "first_name": "Batuhan",
125
+ "last_name": "Onat",
126
+ "line1": "Kadıköy Sahili",
127
+ "city": "İstanbul",
128
+ "state": "İstanbul",
129
+ "country": "TR",
130
+ "validation_status": "not_validated",
131
+ "object": "shipping_address"
132
+ }
133
+ }
134
+ }]
135
+ }
@@ -0,0 +1,42 @@
1
+ {
2
+ "id": "AzqJXiTaQKh4m5Ta7",
3
+ "plan_id": "somiibo-premium-monthly-1",
4
+ "plan_quantity": 1,
5
+ "plan_unit_price": 1995,
6
+ "billing_period": 1,
7
+ "billing_period_unit": "month",
8
+ "trial_end": 1681786417,
9
+ "customer_id": "AzqJXiTaQKh4m5Ta7",
10
+ "plan_amount": 1995,
11
+ "plan_free_quantity": 0,
12
+ "status": "cancelled",
13
+ "trial_start": 1680576817,
14
+ "current_term_start": 1681786417,
15
+ "current_term_end": 1681875744,
16
+ "created_at": 1680576817,
17
+ "started_at": 1680576817,
18
+ "activated_at": 1681786417,
19
+ "cancelled_at": 1681875744,
20
+ "created_from_ip": "127.0.0.1",
21
+ "updated_at": 1681875744,
22
+ "has_scheduled_changes": false,
23
+ "channel": "web",
24
+ "resource_version": 1681875744767,
25
+ "deleted": false,
26
+ "object": "subscription",
27
+ "currency_code": "USD",
28
+ "shipping_address": {
29
+ "first_name": "Test",
30
+ "last_name": "Lastname",
31
+ "line1": "1234 Main Street",
32
+ "city": "Los Angeles",
33
+ "state": "CA",
34
+ "country": "USA",
35
+ "validation_status": "not_validated",
36
+ "object": "shipping_address"
37
+ },
38
+ "due_invoices_count": 0,
39
+ "mrr": 0,
40
+ "cf_clientorderid": "1680576717641-0724",
41
+ "has_scheduled_advance_invoices": false
42
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "id": "AzyfbtTbMhiFM51DW",
3
+ "plan_id": "somiibo-premium-monthly-1",
4
+ "plan_quantity": 1,
5
+ "plan_unit_price": 1995,
6
+ "billing_period": 1,
7
+ "billing_period_unit": "month",
8
+ "trial_end": 1682648996,
9
+ "customer_id": "AzyfbtTbMhiFM51DW",
10
+ "plan_amount": 1995,
11
+ "plan_free_quantity": 0,
12
+ "status": "active",
13
+ "trial_start": 1681439396,
14
+ "current_term_start": 1682648996,
15
+ "current_term_end": 1685240996,
16
+ "next_billing_at": 1685240996,
17
+ "created_at": 1681439396,
18
+ "started_at": 1681439396,
19
+ "activated_at": 1682648996,
20
+ "created_from_ip": "127.0.0.1",
21
+ "updated_at": 1682649106,
22
+ "has_scheduled_changes": false,
23
+ "channel": "web",
24
+ "resource_version": 1682649106712,
25
+ "deleted": false,
26
+ "object": "subscription",
27
+ "currency_code": "USD",
28
+ "shipping_address": {
29
+ "first_name": "Test",
30
+ "last_name": "Lastname",
31
+ "line1": "1234 Main Street",
32
+ "city": "Los Angeles",
33
+ "state": "CA",
34
+ "country": "USA",
35
+ "validation_status": "not_validated",
36
+ "object": "shipping_address"
37
+ },
38
+ "due_invoices_count": 0,
39
+ "mrr": 1995,
40
+ "exchange_rate": 1,
41
+ "base_currency_code": "USD",
42
+ "cf_clientorderid": "1681439217235-0805",
43
+ "has_scheduled_advance_invoices": false
44
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "id": "AzZMshTbnEv7r1Eck",
3
+ "plan_id": "somiibo-premium-monthly-1",
4
+ "plan_quantity": 1,
5
+ "plan_unit_price": 1995,
6
+ "billing_period": 1,
7
+ "billing_period_unit": "month",
8
+ "trial_end": 1682419262,
9
+ "customer_id": "AzZMshTbnEv7r1Eck",
10
+ "plan_amount": 1995,
11
+ "plan_free_quantity": 0,
12
+ "status": "cancelled",
13
+ "trial_start": 1681831468,
14
+ "created_at": 1681831468,
15
+ "started_at": 1681831468,
16
+ "cancelled_at": 1682419262,
17
+ "created_from_ip": "127.0.0.1",
18
+ "updated_at": 1682419262,
19
+ "has_scheduled_changes": false,
20
+ "channel": "web",
21
+ "resource_version": 1682419262608,
22
+ "deleted": false,
23
+ "object": "subscription",
24
+ "currency_code": "USD",
25
+ "shipping_address": {
26
+ "first_name": "Test",
27
+ "last_name": "Lastname",
28
+ "line1": "1234 Main Street",
29
+ "city": "Los Angeles",
30
+ "state": "CA",
31
+ "country": "USA",
32
+ "validation_status": "not_validated",
33
+ "object": "shipping_address"
34
+ },
35
+ "due_invoices_count": 0,
36
+ "mrr": 0,
37
+ "cf_clientorderid": "1681831321097-0231",
38
+ "has_scheduled_advance_invoices": false
39
+ }
@@ -0,0 +1,143 @@
1
+ {
2
+ "id": "AzymDoTjgzDShlvd",
3
+ "plan_id": "somiibo-premium-monthly-1",
4
+ "plan_quantity": 1,
5
+ "plan_unit_price": 1995,
6
+ "billing_period": 1,
7
+ "billing_period_unit": "month",
8
+ "trial_end": 1689068274,
9
+ "customer_id": "AzymDoTjgzDShlvd",
10
+ "plan_amount": 1995,
11
+ "plan_free_quantity": 0,
12
+ "status": "cancelled",
13
+ "trial_start": 1689068267,
14
+ "current_term_start": 1689068274,
15
+ "current_term_end": 1689427395,
16
+ "created_at": 1689068267,
17
+ "started_at": 1689068267,
18
+ "activated_at": 1689068274,
19
+ "cancelled_at": 1689427395,
20
+ "created_from_ip": "78.123.110.217",
21
+ "updated_at": 1689427395,
22
+ "has_scheduled_changes": false,
23
+ "channel": "web",
24
+ "resource_version": 1689427395475,
25
+ "deleted": false,
26
+ "object": "subscription",
27
+ "currency_code": "USD",
28
+ "shipping_address": {
29
+ "first_name": "biran",
30
+ "last_name": "faya",
31
+ "line1": "31 Rue Salvador Allende",
32
+ "city": "La Talaudière",
33
+ "state": "Auvergne-Rhône-Alpes",
34
+ "country": "FR",
35
+ "zip": "42350",
36
+ "validation_status": "not_validated",
37
+ "object": "shipping_address"
38
+ },
39
+ "due_invoices_count": 0,
40
+ "mrr": 0,
41
+ "cf_clientorderid": "1689067920988-0495",
42
+ "has_scheduled_advance_invoices": false,
43
+ "invoices": [{
44
+ "invoice": {
45
+ "id": "3328",
46
+ "customer_id": "AzymDoTjgzDShlvd",
47
+ "subscription_id": "AzymDoTjgzDShlvd",
48
+ "recurring": true,
49
+ "status": "paid",
50
+ "price_type": "tax_exclusive",
51
+ "date": 1689068274,
52
+ "due_date": 1689068274,
53
+ "net_term_days": 0,
54
+ "exchange_rate": 1,
55
+ "total": 1995,
56
+ "amount_paid": 1995,
57
+ "amount_adjusted": 0,
58
+ "write_off_amount": 0,
59
+ "credits_applied": 0,
60
+ "amount_due": 0,
61
+ "paid_at": 1689068274,
62
+ "updated_at": 1690341671,
63
+ "resource_version": 1690341671655,
64
+ "deleted": false,
65
+ "object": "invoice",
66
+ "first_invoice": true,
67
+ "amount_to_collect": 0,
68
+ "round_off_amount": 0,
69
+ "new_sales_amount": 1995,
70
+ "has_advance_charges": false,
71
+ "currency_code": "USD",
72
+ "base_currency_code": "USD",
73
+ "generated_at": 1689068274,
74
+ "is_gifted": false,
75
+ "term_finalized": true,
76
+ "channel": "web",
77
+ "tax": 0,
78
+ "line_items": [{
79
+ "id": "li_16BQpCTjh0LWhkWe",
80
+ "date_from": 1689068274,
81
+ "date_to": 1691746674,
82
+ "unit_amount": 1995,
83
+ "quantity": 1,
84
+ "amount": 1995,
85
+ "pricing_model": "flat_fee",
86
+ "is_taxed": false,
87
+ "tax_amount": 0,
88
+ "object": "line_item",
89
+ "subscription_id": "AzymDoTjgzDShlvd",
90
+ "customer_id": "AzymDoTjgzDShlvd",
91
+ "description": "Somiibo Premium (Monthly)",
92
+ "entity_type": "plan",
93
+ "entity_id": "somiibo-premium-monthly-1",
94
+ "tax_exempt_reason": "tax_not_configured",
95
+ "discount_amount": 0,
96
+ "item_level_discount_amount": 0
97
+ }],
98
+ "sub_total": 1995,
99
+ "linked_payments": [{
100
+ "txn_id": "txn_16BQpCTjh0LXqkWf",
101
+ "applied_amount": 1995,
102
+ "applied_at": 1689068276,
103
+ "txn_status": "success",
104
+ "txn_date": 1689068274,
105
+ "txn_amount": 1995
106
+ }],
107
+ "applied_credits": [],
108
+ "adjustment_credit_notes": [],
109
+ "issued_credit_notes": [{
110
+ "cn_id": "CN-102",
111
+ "cn_reason_code": "product_unsatisfactory",
112
+ "cn_create_reason_code": "Product Unsatisfactory",
113
+ "cn_date": 1690341670,
114
+ "cn_total": 1995,
115
+ "cn_status": "refunded"
116
+ }],
117
+ "linked_orders": [],
118
+ "dunning_attempts": [],
119
+ "billing_address": {
120
+ "first_name": "biran",
121
+ "last_name": "faya",
122
+ "line1": "31 Rue Salvador Allende",
123
+ "city": "La Talaudière",
124
+ "state": "Auvergne-Rhône-Alpes",
125
+ "country": "FR",
126
+ "zip": "42350",
127
+ "validation_status": "not_validated",
128
+ "object": "billing_address"
129
+ },
130
+ "shipping_address": {
131
+ "first_name": "biran",
132
+ "last_name": "faya",
133
+ "line1": "31 Rue Salvador Allende",
134
+ "city": "La Talaudière",
135
+ "state": "Auvergne-Rhône-Alpes",
136
+ "country": "FR",
137
+ "zip": "42350",
138
+ "validation_status": "not_validated",
139
+ "object": "shipping_address"
140
+ }
141
+ }
142
+ }]
143
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "id": "Azym2sTkewehg121r",
3
+ "plan_id": "somiibo-premium-monthly-1",
4
+ "plan_quantity": 1,
5
+ "plan_unit_price": 1995,
6
+ "billing_period": 1,
7
+ "billing_period_unit": "month",
8
+ "trial_end": 1691163612,
9
+ "customer_id": "6oZd9TkevuCLyl4",
10
+ "plan_amount": 1995,
11
+ "plan_free_quantity": 0,
12
+ "status": "active",
13
+ "trial_start": 1689954012,
14
+ "current_term_start": 1691163612,
15
+ "current_term_end": 1693842012,
16
+ "next_billing_at": 1693842012,
17
+ "created_at": 1689954012,
18
+ "started_at": 1689954012,
19
+ "activated_at": 1691163612,
20
+ "created_from_ip": "172.58.147.191",
21
+ "updated_at": 1691163620,
22
+ "has_scheduled_changes": false,
23
+ "channel": "web",
24
+ "resource_version": 1691163620570,
25
+ "deleted": false,
26
+ "object": "subscription",
27
+ "currency_code": "USD",
28
+ "shipping_address": {
29
+ "first_name": "Randull",
30
+ "last_name": "Washington",
31
+ "line1": "2940 Indiana Avenue",
32
+ "city": "Fort Campbell",
33
+ "state_code": "KY",
34
+ "state": "Kentucky",
35
+ "country": "US",
36
+ "zip": "42223",
37
+ "validation_status": "not_validated",
38
+ "object": "shipping_address"
39
+ },
40
+ "due_invoices_count": 1,
41
+ "due_since": 1691163612,
42
+ "total_dues": 1995,
43
+ "mrr": 1995,
44
+ "exchange_rate": 1,
45
+ "base_currency_code": "USD",
46
+ "cf_clientorderid": "1689953380139-0738",
47
+ "has_scheduled_advance_invoices": false
48
+ }
@@ -0,0 +1,204 @@
1
+ {
2
+ "addresses": {
3
+ "pusdc": "0x21a82002d9d144a88da763429332ae66abccc489",
4
+ "dai": "0xd521590a206b7a768c2b91e76b1e55416cc957a4",
5
+ "polygon": "0x1103a791462d893b47d557b797a8373cb369923a",
6
+ "bitcoin": "34fzH947Xbb9frUHQgxDkdeeZ5CHQkVdG5",
7
+ "apecoin": "0xd197eb4d9e4bdb124c99903157287bef2c1ec83b",
8
+ "pweth": "0x3ebfa486147820d1d155d88f8a5c1b4fe2c749bc",
9
+ "usdc": "0x21a82002d9d144a88da763429332ae66abccc489",
10
+ "litecoin": "MTfdmP8hknqi8Jv7oyFHPQcDA21XiXSS9d",
11
+ "dogecoin": "D8G1MzRrdifM9Cq6wELyCde7VF52TnmdGH",
12
+ "ethereum": "0x3ebfa486147820d1d155d88f8a5c1b4fe2c749bc",
13
+ "tether": "0x1016c9d7f623d73825ede16c718b7d5c18650ac2",
14
+ "shibainu": "0xa00b30d38c5d878d7556e8d380fee19d1c0747c4",
15
+ "bitcoincash": "qpurv662v6kt7t2ugg23x0lv9t4d44cyvgx4mzxgfp"
16
+ },
17
+ "brand_color": "#122332",
18
+ "brand_logo_url": "https://res.cloudinary.com/commerce/image/upload/v1669469783/o5msi7avehknjrpyjwts.png",
19
+ "code": "FBHJR22R",
20
+ "coinbase_managed_merchant": true,
21
+ "confirmed_at": "2023-04-26T10:31:42Z",
22
+ "created_at": "2023-04-26T09:59:19Z",
23
+ "description": "Slapform Sumo",
24
+ "exchange_rates": {
25
+ "USDC-USD": "1.0",
26
+ "LTC-USD": "91.1",
27
+ "SHIB-USD": "0.000010505",
28
+ "PMATIC-USD": "1.0148",
29
+ "BCH-USD": "120.33",
30
+ "USDT-USD": "1.000225",
31
+ "ETH-USD": "1897.2",
32
+ "DOGE-USD": "0.081105",
33
+ "APE-USD": "4.027",
34
+ "BTC-USD": "28883.255",
35
+ "DAI-USD": "0.99995",
36
+ "PWETH-USD": "1896.73",
37
+ "PUSDC-USD": "1.0"
38
+ },
39
+ "expires_at": "2023-04-26T10:29:19Z",
40
+ "fee_rate": 0.01,
41
+ "hosted_url": "https://commerce.coinbase.com/charges/FBHJR22R",
42
+ "id": "8f783fa6-eaa3-4460-af64-cac26b183ed1",
43
+ "local_exchange_rates": {
44
+ "USDC-USD": "1.0",
45
+ "LTC-USD": "91.1",
46
+ "SHIB-USD": "0.000010505",
47
+ "PMATIC-USD": "1.0148",
48
+ "BCH-USD": "120.33",
49
+ "USDT-USD": "1.000225",
50
+ "ETH-USD": "1897.2",
51
+ "DOGE-USD": "0.081105",
52
+ "APE-USD": "4.027",
53
+ "BTC-USD": "28883.255",
54
+ "DAI-USD": "0.99995",
55
+ "PWETH-USD": "1896.73",
56
+ "PUSDC-USD": "1.0"
57
+ },
58
+ "logo_url": "https://res.cloudinary.com/commerce/image/upload/v1669469783/o5msi7avehknjrpyjwts.png",
59
+ "metadata": {
60
+ "uid": "O4Env11pWgSCYnQ0zSfwSjv44ak2",
61
+ "email": "customer@gmail.com",
62
+ "planId": "sumo",
63
+ "clientOrderId": "1682503105825-0982",
64
+ "name": null
65
+ },
66
+ "name": "Slapform Sumo",
67
+ "offchain_eligible": true,
68
+ "organization_name": "ITW Creative Works",
69
+ "payment_threshold": {
70
+ "overpayment_absolute_threshold": {
71
+ "amount": "9999.00",
72
+ "currency": "USD"
73
+ },
74
+ "underpayment_relative_threshold": "0.05"
75
+ },
76
+ "payments": [{
77
+ "payment_id": "23668f49-5b1f-43cc-8d43-0e0a4aa373ea",
78
+ "network": "bitcoin",
79
+ "transaction_id": "5f77305b7d09572cb4cd4bf758baf7d59bffebd55cfe727362646cdd08fbaee9",
80
+ "status": "CONFIRMED",
81
+ "detected_at": "2023-04-26T10:06:55Z",
82
+ "value": {
83
+ "local": {
84
+ "amount": "16.00",
85
+ "currency": "USD"
86
+ },
87
+ "crypto": {
88
+ "amount": "0.00055395",
89
+ "currency": "BTC"
90
+ }
91
+ },
92
+ "block": {
93
+ "height": 787072,
94
+ "hash": "00000000000000000000032c1682e545847242a8486a8c0ceb996af46eeb1c57",
95
+ "confirmations": 1,
96
+ "confirmations_required": 1
97
+ },
98
+ "deposited": {
99
+ "autoconversion_enabled": true,
100
+ "autoconversion_status": "PENDING",
101
+ "status": "PENDING",
102
+ "destination": "hello@business.com",
103
+ "exchange_rate": null,
104
+ "amount": {
105
+ "gross": {
106
+ "local": null,
107
+ "crypto": {
108
+ "amount": "0.00055395",
109
+ "currency": "BTC"
110
+ }
111
+ },
112
+ "net": {
113
+ "local": null,
114
+ "crypto": {
115
+ "amount": "0.00054842",
116
+ "currency": "BTC"
117
+ }
118
+ },
119
+ "coinbase_fee": {
120
+ "local": null,
121
+ "crypto": {
122
+ "amount": "0.00000553",
123
+ "currency": "BTC"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }],
129
+ "pricing": {
130
+ "local": {
131
+ "amount": "16.00",
132
+ "currency": "USD"
133
+ },
134
+ "pusdc": {
135
+ "amount": "16.000000",
136
+ "currency": "PUSDC"
137
+ },
138
+ "dai": {
139
+ "amount": "16.000800048000000000",
140
+ "currency": "DAI"
141
+ },
142
+ "polygon": {
143
+ "amount": "15.766654000",
144
+ "currency": "PMATIC"
145
+ },
146
+ "bitcoin": {
147
+ "amount": "0.00055395",
148
+ "currency": "BTC"
149
+ },
150
+ "apecoin": {
151
+ "amount": "3.973181028060591011",
152
+ "currency": "APE"
153
+ },
154
+ "pweth": {
155
+ "amount": "0.008435570692718521",
156
+ "currency": "PWETH"
157
+ },
158
+ "usdc": {
159
+ "amount": "16.000000",
160
+ "currency": "USDC"
161
+ },
162
+ "litecoin": {
163
+ "amount": "0.17563117",
164
+ "currency": "LTC"
165
+ },
166
+ "dogecoin": {
167
+ "amount": "197.27513717",
168
+ "currency": "DOGE"
169
+ },
170
+ "ethereum": {
171
+ "amount": "0.008433000",
172
+ "currency": "ETH"
173
+ },
174
+ "tether": {
175
+ "amount": "15.996401",
176
+ "currency": "USDT"
177
+ },
178
+ "shibainu": {
179
+ "amount": "1523084.245597328000000000",
180
+ "currency": "SHIB"
181
+ },
182
+ "bitcoincash": {
183
+ "amount": "0.13296767",
184
+ "currency": "BCH"
185
+ }
186
+ },
187
+ "pricing_type": "fixed_price",
188
+ "pwcb_only": false,
189
+ "resource": "charge",
190
+ "support_email": "support@business.com",
191
+ "timeline": [{
192
+ "status": "NEW",
193
+ "context": "OTHER",
194
+ "time": "2023-04-26T09:59:19Z"
195
+ }, {
196
+ "status": "PENDING",
197
+ "context": "OTHER",
198
+ "time": "2023-04-26T10:07:02Z"
199
+ }, {
200
+ "status": "COMPLETED",
201
+ "context": "OTHER",
202
+ "time": "2023-04-26T10:31:42Z"
203
+ }]
204
+ }