Pular para o conteúdo

Pagamentos

paymentsnamespace

Métodos de pagamento, histórico e rastreio.

7métodos
paymentsnamespace

Esta página é gerada automaticamente pelo @luckymaker/sdk-generator. Não edite manualmente.

POST/user/payment-method/add

Assinatura:

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;
const response = await sdk.payments.addMethod({ "captcha": "string", "token": "string" });

Testar esta função no playground

POST/user/payment-method/confirm

Assinatura:

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; }>; };
const response = await sdk.payments.confirmMethod({ "captcha": "string", "sessionId": "string" });

Testar esta função no playground

POST/user/payment-method/session

Assinatura:

createMethodSession(settings?: SdkSettings): Promise<CreateMethodSessionResponse>
type CreateMethodSessionResponse = { "sessionId": string; "uuid": string; "endpoint": string; };
const response = await sdk.payments.createMethodSession();

Testar esta função no playground

DELETE/user/payment-method/:cardId

Assinatura:

deleteMethod(cardId: string, settings?: SdkSettings): Promise<DeleteMethodResponse>
Nome Tipo
cardId string
type DeleteMethodParams = { "cardId": string; };
type DeleteMethodResponse = null;
const response = await sdk.payments.deleteMethod("string");

Testar esta função no playground

GET/user/payments/:uuid/shipping

Assinatura:

getShipping(uuid: string, settings?: SdkSettings): Promise<GetShippingResponse>
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; };
const response = await sdk.payments.getShipping("string");

Testar esta função no playground

GET/user/payments

Assinatura:

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; }>;
const response = await sdk.payments.listHistory();

Testar esta função no playground

GET/user/payment-methods

Assinatura:

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; }>; }>;
const response = await sdk.payments.listMethods();

Testar esta função no playground