Created
February 1, 2023 14:12
-
-
Save moaazbhnas228/935ed67c612bd3eab0c02b16a1230615 to your computer and use it in GitHub Desktop.
Create a Session (Curl) #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --location --request POST 'https://api.tabby.ai/api/v2/checkout' \ | |
--header 'Authorization: Bearer pk_test_213886c2-92ed-4f0c-9286-b8a5ca92ad4d' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{ | |
"payment": { | |
"amount": "100", | |
"currency": "EGP", | |
"description": "string", | |
"buyer": { | |
"phone": "500000001", | |
"email": "card.success@tabby.ai", | |
"name": "string", | |
"dob": "2019-08-24" | |
}, | |
"buyer_history": { | |
"registered_since": "2019-08-24T14:15:22Z", | |
"loyalty_level": 0, | |
"wishlist_count": 0, | |
"is_social_networks_connected": true, | |
"is_phone_number_verified": true, | |
"is_email_verified": true | |
}, | |
"order": { | |
"tax_amount": "0.00", | |
"shipping_amount": "0.00", | |
"discount_amount": "0.00", | |
"updated_at": "2019-08-24T14:15:22Z", | |
"reference_id": "string", | |
"items": [ | |
{ | |
"title": "string", | |
"description": "string", | |
"quantity": 1, | |
"unit_price": "0.00", | |
"discount_amount": "0.00", | |
"reference_id": "string", | |
"image_url": "http://example.com", | |
"product_url": "http://example.com", | |
"gender": "Male", | |
"category": "string", | |
"color": "string", | |
"product_material": "string", | |
"size_type": "string", | |
"size": "string", | |
"brand": "string" | |
} | |
] | |
}, | |
"order_history": [ | |
{ | |
"purchased_at": "2019-08-24T14:15:22Z", | |
"amount": "0.00", | |
"payment_method": "card", | |
"status": "new", | |
"buyer": { | |
"phone": "string", | |
"email": "user@example.com", | |
"name": "string", | |
"dob": "2019-08-24" | |
}, | |
"shipping_address": { | |
"city": "string", | |
"address": "string", | |
"zip": "string" | |
}, | |
"items": [ | |
{ | |
"title": "string", | |
"description": "string", | |
"quantity": 1, | |
"unit_price": "0.00", | |
"discount_amount": "0.00", | |
"reference_id": "string", | |
"image_url": "http://example.com", | |
"product_url": "http://example.com", | |
"ordered": 0, | |
"captured": 0, | |
"shipped": 0, | |
"refunded": 0, | |
"gender": "Male", | |
"category": "string", | |
"color": "string", | |
"product_material": "string", | |
"size_type": "string", | |
"size": "string", | |
"brand": "string" | |
} | |
] | |
} | |
], | |
"shipping_address": { | |
"city": "string", | |
"address": "string", | |
"zip": "string" | |
}, | |
"meta": { | |
"order_id": "#1234", | |
"customer": "#customer-id" | |
}, | |
"attachment": { | |
"body": "{\"flight_reservation_details\": {\"pnr\": \"TR9088999\",\"itinerary\": [...],\"insurance\": [...],\"passengers\": [...],\"affiliate_name\": \"some affiliate\"}}", | |
"content_type": "application/vnd.tabby.v1+json" | |
} | |
}, | |
"lang": "en", | |
"merchant_code": "SHM", | |
"merchant_urls": { | |
"success": "https://your-store/success", | |
"cancel": "https://your-store/cancel", | |
"failure": "https://your-store/failure" | |
} | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment