Pagamentos
paymentsnamespaceMétodos de pagamento, histórico e rastreio.
7métodos
paymentsnamespaceEsta página é gerada automaticamente pelo
@luckymaker/sdk-generator. Não edite manualmente.
addMethod
Seção intitulada “addMethod”POST
/user/payment-method/addAssinatura:
addMethod(body?: AddMethodBody, settings?: SdkSettings): Promise<AddMethodResponse>| Nome | Tipo | Obrigatório |
|---|---|---|
captcha |
string |
sim |
token |
string |
sim |
type AddMethodBody = { "captcha": string; "token": string; };type AddMethodResponse = null;Exemplo
Seção intitulada “Exemplo”const response = await sdk.payments.addMethod({ "captcha": "string", "token": "string" });Testar esta função no playground
confirmMethod
Seção intitulada “confirmMethod”POST
/user/payment-method/confirmAssinatura:
confirmMethod(body?: ConfirmMethodBody, settings?: SdkSettings): Promise<ConfirmMethodResponse>| Nome | Tipo | Obrigatório |
|---|---|---|
captcha |
string |
sim |
sessionId |
string |
sim |
type ConfirmMethodBody = { "captcha": string; "sessionId": string; };type ConfirmMethodResponse = { "cards": Array<{ "id": string; "lastDigits": string; "network": string; }>; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.payments.confirmMethod({ "captcha": "string", "sessionId": "string" });Testar esta função no playground
createMethodSession
Seção intitulada “createMethodSession”POST
/user/payment-method/sessionAssinatura:
createMethodSession(settings?: SdkSettings): Promise<CreateMethodSessionResponse>type CreateMethodSessionResponse = { "sessionId": string; "uuid": string; "endpoint": string; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.payments.createMethodSession();Testar esta função no playground
deleteMethod
Seção intitulada “deleteMethod”DELETE
/user/payment-method/:cardIdAssinatura:
deleteMethod(cardId: string, settings?: SdkSettings): Promise<DeleteMethodResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
cardId |
string |
type DeleteMethodParams = { "cardId": string; };type DeleteMethodResponse = null;Exemplo
Seção intitulada “Exemplo”const response = await sdk.payments.deleteMethod("string");Testar esta função no playground
getShipping
Seção intitulada “getShipping”GET
/user/payments/:uuid/shippingAssinatura:
getShipping(uuid: string, settings?: SdkSettings): Promise<GetShippingResponse>Parâmetros de rota
Seção intitulada “Parâmetros de rota”| Nome | Tipo |
|---|---|
uuid |
string |
type GetShippingParams = { "uuid": string; };type GetShippingResponse = { "shipping": { "id": string; "paymentId": number; "shippingPrice": number; "provider": string; "providerServiceName": string | null; "status": "WAITING" | "LABEL_GENERATED" | "SHIPPED" | "EN_ROUTE" | "OUT_FOR_DELIVERY" | "DELIVERED" | "RETURNED" | "CANCELLED" | "EXPIRED" | "PAUSED" | "SUSPENDED"; "trackingCode": string | null; "labelUrl": string | null; "estimatedDeliveryDays": number | null; "logs": Array<{ "id": string; "type": "WAITING" | "LABEL_GENERATED" | "SHIPPED" | "EN_ROUTE" | "OUT_FOR_DELIVERY" | "DELIVERED" | "RETURNED" | "CANCELLED" | "EXPIRED" | "PAUSED" | "SUSPENDED"; "message": string; "createdAt": string; }>; "createdAt": string; "updatedAt": string; } | null; };Exemplo
Seção intitulada “Exemplo”const response = await sdk.payments.getShipping("string");Testar esta função no playground
listHistory
Seção intitulada “listHistory”GET
/user/paymentsAssinatura:
listHistory(query?: ListHistoryQuery, settings?: SdkSettings): Promise<ListHistoryResponse>| Nome | Tipo | Obrigatório |
|---|---|---|
page |
number |
não |
type ListHistoryQuery = { "page"?: number; };type ListHistoryResponse = Array<{ "id": number; "uuid": string; "value": number; "source": "APP" | "API" | "PHYSICAL" | "DESKTOP_WEB" | "MOBILE_WEB" | "TABLET_WEB" | "EMBED" | "LANDING_PAGE" | "WEBSITE" | "UNKNOWN" | "STUB" | "SUBSCRIPTION"; "status": "CREATED" | "PENDING" | "ANALYSIS" | "APPROVED" | "REFUSED" | "CANCELLED" | "REFUNDED" | "CHARGEDBACK"; "createdAt": string; }>;Exemplo
Seção intitulada “Exemplo”const response = await sdk.payments.listHistory();Testar esta função no playground
listMethods
Seção intitulada “listMethods”GET
/user/payment-methodsAssinatura:
listMethods(settings?: SdkSettings): Promise<ListMethodsResponse>type ListMethodsResponse = Array<{ "type": "PICPAY" | "PIX" | "CREDITS" | "POINTS" | "DIGITAL_WALLET"; "disabled"?: boolean; "rules"?: Array<{ "type": "condition"; "condition": Array<unknown>; "message"?: string; "hideIfNotMet"?: boolean; }>; } | { "type": "CARD"; "id": string; "expiration"?: string; "lastDigits": string; "issuer": string; "bankName"?: string; "securityCode"?: { "length": number; }; "rules"?: Array<{ "type": "condition"; "condition": Array<unknown>; "message"?: string; "hideIfNotMet"?: boolean; }>; }>;Exemplo
Seção intitulada “Exemplo”const response = await sdk.payments.listMethods();