question

swapnilnegi avatar image
swapnilnegi asked

Failed to initiate transaction with payment provider(Steam)

varpayForPurchaseRequest=newPayForPurchaseRequest{
OrderId =orderId,
ProviderName =providerName,
Currency =currency
};
PlayFabClientAPI.PayForPurchase(payForPurchaseRequest
,response=>{
Debug.Log(response);

}

Error: PlayFabError(PurchaseInitializationFailure, Failed to initiate transaction with payment provider, 400 BadRequest)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

What Title ID is this for? Can you confirm where you got the Steam Web API Key that you used for the setup?

16 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

swapnilnegi avatar image swapnilnegi commented ·

Title ID : 9162 . Steam setup is complete for my title ID

0 Likes 0 ·
swapnilnegi avatar image swapnilnegi commented ·

The StartPurchase response is having only one payment provider as "Test". It should show steam also, is this causing the problem.?
I have attached a screenshot for your reference.startpurchase-response.png
Thanks

0 Likes 0 ·
brendan avatar image brendan swapnilnegi commented ·

Do you mind if I create a player account in your title and do some testing?

0 Likes 0 ·
swapnilnegi avatar image swapnilnegi brendan commented ·

Yes you can! I am still stuck at this error, could you please assist? Thanks!

0 Likes 0 ·
swapnilnegi avatar image swapnilnegi commented ·

@Brendan Thanks for a quick reply. Do we need to register the title ID in steam as well.? I am using the correct title ID which I have been using for purchasing items from the playfab server. Does it has something to do with the Steam Web API Key.?

0 Likes 0 ·
brendan avatar image brendan swapnilnegi commented ·

No, it's one-way. We just need the Steam Web API Key and the application ID set up in the Steam add-on page in your title. Where specifically did you get the Web API Key from in Steamworks?

0 Likes 0 ·
swapnilnegi avatar image swapnilnegi brendan commented ·

Thanks!,
Is Steamworks.Net required for this or its just the three API calls as mentioned in this post. I am following this post for steam payments.
https://api.playfab.com/docs/tutorials/landing-commerce/non-receipt-payment-processing

0 Likes 0 ·
Show more comments
SL Tech avatar image SL Tech commented ·

Hi Brendan, I tried the Steam Web API keys from both

https://steamcommunity.com/dev/apikey

and https://partner.steamgames.com/pub/user/... (Groups)

Neither of them get Steam as a payment provider in the options for

https://9162.playfabapi.com/Client/StartPurchase

It only returns the Test provider.

0 Likes 0 ·
brendan avatar image brendan SL Tech commented ·

Neither of those would be correct. First, select the right company at the top of the screen. Then, click on Users & Permissions and select Manage Groups. There, pick a group. Either there will be a Web API Key or you'll need to create one. The URL should be https://partner.steamgames.com/pub/group/NNNN/MMMM/, where NNNN and MMMM are numeric values.

0 Likes 0 ·
SL Tech avatar image SL Tech brendan commented ·

Sorry that is what is configured right now in the Steam settings under Addons. Wrong url.

https://partner.steamgames.com/pub/group/xx/yyy

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.