Skip to content

Latest commit

 

History

History
71 lines (56 loc) · 3.81 KB

PaymentCardTokenService.md

File metadata and controls

71 lines (56 loc) · 3.81 KB

PaymentCardTokenService

A list of all methods in the PaymentCardTokenService service. Click on the method name to view detailed information about that method.

Methods Description
create_card_token Create a hosted page for a customer to save card details and manage cards. Prerequisite: Create Customer.

create_card_token

Create a hosted page for a customer to save card details and manage cards. Prerequisite: Create Customer.

  • HTTP Method: POST
  • Endpoint: /v1/hosted/collect/card/

Parameters

Name Type Required Description
request_body CollectCardBody The request body.
access_key str Unique access key provided by Rapyd for each authorized user.
content_type str Indicates that the data appears in JSON format. Set to application/json.
salt str Random string. Recommended length: 8-16 characters.
signature str Signature calculated for each request individually. See Request Signatures.
timestamp str Timestamp for the request, in Unix time (seconds).
idempotency str A unique key that prevents the platform from creating the same object twice.

Return Type

InlineResponse200_85

Example Usage Code Snippet

from rapyd_sdk import RapydSdk, Environment
from rapyd_sdk.models import CollectCardBody

sdk = RapydSdk(
    base_url=Environment.DEFAULT.value,
    timeout=10000
)

request_body = CollectCardBody(
    billing_address_collect=True,
    cancel_url="cancel_url",
    card_fields={
        "recurrence_type": "unscheduled"
    },
    complete_url="complete_url",
    complete_payment_url="complete_payment_url",
    country="country",
    currency="currency",
    customer="customer",
    error_payment_url="error_payment_url",
    language="en",
    page_expiration="page_expiration",
    payment_method_type="payment_method_type"
)

result = sdk.payment_card_token.create_card_token(
    request_body=request_body,
    access_key="access_key",
    content_type="Content-Type",
    salt="salt",
    signature="signature",
    timestamp="timestamp",
    idempotency="idempotency"
)

print(result)