Buy card

Returns `404 Not Found` if no cards are available

Request

Method: POST
Route: api/checkout/buy-card
Example: api/checkout/buy-card
Input Value
denomination 3200
project_id 12
success_url http://www.lombardi.com/rem-ullam-eum-ducimus-minima-culpa-iusto.html
cancel_url https://guerra.it/dolores-et-dolor-illo-qui-eos.html
Request Headers
host: localhost:49527
user-agent: Symfony
accept: application/json
accept-language: en-us,en;q=0.5
accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjQ5NTI3IiwiaWF0IjoxNjUyNzc1OTUyLCJuYmYiOjE2NTI3NzU5NTIsImp0aSI6Ik0za0dzS1Y5N3FWdVZYVVIiLCJzdWIiOiI0MyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.FYWMMAHMIna2vGPq9yiwwD4qHPdLh3Ohuv0j0F8tzoM
content-length: 197
content-type: application/json

Response

200 JSON
Response Headers
cache-control: no-cache, private
date: Tue, 17 May 2022 08:25:53 GMT
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
{
    "data": {
        "id": "cs_test_a10pHHdXAwkjGrzCvliKA0AHKiQOs4YJFM7zM9lHsERgkEqm08ZQhpdZLA",
        "url": "https:\/\/checkout.stripe.com\/pay\/cs_test_a10pHHdXAwkjGrzCvliKA0AHKiQOs4YJFM7zM9lHsERgkEqm08ZQhpdZLA#fidkdWxOYHwnPyd1blpxYHZxWjA0Tkh2dEFDdV09dG1Xa3F1QzBgcVJ8NlRmYkdSY0I2VX1tTTM2aExjUUZRQFRzMlQ8Um5XME5RalRSazV9Yz1pckRraT11UkFPcDVwR3ZJY31XaEg2MFBVNTVQVWx8Sm5cNicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl"
    }
}

Time: 0.28

insert into `users` (`updated_at`, `created_at`) values (?, ?)
Bindings
0: 2022-05-17 08:25:52
1: 2022-05-17 08:25:52

Time: 0.26

insert into `login_tokens` (`user_id`, `token`, `medium_type`, `medium_handle`, `expires_at`, `section`, `consumed_at`, `callback_url`, `updated_at`, `created_at`) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings
0: 43
1: CRmHwpQ9vW
2: email
3: [email protected]
4: 2022-05-17 08:40:52
5: Pl78Cb0yfLam3fJ2
6:
7: http://ledner.com/quidem-repellendus-facilis-animi-unde.html
8: 2022-05-17 08:25:52
9: 2022-05-17 08:25:52

Time: 0.32

select * from `users` where (`phone_verified_at` is not null or `email_verified_at` is not null) and `id` = ? limit 1
Bindings
0: 43

Time: 0.47

select * from `users` where (`phone_verified_at` is null or `email_verified_at` is null) and `id` = ? limit 1
Bindings
0: 43

Time: 0.42

update `users` set `email_verified_at` = ?, `email` = ?, `users`.`updated_at` = ? where `id` = ?
Bindings
0: 2022-05-17 08:25:52
1: [email protected]
2: 2022-05-17 08:25:52
3: 43

Time: 0.37

update `login_tokens` set `consumed_at` = ?, `login_tokens`.`updated_at` = ? where `id` = ?
Bindings
0: 2022-05-17 08:25:52
1: 2022-05-17 08:25:52
2: 56

Time: 0.41

insert into `brands` (`name`, `updated_at`, `created_at`) values (?, ?, ?)
Bindings
0: Patagonia
1: 2022-05-17 08:25:52
2: 2022-05-17 08:25:52

Time: 0.36

update `brands` set `corner_logo` = ?, `brands`.`updated_at` = ? where `id` = ?
Bindings
0: https://via.placeholder.com/640x480.png/007799?text=autem
1: 2022-05-17 08:25:52
2: 14

Time: 0.22

insert into `organizations` (`name`, `updated_at`, `created_at`) values (?, ?, ?)
Bindings
0: UILDM
1: 2022-05-17 08:25:52
2: 2022-05-17 08:25:52

Time: 0.25

update `organizations` set `corner_logo` = ?, `organizations`.`updated_at` = ? where `id` = ?
Bindings
0: https://via.placeholder.com/640x480.png/00ee88?text=temporibus
1: 2022-05-17 08:25:52
2: 14

Time: 0.24

insert into `projects` (`name`, `deadline`, `intro`, `description`, `brand_id`, `organization_id`, `updated_at`, `created_at`) values (?, ?, ?, ?, ?, ?, ?, ?)
Bindings
0: Ricerca per sconfiggere la malattia
1: 2023-05-25 03:32:38
2: Libero similique quisquam ad ut dignissimos. Porro molestias saepe ullam non omnis. Velit eos recusandae omnis sint minus et. Culpa temporibus laboriosam accusamus veritatis. Blanditiis quis voluptas autem autem qui dolorum et.
3: Atque sit aliquid quidem ipsum animi molestiae veniam. Voluptatem dignissimos atque repellendus sunt autem quia. Recusandae ea veritatis quis rerum.
4: 14
5: 14
6: 2022-05-17 08:25:52
7: 2022-05-17 08:25:52

Time: 0.3

select `slug`, `projects`.`id` from `projects` where (`slug` = ? or `slug` LIKE ?)
Bindings
0: ricerca-per-sconfiggere-la-malattia-12
1: ricerca-per-sconfiggere-la-malattia-12-%

