Billing Service - rettersoft/rbs-docs GitHub Wiki

RBS Billing Service

Models

GetClientConfigsInput{
    cartSummary: CartSummary
    segmentId?: string
    logistics?: SelectedPool
}
PaymentMethod = "masterpass"|"iyzico"

AuthType = "AUTH"|"PRE_AUTH"
export interface InstallmentConfig{
    installmentCount: number
    interestRate: number
}
export interface InstallmentInfo extends InstallmentConfig{
    totalAmount: number
    installmentAmount: number
}
PaymentInfo {
    paymentMethod: PaymentMethod
    authType: AuthType
    providerConfigId: string
    installmentOptions: InstallmentInfo[]
}
PaymentOption extends PaymentInfo {
    amount: number
}
CommitMPPaymentInput{
    providerConfigId: string
    orderId: string
    transactionId: string
    purchaseToken: string
}


All amounts are integers and their unit is penny.

Actions

rbs.billing.request.GET_CLIENT_CONFIGS: gets possible payment configurations for client

You should get cart summary from Cart Service

You should get shipment pools from Logistics Service

(GetClientConfigsInput) -> (PaymentInfo[])


rbs.billing.request.GENERATE_MP_CLIENT_TOKEN: generates Masterpass client token (providerConfigId: string) -> (token: string)


rbs.billing.request.POST_COMMIT_MP_PAYMENT: commits Masterpass payment

(CommitMPPaymentInput) -> ()