Create a Hosted Payments Page session and pass through all the payment information, like the amount, currency, country and reference.
To get started with our Hosted Payments Page, contact your solutions engineer or request support.
| currency required | string = 3 characters The three-letter ISO currency code of the payment |
required | object The billing details |
| success_url required | string <uri> <= 255 characters For redirect payment methods, this overrides the default success redirect URL configured on your account |
| cancel_url required | string <uri> <= 255 characters The URL to which the customer should be directed if they cancel the payment |
| failure_url required | string <uri> <= 255 characters For redirect payment methods, this overrides the default failure redirect URL configured on your account |
| amount | integer >= 0 The payment amount. The exact format depends on the currency |
| payment_type | string Default: "Regular" This must be specified for card payments where the cardholder is not present (i.e., recurring or mail order / telephone order) |
| payment_ip | string <ipv4> <= 45 characters Deprecated The Customers IP address. Only IPv4 and IPv6 addresses are accepted. |
object An optional description that is displayed on the customer's statement identifying a purchase | |
| reference | string <= 50 characters A reference you can use to identify the payment. For example, an order number.
|
| description | string <= 100 characters A description of the payment |
| display_name | string The merchant name to display to customers on the checkout page. |
| processing_channel_id | string^(pc)_(\w{26})$ The processing channel to be used for the payment |
Array of objects (Amount Allocations) [ 1 .. 50 ] items The sub-entities that the payment is being processed on behalf of | |
object The customer's details | |
object The address any products are being sent to. | |
object (PaymentInterfacesRecipient) Information about the recipient of the payment's funds. Applies to Account Funding Transactions, and VISA or Mastercard domestic UK transactions processed by financial institutions. | |
object (PaymentInterfacesProcessing) Use the processing object to influence or override the data sent during card processing | |
| allow_payment_methods | Array of strings Specifies which payment method options to present to the customer. The values in this field override any equivalent values in Some payment methods have additional field requirements. See the documentation for more information. |
| disabled_payment_methods | Array of strings Specifies which payment method options to not present to the customer. If you specify the same payment method in this field and in Any payment method options not explicitly specified in this field will be presented to the customer by default. |
Array of objects [ 1 .. 1000 ] items Contains details about the products in the order. | |
object Configures the risk assessment performed during payment processing. | |
object Configures the parameters for customer retries. A customer retry is a payment attempt performed by the customer on the checkout page. This differs from authorization request retries performed in the back end by Checkout.com. | |
object The sender of the payment. | |
object (The Metadata Schema) Allows you to store additional information about the transaction. This object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays. | |
| locale | string Default: "en-GB" Creates a translated version of the page in the specified language |
object Information required for 3D Secure payments | |
| capture | boolean Whether to capture the payment (if applicable). |
| capture_on | string <date-time> A timestamp (ISO 8601 code) that determines when the payment should be captured.
Providing this field will automatically set |
object Details about the payment instruction. | |
object Configuration options for specific payment methods. |
Created Hosted Payments Page
Unauthorized
Invalid data was sent
{- "amount": 1000,
- "currency": "GBP",
- "payment_type": "Regular",
- "payment_ip": "90.197.169.245",
- "billing_descriptor": {
- "name": "string",
- "city": "string",
- "reference": "string"
}, - "reference": "ORD-123A",
- "description": "Payment for Gold Necklace",
- "display_name": "The Jewelry Shop",
- "processing_channel_id": "pc_q4dbxom5jbgudnjzjpz7j2z6uq",
- "amount_allocations": [
- {
- "id": "ent_w4jelhppmfiufdnatam37wrfc4",
- "amount": 1000,
- "reference": "ORD-5023-4E89",
- "commission": {
- "amount": 1000,
- "percentage": 1.125
}
}
], - "customer": {
- "email": "ali.farid@example.com",
- "name": "Ali Farid",
- "phone": {
- "country_code": "+1",
- "number": "415 555 2671"
}, - "summary": {
- "registration_date": "2023-05-01",
- "first_transaction_date": "2023-07-01",
- "last_payment_date": "2023-08-01",
- "total_order_count": 15,
- "last_payment_amount": 500,
- "is_premium_customer": true,
- "is_returning_customer": true,
- "lifetime_value": 500
}
}, - "shipping": {
- "address": {
- "address_line1": "123 High St.",
- "address_line2": "Flat 456",
- "city": "London",
- "state": "str",
- "zip": "SW1A 1AA",
- "country": "GB"
}, - "phone": {
- "country_code": "+1",
- "number": "415 555 2671"
}
}, - "billing": {
- "address": {
- "address_line1": "123 High St.",
- "address_line2": "Flat 456",
- "city": "London",
- "state": "str",
- "zip": "SW1A 1AA",
- "country": "GB"
}, - "phone": {
- "country_code": "+1",
- "number": "415 555 2671"
}
}, - "recipient": {
- "dob": "1985-05-15",
- "account_number": "5555554444",
- "address": {
- "address_line1": "123 High St.",
- "address_line2": "Flat 456",
- "city": "London",
- "state": "str",
- "zip": "SW1A 1AA",
- "country": "GB"
}, - "first_name": "Jia",
- "last_name": "Tsang"
}, - "processing": {
- "aft": true,
- "discount_amount": 0,
- "shipping_amount": 300,
- "tax_amount": 3000,
- "invoice_id": "string",
- "brand_name": "string",
- "locale": "en-US",
- "partner_customer_risk_data": {
- "key": "string",
- "value": "string"
}, - "custom_payment_method_ids": [
- "string"
], - "airline_data": [
- {
- "ticket": {
- "number": "045-21351455613",
- "issue_date": "2023-05-20",
- "issuing_carrier_code": "AI",
- "travel_package_indicator": "B",
- "travel_agency_name": "World Tours",
- "travel_agency_code": "01"
}, - "passenger": [
- {
- "first_name": "John",
- "last_name": "White",
- "date_of_birth": "1990-05-26",
- "address": {
- "country": "US"
}
}
], - "flight_leg_details": [
- {
- "flight_number": "101",
- "carrier_code": "BA",
- "class_of_travelling": "J",
- "departure_airport": "LHR",
- "departure_date": "2023-06-19",
- "departure_time": "15:30",
- "arrival_airport": "LAX",
- "stop_over_code": "x",
- "fare_basis_code": "SPRSVR"
}
]
}
], - "accommodation_data": [
- {
- "name": "The Sea View Hotel",
- "booking_reference": "HOTEL123",
- "check_in_date": "2023-06-20",
- "check_out_date": "2023-06-23",
- "address": {
- "address_line1": "123 Beach Road",
- "zip": "10001"
}, - "state": "FL",
- "country": "USA",
- "city": "Los Angeles",
- "number_of_rooms": 2,
- "guests": [
- {
- "first_name": "Jane",
- "last_name": "Doe",
- "date_of_birth": "1985-07-14"
}
], - "room": [
- {
- "rate": "70",
- "number_of_nights_at_room_rate": "3"
}
]
}
], - "order_id": "123456789",
- "surcharge_amount": 200,
- "duty_amount": 0,
- "shipping_tax_amount": 100,
- "affiliate_id": "string",
- "affiliate_url": "www.mycrypto.com",
- "purchase_country": "string",
- "merchant_initiated_reason": "Delayed_charge",
- "campaign_id": 0,
- "original_order_amount": 10,
- "receipt_id": "10",
- "merchant_callback_url": "string",
- "line_of_business": "Flights",
- "pan_preference": "fpan",
- "provision_network_token": true,
- "reconciliation_id": "4123495123",
- "aggregator": {
- "sub_merchant_id": "9cf70789ba90123",
- "aggregator_id_visa": "10012345",
- "aggregator_id_mc": "00000123456"
}
}, - "allow_payment_methods": [
- "card",
- "applepay",
- "googlepay"
], - "disabled_payment_methods": [
- "eps",
- "ideal",
- "knet"
], - "products": [
- {
- "reference": "string",
- "name": "Gold Necklace",
- "quantity": 1,
- "price": 1000
}
], - "risk": {
- "enabled": false
}, - "customer_retry": {
- "max_attempts": 2
}, - "sender": {
- "type": "instrument",
- "reference": "8285282045818"
}, - "metadata": { },
- "locale": "ar",
- "3ds": {
- "enabled": false,
- "attempt_n3d": false,
- "challenge_indicator": "no_preference",
- "allow_upgrade": true,
- "exemption": "low_value"
}, - "capture": true,
- "capture_on": "2019-08-24T14:15:22Z",
- "instruction": {
- "purpose": "donations"
}, - "payment_method_configuration": {
- "applepay": {
- "account_holder": {
- "type": "individual"
}
}, - "card": {
- "store_payment_details": "disabled",
- "account_holder": {
- "type": "individual"
}
}, - "googlepay": {
- "account_holder": {
- "type": "individual"
}
}, - "stored_card": {
- "customer_id": "string",
- "instrument_ids": [
- "string"
], - "default_instrument_id": "string"
}
}
}{- "id": "hpp_xGQBg0AXl3cM",
- "reference": "ORD-123A",
- "_links": {
}
}Retrieve details about a specific Hosted Payments Page using the ID returned when it was created. In the response, you will see the status of the Hosted Payments Page.
For more information, see the Hosted Payments Page documentation.
Hosted Payments Page details retrieved successfully
Unauthorized
Hosted Payments Page not found
// For more information please refer to https://github.com/checkout/checkout-sdk-net using Checkout.Payments.Hosted; ICheckoutApi api = CheckoutSdk.Builder().StaticKeys() .SecretKey("secret_key") .Environment(Environment.Sandbox) .EnvironmentSubdomain("{prefix}") // Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see https://www.checkout.com/docs/developer-resources/api/api-endpoints. .HttpClientFactory(new DefaultHttpClientFactory()) .Build(); try { HostedPaymentDetailsResponse response = await api.HostedPaymentsClient().GetHostedPaymentsPageDetails("hosted_payment_id"); } catch (CheckoutApiException e) { // API error string requestId = e.RequestId; var statusCode = e.HttpStatusCode; IDictionary<string, object> errorDetails = e.ErrorDetails; } catch (CheckoutArgumentException e) { // Bad arguments } catch (CheckoutAuthorizationException e) { // Invalid authorization }
{- "id": "hpp_xGQBg0AXl3cM",
- "status": "Payment Pending",
- "payment_id": "pay_88cb4e671m1da22e9bbbyx",
- "amount": 100,
- "currency": "GBP",
- "reference": "ORD-123A",
- "description": "Payment for Gold Necklace",
- "customer": {
- "email": "brucewayne@email.com",
- "name": "Bruce Wayne"
}, - "billing": {
- "address": {
- "address_line1": "123 High St.",
- "address_line2": "Flat 456",
- "city": "London",
- "state": "str",
- "zip": "SW1A 1AA",
- "country": "GB"
}, - "phone": {
- "country_code": "+1",
- "number": "415 555 2671"
}
}, - "products": [
- {
- "reference": "string",
- "name": "Gold Necklace",
- "quantity": 1,
- "price": 1000
}
], - "metadata": { },
- "amount_allocations": [
- {
- "id": "ent_w4jelhppmfiufdnatam37wrfc4",
- "amount": 1000,
- "reference": "ORD-5023-4E89",
- "commission": {
- "amount": 1000,
- "percentage": 1.125
}
}
], - "_links": {
}
}