PaymentServiceDefinitions
list - List payment service definitions
get - Get a payment service definition
session - Create a session for a payment service definition
List the definitions of each payment service that can be configured.
from gr4vy import Gr4vy
import os
with Gr4vy (
bearer_auth = os .getenv ("GR4VY_BEARER_AUTH" , "" ),
) as g_client :
res = g_client .payment_service_definitions .list (cursor = "ZXhhbXBsZTE" , limit = 20 )
while res is not None :
# Handle items
res = res .next ()
Parameter
Type
Required
Description
Example
cursor
OptionalNullable[str]
➖
A pointer to the page of results to return.
ZXhhbXBsZTE
limit
Optional[int]
➖
The maximum number of items that are at returned.
20
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.ListPaymentServiceDefinitionsResponse
Error Type
Status Code
Content Type
errors.Error400
400
application/json
errors.Error401
401
application/json
errors.Error403
403
application/json
errors.Error404
404
application/json
errors.Error405
405
application/json
errors.Error409
409
application/json
errors.HTTPValidationError
422
application/json
errors.Error425
425
application/json
errors.Error429
429
application/json
errors.Error500
500
application/json
errors.Error502
502
application/json
errors.Error504
504
application/json
errors.APIError
4XX, 5XX
*/*
Get the definition of a payment service that can be configured.
from gr4vy import Gr4vy
import os
with Gr4vy (
bearer_auth = os .getenv ("GR4VY_BEARER_AUTH" , "" ),
) as g_client :
res = g_client .payment_service_definitions .get (payment_service_definition_id = "adyen-ideal" )
# Handle response
print (res )
Parameter
Type
Required
Description
Example
payment_service_definition_id
str
✔️
N/A
adyen-ideal
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.PaymentServiceDefinition
Error Type
Status Code
Content Type
errors.Error400
400
application/json
errors.Error401
401
application/json
errors.Error403
403
application/json
errors.Error404
404
application/json
errors.Error405
405
application/json
errors.Error409
409
application/json
errors.HTTPValidationError
422
application/json
errors.Error425
425
application/json
errors.Error429
429
application/json
errors.Error500
500
application/json
errors.Error502
502
application/json
errors.Error504
504
application/json
errors.APIError
4XX, 5XX
*/*
Creates a session for a payment service that supports sessions.
from gr4vy import Gr4vy
import os
with Gr4vy (
bearer_auth = os .getenv ("GR4VY_BEARER_AUTH" , "" ),
) as g_client :
res = g_client .payment_service_definitions .session (payment_service_definition_id = "adyen-ideal" , request_body = {
})
# Handle response
print (res )
Parameter
Type
Required
Description
Example
payment_service_definition_id
str
✔️
N/A
adyen-ideal
request_body
Dict[str, Any ]
✔️
N/A
retries
Optional[utils.RetryConfig]
➖
Configuration to override the default retry behavior of the client.
models.CreateSession
Error Type
Status Code
Content Type
errors.Error400
400
application/json
errors.Error401
401
application/json
errors.Error403
403
application/json
errors.Error404
404
application/json
errors.Error405
405
application/json
errors.Error409
409
application/json
errors.HTTPValidationError
422
application/json
errors.Error425
425
application/json
errors.Error429
429
application/json
errors.Error500
500
application/json
errors.Error502
502
application/json
errors.Error504
504
application/json
errors.APIError
4XX, 5XX
*/*