Time: 0.27

update `projects` set `name` = ?, `deadline` = ?, `intro` = ?, `description` = ?, `brand_id` = ?, `organization_id` = ?, `created_at` = ?, `id` = ?, `slug` = ?, `projects`.`updated_at` = ? where `id` = ?
Bindings
0: Ricerca per sconfiggere la malattia
1: 2023-05-25 03:32:38
2: Libero similique quisquam ad ut dignissimos. Porro molestias saepe ullam non omnis. Velit eos recusandae omnis sint minus et. Culpa temporibus laboriosam accusamus veritatis. Blanditiis quis voluptas autem autem qui dolorum et.
3: Atque sit aliquid quidem ipsum animi molestiae veniam. Voluptatem dignissimos atque repellendus sunt autem quia. Recusandae ea veritatis quis rerum.
4: 14
5: 14
6: 2022-05-17 08:25:52
7: 12
8: ricerca-per-sconfiggere-la-malattia-12
9: 2022-05-17 08:25:52
10: 12

Time: 0.29

update `projects` set `background_image` = ?, `giftcard_logo` = ?, `link_text` = ?, `link_href` = ?, `location_address` = ?, `location_title` = ?, `location_description` = ?, `location_email` = ?, `location_link_href` = ?, `location_link_text` = ?, `location_latitude` = ?, `location_longitude` = ?, `start_at` = ?, `projects`.`updated_at` = ? where `id` = ?
Bindings
0: https://via.placeholder.com/640x480.png/000099?text=consequuntur
1: https://via.placeholder.com/640x480.png/002233?text=ratione
2: et veritatis ad
3: http://www.glover.net/aut-nemo-quia-et-dolorem.html
4: 66407 Haley Harbors Suite 140 West Marvin, FL 75316
5: laboriosam aspernatur mollitia
6: Culpa reiciendis exercitationem facilis deserunt rem magni.
7: [email protected]
8: http://www.nader.com/
9: laboriosam sint error
10: -45.229478
11: 3.546772
12: 2022-05-17 05:13:05
13: 2022-05-17 08:25:52
14: 12

Time: 0.36

insert into `cards` (`project_id`, `serial`, `denomination`, `status`, `updated_at`, `created_at`) values (?, ?, ?, ?, ?, ?)
Bindings
0: 12
1: HyyRHWZUdw
2: 3200
3: available
4: 2022-05-17 08:25:52
5: 2022-05-17 08:25:52

Time: 0.4

update `cards` set `gradient_color_1` = ?, `gradient_color_2` = ?, `expires_at` = ?, `info` = ?, `terms` = ?, `cards`.`updated_at` = ? where `id` = ?
Bindings
0: #70aa1b
1: #5529bd
2: 2023-04-02 21:47:19
3: []
4: Voluptatem occaecati minus totam voluptatibus perspiciatis excepturi facere.
Id animi et officiis porro veritatis aspernatur.Minus accusamus qui repudiandae.Necessitatibus odit eos blanditiis eius explicabo sed inventore similique.
  • Velit nemo.
  • Et dolorem dolores aut qui.
  • Autem est accusamus.
  • Odit provident.
  • Corporis officiis.
  • Alias odit eveniet quos sapiente.
  • Quas qui.
  • Delectus ut autem nisi.
  • Maiores accusantium non consequatur.
  • In beatae beatae.
5: 2022-05-17 08:25:52
6: 27

Time: 0.46

select * from `users` where (`phone_verified_at` is not null or `email_verified_at` is not null) and `id` = ? limit 1
Bindings
0: 43

Time: 0.46

select * from `projects` where `id` = ? limit 1
Bindings
0: 12

Time: 0.38

select * from `brands` where `brands`.`id` in (14)

Time: 0.38

select * from `organizations` where `organizations`.`id` in (14)

Time: 0.48

select * from `cards` where `user_id` is null and `status` = ? and `project_id` = ? and `denomination` = ? limit 1
Bindings
0: available
1: 12
2: 3200

Time: 0.47

update `cards` set `user_id` = ?, `payment_intent` = ?, `checkout_session` = ?, `checkout_status` = ?, `status` = ?, `reserved_at` = ?, `cards`.`updated_at` = ? where `id` = ?
Bindings
0: 43
1: pi_3L0Lj2FpX8qhRntp0g6xqpZS
2: cs_test_a10pHHdXAwkjGrzCvliKA0AHKiQOs4YJFM7zM9lHsERgkEqm08ZQhpdZLA
3: created
4: reserved
5: 2022-05-17 08:25:53
6: 2022-05-17 08:25:53
7: 27

Request

Method: POST
Route: api/checkout/buy-card
Example: api/checkout/buy-card
Input Value
denomination 3200
project_id 12
success_url http://www.lombardi.com/rem-ullam-eum-ducimus-minima-culpa-iusto.html
cancel_url https://guerra.it/dolores-et-dolor-illo-qui-eos.html
Request Headers
host: localhost:49527
user-agent: Symfony
accept: application/json
accept-language: en-us,en;q=0.5
accept-charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjQ5NTI3IiwiaWF0IjoxNjUyNzc1OTUyLCJuYmYiOjE2NTI3NzU5NTIsImp0aSI6Ik0za0dzS1Y5N3FWdVZYVVIiLCJzdWIiOiI0MyIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.FYWMMAHMIna2vGPq9yiwwD4qHPdLh3Ohuv0j0F8tzoM
content-length: 197
content-type: application/json