Hi @devsmartup,
Welcome to the Rapyd developer community!
I suggest to create a hosted page with a predefined customer. After the customer purchases the products via the hosted checkout page, the details can be found in the βCustomersβ section of the Client Portal.
Step 1:
curl --location --request POST 'https://sandboxapi.rapyd.net/v1/checkout' \
--header 'Content-Type: application/json' \
--header 'access_key: MTHG' \
--header 'salt: 456af0f22' \
--header 'timestamp: 1661775419' \
--header 'signature: Y2FmZWEwOQ==' \
--data-raw '{
"complete_payment_url": "http://example.com/complete",
"country": "SG",
"currency": "SGD",
"customer": "cus_c150cfd8771f014ebba7e60fd76c99ee",
"error_payment_url": "http://example.com/error",
"merchant_reference_id": "0912-2021",
"language": "en",
"metadata": {
"merchant_defined": true
},
"payment_method_types_include": [
"sg_grabpay_ewallet"
],
"expiration": 1662027189,
"cart_items": [{
"name": "Bluetooth speaker model SJ-8097",
"amount": 120.00,
"quantity": 2
}, {
"name": "Pack of rechargeable batteries model 90-P",
"amount": 3.45,
"quantity": 1
}
]
}'
{
"status": {
"error_code": "",
"status": "SUCCESS",
"message": "",
"response_code": "",
"operation_id": "322c1597-4e66-4185-a2c0-9d01aef678d5"
},
"data": {
"id": "checkout_f9cf262dd62f3897a32ad43e674d496c",
"status": "NEW",
"language": "en",
"merchant_color": "323fff",
"merchant_logo": null,
"merchant_website": "https://rapyd.net",
"merchant_customer_support": {},
"merchant_alias": "Doc Team",
"merchant_terms": null,
"merchant_privacy_policy": null,
"page_expiration": 1662983799,
"redirect_url": "https://sandboxcheckout.rapyd.net?token=checkout_f9cf262dd62f3897a32ad43e674d496c",
"merchant_main_button": "place_your_order",
"cancel_checkout_url": "https://rapyd.net",
"complete_checkout_url": "https://rapyd.net",
"country": "SG",
"currency": "SGD",
"amount": 243.45,
"payment": {
"id": null,
"amount": 243.45,
"original_amount": 0,
"is_partial": false,
"currency_code": "SGD",
"country_code": "SG",
"status": null,
"description": "Payment via Checkout",
"merchant_reference_id": "0912-2021",
"customer_token": "cus_c150cfd8771f014ebba7e60fd76c99ee",
"payment_method": null,
"payment_method_data": {},
"expiration": 1662027189,
"captured": false,
"refunded": false,
"refunded_amount": 0,
"receipt_email": null,
"redirect_url": null,
"complete_payment_url": "http://example.com/complete",
"error_payment_url": "http://example.com/error",
"receipt_number": null,
"flow_type": null,
"address": null,
"statement_descriptor": null,
"transaction_id": null,
"created_at": 0,
"updated_at": 0,
"metadata": {
"merchant_defined": true
},
"failure_code": null,
"failure_message": null,
"paid": false,
"paid_at": 0,
"dispute": null,
"refunds": null,
"order": null,
"outcome": null,
"visual_codes": {},
"textual_codes": {},
"instructions": {},
"ewallet_id": null,
"ewallets": [],
"payment_method_options": {},
"payment_method_type": null,
"payment_method_type_category": null,
"fx_rate": null,
"merchant_requested_currency": null,
"merchant_requested_amount": null,
"fixed_side": null,
"payment_fees": null,
"invoice": null,
"escrow": null,
"group_payment": null,
"cancel_reason": null,
"initiation_type": "customer_present",
"mid": null,
"next_action": "not_applicable"
},
"payment_method_type": null,
"payment_method_type_categories": null,
"payment_method_types_include": [
"sg_grabpay_ewallet"
],
"payment_method_types_exclude": null,
"customer": "cus_c150cfd8771f014ebba7e60fd76c99ee",
"custom_elements": {
"save_card_default": false,
"display_description": false,
"payment_fees_display": true,
"merchant_currency_only": false,
"billing_address_collect": false,
"dynamic_currency_conversion": false
},
"timestamp": 1661774199,
"payment_expiration": null,
"cart_items": [
{
"name": "Bluetooth speaker model SJ-8097",
"amount": 120,
"quantity": 2,
"image": null
},
{
"name": "Pack of rechargeable batteries model 90-P",
"amount": 3.45,
"quantity": 1,
"image": null
}
],
"escrow": null,
"escrow_release_days": null
}
}
Step 2: Customer purchases items via checkout page:
Step 3 (Optional): βCustomersβ section of Client Portal displays the data:
You can also find more details when you inspect the related payment: