Request a Payment Session #
Creates a payment session for Flow. The values you provide in the request will be used to determine the payment methods available to Flow. Some payment methods may require you to provide specific values for certain fields. You must supply the unmodified response body when you initialize Flow.
Authorizations
bearer
HTTP: bearer #
HTTP Authorization Scheme: bearer
Bearer format: JWT
Authorizationrequired stringBearer token (API Key or OAuth2 Access Token).
Request Body schema: application/json #
Request body for creating a Flow payment session.
amountrequired number >= 0 The payment amount in minor units. Provide 0 to perform a card verification. currencyrequired string = 3 characters The three-letter ISO currency code. billingrequired objectThe billing details. success_urlrequired string <= 1024 characters Overrides the default success redirect URL for payment methods that require a redirect. failure_urlrequired string <= 1024 characters Overrides the default failure redirect URL for payment methods that require a redirect. payment_type string Default: “Regular” Enum:”Regular””Recurring””MOTO””Installment””Unscheduled”Must be specified for card-not-present (CNP) payments. billing_descriptor objectA description of the purchase, displayed on the customer’s statement. reference string <= 50 characters A reference to identify the payment (max 50 chars, Amex: 30, iDEAL: 35, Benefit: unique alphanumeric). description string <= 100 characters A description for the payment (max 100 chars). customer objectThe customer’s details. Required if source.type is tamara. shipping objectThe shipping details. recipient objectInformation about the recipient of the payment’s funds. processing objectProcessing options. instruction objectDetails about the payment instruction. processing_channel_id string^(pc)_(\w{26})$The processing channel to use for the payment. expires_on stringA timestamp specifying when the PaymentSession should expire, as an ISO 8601 code. payment_method_configuration objectConfigurations for payment method-specific settings. enabled_payment_methods Array of stringsSpecifies which payment method options to present to the customer. disabled_payment_methods Array of stringsSpecifies which payment method options to not present to the customer. items Array of objectsThe line items in the order. amount_allocations Array of objectsThe sub-entities that the payment is being processed on behalf of. risk objectConfigures the risk assessment performed during payment processing. customer_retry objectConfiguration for asynchronous retries. display_name string <= 255 characters The merchant’s display name. metadata objectAllows you to store additional information about a transaction with custom fields (up to 18 fields, 255 chars each). locale string Default: “en-GB”Creates a translated version of the page in the specified language. 3ds objectInformation required for 3D Secure authentication payments. sender objectThe sender of the payment. capture boolean Default: trueSpecifies whether to capture the payment, if applicable. capture_on stringA timestamp specifying when to capture the payment, as an ISO 8601 code.
Responses #
201 A Payment Session.
Response Schema: application/json #
idrequired stringThe Payment Session unique identifier. status stringThe status of the payment session. payment_id stringThe payment identifier associated with the session. amount numberThe payment amount in minor units. currency stringThe three-letter ISO currency code. reference stringA reference to identify the payment. description stringA description for the payment. expires_on stringA timestamp specifying when the PaymentSession should expire, as an ISO 8601 code. customer objectThe customer’s details. billing objectThe billing details. products Array of objectsThe products in the order. payment_session_token stringA unique token representing the payment session, which you must provide when you initialize Flow. payment_session_secret stringThe secret used by Flow to authenticate payment session requests. _linksrequired objectThe links related to the Payment Session.
401 Unauthorized
422 Invalid data was sent.
Response Schema: application/json #
request_idrequired stringThe unique request identifier. error_typerequired stringThe error type. error_codesrequired Array of stringsThe error codes.
429 Too many requests.
Response Schema: application/json #
request_idrequired stringThe unique request identifier. error_typerequired stringThe error type. error_codesrequired Array of stringsThe error codes.
502 Bad gateway
Submit a Payment Session Payment #
Submit a payment attempt for a payment session. Request a payment via your created payment session. This request works with the Flow handleSubmit callback, where you can perform a customized payment submission. You must send the unmodified response body as the response of the handleSubmit callback.
Authorizations
bearer
HTTP: bearer #
HTTP Authorization Scheme: bearer
Bearer format: JWT
Authorizationrequired stringBearer token (API Key or OAuth2 Access Token).
Request Body schema: application/json #
Request body for submitting a payment session payment.
session_datarequired stringA unique token representing the additional customer data captured by Flow, as received from the handleSubmit callback. Do not log or store this value. amountrequired number >= 0 The payment amount in minor units. Provide 0 to perform a card verification. reference string <= 50 characters A reference to identify the payment (max 50 chars, Amex: 30, iDEAL: 35, Benefit: unique alphanumeric). items Array of objectsThe line items in the order. 3ds objectInformation required for 3D Secure authentication payments. ip_address string <= 45 characters The customer’s IP address. Only IPv4 and IPv6 addresses are accepted.
Responses #
201 Payment processed successfully
Response Schema: application/json #
idrequired stringThe payment identifier. statusrequired stringThe payment’s status. typerequired Array of stringsThe payment method name.
202 Payment asynchronous or further action required
Response Schema: application/json #
idrequired stringThe payment identifier. statusrequired stringThe payment’s status. typerequired stringThe payment method name. actionrequired objectInstruction for further payment action.
401 Unauthorized
422 Invalid data was sent.
Response Schema: application/json #
request_idrequired stringThe unique request identifier. error_typerequired stringThe error type. error_codesrequired Array of stringsThe error codes.
429 Too many requests or duplicate request detected
Response Schema: application/json #
request_idrequired stringThe unique request identifier. error_typerequired stringThe error type. error_codesrequired Array of stringsThe error codes.
502 Bad gateway
Get Payment Session Details #
Returns the details of the payment session with the specified identifier string.
Authorizations
bearer
HTTP: bearer #
HTTP Authorization Scheme: bearer
Bearer format: JWT
path Parameters #
Authorizationrequired stringBearer token (API Key or OAuth2 Access Token).
200 Payment session retrieved successfully
Response Schema: application/json #
idrequired stringThe Payment Session unique identifier. status stringThe status of the payment session. payment_id stringThe payment identifier associated with the session. amount numberThe payment amount in minor units. currency stringThe three-letter ISO currency code. reference stringA reference to identify the payment. description stringA description for the payment. expires_on stringA timestamp specifying when the PaymentSession should expire, as an ISO 8601 code. customer objectThe customer’s details. billing objectThe billing details. products Array of objectsThe products in the order. payment_session_token stringA unique token representing the payment session, which you must provide when you initialize Flow. payment_session_secret stringThe secret used by Flow to authenticate payment session requests. _linksrequired objectThe links related to the Payment Session.
401 Unauthorized 404 Session not found